Can no longer import app module into unit tests after changing deployment target

前端 未结 1 1684
南方客
南方客 2021-01-05 01:59

For unit testing public classes of my main app target in my swift unit tests, I have to import my main app module in my tests like so:

#import MyAppModuleName<

相关标签:
1条回答
  • 2021-01-05 02:37

    You were almost there, you just need to update the iOS Deployment Target for your Project and both of your targets.

    For your project:

    For your app target:

    For your test target:

    You should probably do a clean and rebuild, no need to restart Xcode. I guess this will also work if you want to target 8.1 etc.

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