Reputation: 657
I try to develop an UI Unit Test for my Application. I created a UI Test Target and wanted to launch the example XCTest which is generated with the creation of the Target.
When I try to launch the Test I get the error message:
Could not obtain the Bundle Identifier for /Path/from/user/toAppRepo/build/Debug-iphonesimulator/My_App.app
I am not sure, why this is happening, as I did not change Andy configuration and several Questions I have seen here do not help with my Problem, e.g. I set the Buildings "Use for command-line builds" option to "Debug" as mentioned in a similar Question. When I set TEST_HOST
it says, that I could not configure a Test with USE_XCTRUNNER
and TEST_HOST
.
Upvotes: 3
Views: 1353
Reputation: 657
I tried multiple solutions on this now like, cleaning the project adjusting the project file or deleting the app etc., but nothing helped here.
After discussions with my colleague where everything worked very well (same project) I tried to delete my DerivedData of Xcode with following terminal command:
rm -rf ~/Library/Developer/Xcode/DerivedData
After that I tried to launch the test again and everything worked. Probably there are multiple issues which lead to this error all with a different solution and this was mine. Hope it helps someone which has the same issue.
Upvotes: 3
Reputation: 1503
I encountered a similar problem and the way I fix it is
Delete My_App.app.
Clean project and re-build it.
Upvotes: 1