Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4: can't select target for test scheme

Tags:

xcode

xcode4

I have a project developed in Xcode 3 that I am transitioning to Xcode 4. When I attempt to "test" a build, I get a message that indicates that my application scheme is not configured for testing. I select "Edit Scheme" and I see that I have no tests configured. I choose "+" to add a new test, and am asked to select a target to test. The problem is there aren't any selectable targets provided. How does this target list get populated? For my project, "Build", "Run" and "Profile" are correctly populated with a target.

like image 438
ctpenrose Avatar asked Mar 14 '11 22:03

ctpenrose


People also ask

How do I select targets in Xcode?

You can access Target Membership by selecting file and opening the right menu in Xcode (the menu is called Inspectors ). Then, in File Inspector at the bottom of the menu, find Target Membership . It's very important to check all files in your project because without this you won't be able to build a new app target.

Where is target settings in Xcode?

Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.

What is target membership in Xcode?

Making an implementation file a member of a target tells Xcode to compile the file when you build the target. In your example Xcode compiles the file myAppFile. m when you build the myAppTests target but not when you build the myApp target.


1 Answers

I clicked the 'No Scheme' button, and chose Manage Schemes..

I then chose "Auto create schemes now", and it brought back my schemes (iPhone simulator, etc.)

like image 126
Richard Lovejoy Avatar answered Oct 02 '22 18:10

Richard Lovejoy