How to only include a framework when building for device, not iOS Simulator?

前端 未结 1 1474
名媛妹妹
名媛妹妹 2020-12-30 14:48

We’re using a third-party push notification framework which has not been compiled for x86_64, which means that whenever we build for the simulator, we get a build warning. S

相关标签:
1条回答
  • 2020-12-30 15:17
    1. Make your framework optional not required in Build Phases > Link Binary With Libraries
    2. In Build Settings > Linking in "Other Linker Flags" create Debug flag for option Any iOS Simulator SDK and add value -ObjC -weak_framework YourFrameworkName.
    3. And in code check for build target like this #if TARGET_IPHONE_SIMULATOR.

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