Unit tests failing to run after app rename due to apple linker error

前端 未结 6 1181
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 20:41

I recently changed the name of my app and now my unit tests are not running, I am getting an Apple linker error.

Any idea how to fix this? If I expand my \'Products

相关标签:
6条回答
  • 2020-12-20 21:21

    For the current version of Xcode, you just need to click on the project, then change the name in the file inspector. Or you can right-click on project, and there will be a "Renaming a project" in the help dialog.

    0 讨论(0)
  • 2020-12-20 21:25

    The following solution works for me:

    -> Select your project

    -> select your projectTest file from TARGET

    -> In Host Application, select your project from dropdown only if it show custom

    0 讨论(0)
  • 2020-12-20 21:29

    I don't know if this would help you solve your problem but you could try going to the organizer and under Projects tab hit remove for all Derived Data

    0 讨论(0)
  • 2020-12-20 21:43

    I've worked out a resolution to this issue which I've shared here: https://stackoverflow.com/a/30508062/233602

    I have filed this as http://www.openradar.me/21139630 and rdar://21139630 with Apple. Feel free to dupe if you also experience this issue.

    0 讨论(0)
  • 2020-12-20 21:45

    In my case, I had the similar issue after performing app rename. I'm running Xcode 8.x and what I did was:

    1) Project -> Targets -> xxTests -> General -> Enable 'Allow testing Host Application APIs'.

    2) Perform clean & rebuild

    3) In [Simulator], reset it: Simulator -> Reset Content and Settings...

    0 讨论(0)
  • 2020-12-20 21:45

    I faced similar issues when renaming my app. You should try with a fresh clean build. Make sure that you remove all build folders (performing a clean in XCode sometimes is not enough).

    0 讨论(0)
提交回复
热议问题