I want to start tests under Xcode 8 and it fail in the beginning. My error is:
Could not determine bundle identifier for MyProjectTest\'s TEST_HOST:
There is one more case you might encounter. If you need different product names for main target(for example Debug, Staging, Production) - and try to use Xcode Host Application selector, it will write incorrect values to TEST_HOST build setting.
And while error message you see is about bundle identifier in Debug configuration, Xcode actually complains about TEST_HOST in Release configuration.
I fixed it by manually changing TEST_HOST build setting. For example, if you have ProductName on main target set to AppDebug in Debug and AppRelease in Release configuration, your TEST_HOST should be following:
What Xcode sets:
$(BUILT_PRODUCTS_DIR)/AppDebug.app/AppDebug
What you need to set:
Debug configuration: $(BUILT_PRODUCTS_DIR)/AppDebug.app/AppDebug
Release configuration: $(BUILT_PRODUCTS_DIR)/AppRelease.app/AppRelease