Xcode 10 和 iOS 12 的问题

栏目: IOS · 发布时间: 7年前

内容简介:苹果在XCode10和iOS12中移除了libstdc++这个库,由libc++这个库取而代之。由于大量的第三方库使用了这个库,因此可以暂时用以下办法让编译通过:

libstdc++.tbd 找不到

苹果在XCode10和iOS12中移除了libstdc++这个库,由libc++这个库取而代之。

由于大量的第三方库使用了这个库,因此可以暂时用以下办法让编译通过:

  • 方法 1

    从 Xcode 9 中拷贝这个库到 Xcode 10 中。拷贝的地方有两处,分别位于 /Applications/Xcode9.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib 和 /Applications/Xcode9.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib 目录。然后你就可以在 Xcode 10 中导入这个库了。

    注意,这种方式无法在 iOS 12 的模拟器中运行,会报如下错误:/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator

    这种情况下,只能用真机测试。

  • 方法 2

    从 Linked frameworks and libraries 中删除 libstdc++,然后全局搜索 6.0.9,将 pod 的两个 xcconfig 文件中的 -l"stdc++.6.0.9" 删掉。

    这种方法无论在 iOS 11 还是 12 的模拟器上都能运行。

编译错误:Multiple commands produce ‘/Users/qq/Library/Developer/Xcode/DerivedData/Client-ftuhxtvemmeflwbaizseedvenvlb/Build/Products/Debug-iphonesimulator/Client.app/Info.plist’:

打开 Xcode 菜单 file\Workspace Settings,将 Build System设置为legacy Build System。

如果还不行,将 info.plist 从 Build phase > Copy Bundle Resource/Compile Sources 中移除。


以上所述就是小编给大家介绍的《Xcode 10 和 iOS 12 的问题》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

New Dark Age

New Dark Age

James Bridle / Verso Books / 2018-7-17 / GBP 16.99

As the world around us increases in technological complexity, our understanding of it diminishes. Underlying this trend is a single idea: the belief that our existence is understandable through comput......一起来看看 《New Dark Age》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码