XCode 4 Adding Run Script Build Phase Grayed Out - iphone

I am trying to select "Add Run Script Build Phase" under "Editor" > "Add Build Phase" in XCode 4, but the option is grayed out. Does anyone know why this would be happening? Thanks!

This is now different...again...in XCode 6. There's a "+" button in the top left corner of the Build Phases area that will give you the New Run Script Phase option. I'll come back after the NDA has lifted to post screenshots.

In case this wasn't answered, the step by step on adding a run script build phase is posted at http://runscriptbuildphase.com. It has the steps for Xcode 4 and Xcode 3.

Screenshot of new 'plus' icon initially mentioned by #d2burke for those who have had difficulty finding it in Xcode 6 +

Did you select your target and there the build-phases tab in the main view? then it should lighten up
hth

I'm new to Xcode too, but after googling same problem,i found that the solution is very simple.
you should press on your target( left panel, then u click on Build phase (not build setting) ), after that you can add new build phase settings.

I was just working on this same problem with XCode 5. Even if you are already on the "Build Phase" tab, you need to click Build Phase, then immediately click Editor --> Add Build Phase

Related

Xcode Unable to add test target to existing swift project - Target to be tested is grayed out

I have an existing project that I am trying to add unit tests to.
I'm on Xcode 10.1 and project is purely in Swift.
I start by clicking on "New Target..."
In the first dialog I am able to choose the project but the dialog box for "Target to be tested" is grayed out.
I have tried to go ahead and add the test target without choosing and this results in my test bundle not being able to find my existing classes - "No such Module error"
Here is the dialog for adding the test bundle:
Not sure what I'm doing wrong to prevent the this selection
Thanks for any help!
In Xcode 10.2.1, with your project open, click on the diamond with a dash in it:
Then down at the bottom left of the project window click on the '+' and select "New Unit Test Target".

Linker error in ipad,iphone

Hi am having this error when I am trying to compile my application.i try with replacing the name of buttons still its showing the same?
Try to follow the Steps. hope it helps and if not, please revert.
1) Open your Project
2) select your project Target
3) go to the Build Phases Section
4) go to the Compile Sources Tab
5) then search there the files names that xcode are saying duplicated and then remove them.
6) Clean the project and then try Running it.
Go to x code prefrences
Then go to location and click on small arrow next to "/Deriveddata" and delete derived data
This should solve it

How to add changes to code after deploying app to iPhone device

How i can make modifications to code after i deployed it on iPhone device. i only see summary, info, build settings, build phases and build rules. Don't see all project files which i can open and add changes to it.
Any ideas how to add changes after deploying and testing on real device.
It sounds like you are in the project or target settings. If you see a menu on the left of your screen you should be able to browse the files in your project to make changes. If you do not see that menu, then on the top right corner of the screen there should be 3 buttons with the word "View" underneath them. Click the left-most of those 3 buttons and the menu will show.
#user1120133, if you just run the program on your device again instead of the simulator, it will automatically update everything for you. I think that is what you mean.

"Upgrade current target for ipad" is grayed out (disabled)?

I'm trying to create a universal iPhone/iPad app using this method: http://www.enscand.com/roller/enscand/entry/ready_for_ipad which is also described all over the web. My problem is that the "Upgrade current target for iPad" line is grayed out and doesn't appear at all when I right click the target.
I'm working on an app that I inherited from someone, and have tried this with an app that I wrote entirely myself (no problems on that one). And yes, I'm sure that I'm selecting the target.
Just wondering if anyone has any insight into what checks are being run that would cause this option to be unavailable.
It took me a while to realize that you have to have a target selected before the menu item will become enabled.
I figured out that you have to select the target from the window on the left "Group & Files" for that "Upgrade Current target for ipad" to show.
I found the solution. After upgrading first target just rename Resources~iPad group in Groups&Files (e.g. to ResourcesFirstTarget~iPad). After that you can upgrade your other targets with "Upgrade Current Target For iPad".
I had this problem because I was trying to do it with the xib file selected, not the item under the the 'Targets' folder.
I just found that my project was set to "iPhone" for Distribution, but it was still set to "iPhone/iPad" for Debug. After switching to "iPhone" for Debug also, the option to convert to a Universal app became available.
Im not sure if this is an actual solution but I solved this problem by selecting the target, going to "Project" and setting the Active Build Configuration to "Release". Update Current Target for IPad then became enabled.
I deleted the "Resources-iPad" group and voila - the "Update Current Target for iPad" became enabled.
I was having the same problem, what I did to solve it was the normal thing:
- select target in Groups and Files
- (i.e change it from 'iPhone/iPad' to 'iPhone').
and it was grayed out...
- so I've cleaned the project (Build/Clean All targets)
It solved my problem, so I advise you to after make some changes that supposing would made it work, to clean the project afterwards!
Hope it can help someone.
I've found the same problem but can upgrade if I right click the target rather than using the menu item.
Further more I've just realised that the menu item does become ungrayed out if you select the target in Groups & Files not in the drop down at the top.
I don't know if this post is still active.
In project info, take a look at "Architecture", if there's more than one entry, the "Upgrade target for ipad" is greyed.
Set you app to target iPhone in both the Project->Edit Project Settings: All Configurations
and in the side menu, where you right click the target ->Get Info same type of menu.
To be able to click the "Upgrade to Ipad(...)" you have to click and select the target. Then it will work.
I solved this problem by right clicking on the target -> get info -> build, and changing the targeted device family from iphone/ipad to iphone.

How do you show Xcode's build log? (Trying to verify if iPhone distribution build zip was created correctly.)

I'm trying to zip up my iPhone application for App Store distribution.
The distribution instructions suggest looking in the build log to check if the mobileprovision file was included, but I can't figure out how to show a build log.
Apple's instructions:
To confirm your build was successful, check for the following:
Open the Build Log detail view and confirm the presence of the "embedded.mobileprovision” file. This will take you to the line in the build log that shows the provisioning profile was successfully called.
i have highlighted what you need to change. select "All messages" instead of "Issues Only" and the follow the screenshots below.
When you have the Build Results window showing, right-click on any item and select "Open These Latest Results as Transcript Text File".
Command-Shift-B to show the Build Results window. Click on a specific item in the results window to see the command line that actually executed.
In IOS sdk 4+ in order to see the actual full log output it seems you have to go
Navigators->log
(pops up log navigator)
select the log in question (double click it)
then control click on the list of "messages" and select "expand all transcripts" from the context menu
At the bottom left of the build window (the one that gives the summary of the build) there are 4 icons.
A tick
Yellow triange
a few lines
Downward triangle
The first 3 toggle information. The third is the one you want it will open a full build log.
Check out the build results window.(the one that shows up with errors and whatnot) At the bottom of the window it should list all the commands that it used to build the app. You might also need to modify the project settings and the build settings to get what you want. Plus make sure you are building using the right build configuration (that gets me sometimes ).