After I changed the product name for my app, I could still run the app in the simulator, but when I try to run tests, I get this error:
ld: file not found: /Users/stefankendall/Library/Developer/Xcode/DerivedData/ProjectName-fcxmoirjyqcvalgdndrznrmnvtdw/Build/Products/Debug-iphonesimulator/OldAppName.app/ProjectRootDirectory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why is the test action still trying to read from the old app name, even though I've changed the Product Name build property and xcode no longer builds to that location?
you need to change the "bundle loader" property of your unit test target.
Check the other properties of both the test and the app for the "OldAppName" by typing it in the search field on the "Build Settings" page for both targets.
Here is a screen shot to illustrate:
How you changed your appname? from the Project navigation pane? or from the build settings packaging -> product name of the target ?However i also want to tell that second way is ideal way to do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With