I have an Xcode project that does not seem to want to compile my main goal of the application to create the product before trying to use it as the application host when performing unit tests. From Xcode, I am trying to run unit tests with β + U
I immediately get a dialog saying: Could not determine bundle identifier for [app name] TEST_HOST
(Replace [application name] with the name of the real application)
This dialog box also contains the path to the local derived data directory: "/Users/***/Library/Developer/Xcode/DerivedData/Lowes-aymgdtrbrarmcidtkxoqxeafmxmj/Build/Products/Debug-iphonesimulator/[app name]"
I have unit tests configured with a TEST_HOST setting pointing to $(BUILT_PRODUCTS_DIR)/[app name].app/[app name]
. The unit test target has a target dependency on the main purpose of the application. The value of BUNDLE_LOADER is set to $(TEST_HOST)
. If you first compile the main application object by pressing β + B
, the correct directory structure and application are created, and then you press β + U
bootstraps and run the unit tests correctly. If I do clean and try again, it will fail immediately. I have never encountered this problem before, and it seems to have arisen after the application was converted to Swift 3. It may or may not have anything to do with the problem, I'm not entirely sure.
I read a few answers here and tried many suggestions, but they don't seem to have the same root problem as mine. For most people, it seems that the host application for "No" and back to the main goal fixes the problem. This does not apply to me.
I tried new checks, reprogrammed the application and tested the targets in Swift 3, as well as the standard clean / clean build / extrude of the received data. None of this has any effect.
Has anyone else experienced this problem and figured out a solution?
source share