开发者

Xcode 4: can't select target for test scheme

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 configur开发者_Python百科ed 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.


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.)


If this is for unit tests, make sure your unit test bundle target has its Wrapper Extension set to octest and Framework Search Path set to $(DEVELOPER_LIBRARY_DIR)/Frameworks. Then restart Xcode and it should appear as a target in the Test list for the scheme. I'm not sure why restarting Xcode is necessary but it seemed to work for me.


I chose to create a new scheme instead with the desired configuration: scheme configured to "Run", breakpoints on, and build configuration set to "debug" (taken from my XCode 3 project). I thought at first that I could easily have access to debugging, execution, archiving, conveniently from a single scheme, particularly as each of these modes ("run", test", "profile", "analyze", "archive") are selectable from the workspace toolbar. While I may be missing something I can get the desired functionality by creating a new scheme.


what i did was just push the toggle button "Breakpoints" in the top bar next to the Run, Stop and Scheme buttons. Then when pushing Run, the debugger will attach to the processes, stop on the breakpoints and show variables values. No scheme modification needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜