XCode 5 unit testing: starts my app

前端 未结 7 1767
挽巷
挽巷 2020-11-29 23:04

When I run my tests in XCode 5, the main window of my OS X app appears on the screen for a couple of seconds while running the tests. Why? Even if I uncomment all my tests i

7条回答
  •  醉梦人生
    2020-11-29 23:35

    With XCTest, application files DO NOT need to be included within XCTest targets. The XCTest bundle is linked against the application which makes those files available during runtime.

    To make this work, ensure the compiler option "Symbols hidden by default" is set to NO Within the Application target.

    Here is a blog post with screenshots for clarity: http://zmcartor.github.io/code/2014/02/24/slim-xctest-targets

    The advantage of this approach is test target builds much much faster.

提交回复
热议问题