Started a standard NSDocument-based (OS X) app in Xcode. Using Swift, along with regular and UI tests, but not Core Data. The template code compiles just fine. Added a Swift framework target, including regular tests, to the same project. Xcode automatically added the framework as a dependency for the app, although the later doesn’t use anything from the former right now.
Added enough code to the framework to add a test case to its unit tests. Xcode gives me an option to build, but not to test (greyed out). Before giving up, I try the app’s tests. Not only does it run its regular and UI tests, but the test for the framework too!
The project file has 6 groups on the side, under my app’s project file. They’re folders for the app, the app’s regular unit tests, the app’s UI tests, the framework, the framework’s unit tests, and the products. The project folder has 2 entries in black for the app and framework, and 3 entries in red for their unit tests.
A few months ago, I had a framework-only project that ran its unit tests just fine. What can I tweak so my current framework’s unit tests can be run separately from the app’s tests? It’s probably either in the build and/or scheme settings.
— Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
|