Building for iOS Simulator, but the linked library was built for iOS

260 阅读1分钟

分析:

使用的SDK仅支持在设备上运行,并没有编译对iOS Simulator的支持

解决方案

1、联系SDK方提供Simulator支持

2、debug模式忽略.a或者framework

  • build Setting–> Excluded source file names

    image.png

  • 并在引用地方用宏来判断非模拟器的情况:

    #if !TARGET_IPHONE_SIMULATOR
    #endif