美文网首页iOS精品
Building for iOS Simulator, but

Building for iOS Simulator, but

作者: 剧变 | 来源:发表于2021-05-20 09:20 被阅读0次

Building for iOS Simulator, but the linked and embedded framework 'xxx.framework' was built for iOS.

在我们运行xcode模拟器时,可能会出现以上的错误,原因是xxx.framework使用的架构不支持模拟器运行,你可以使用真机运行来避免

如果一定需要使用模拟器运行的话,需要一些特别的设置

Build Settings - Excluded Source File Names - Debug 添加 Any iOS Simulator: xxx.framework

然后在代码引用到xxx.framework的地方使用以下代码来做一些只有真机才运行的判断代码

#if TARGET_IPHONE_SIMULATOR

#else

#endif

相关文章

网友评论

    本文标题:Building for iOS Simulator, but

    本文链接:https://www.haomeiwen.com/subject/tadvjltx.html