iOS12 适配 模拟器及真机调试

一、libstdc++.6.0.9.tbd 库 缺失问题

报错描述:

ld: library not found for -lstdc++.6.0.9
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方法:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib路径下找不到libstdc++.6.0.9.tbd文件时,可以通过终端打开此路径,把Xcode9中的此文件粘贴进去,会要求输入本机的用户名和密码。
如图:

42D5A3E8383529C6DA848BFCB862E38C.png

再次编译运行就通过了

二、XR、XS、XS MAX 模拟器无法使用

解决方法
如问题一描述,把libstdc++.6.0.9.tbd粘贴到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib路径下,再次编译运行可以通过

三、多target Archive失败

报错描述:

error: Multiple commands produce '/Users/ch/Library/Developer/Xcode/DerivedData/moshare-azzcuuimsddksncyuzxvealklxtm/Build/Intermediates.noindex/ArchiveIntermediates/preproduct/InstallationBuildProductsLocation/Applications/慕享.app':
1) Target 'moshare' has create directory command with output '/Users/ch/Library/Developer/Xcode/DerivedData/xx-azzcuuimsddksncyuzxvealklxtm/Build/Intermediates.noindex/ArchiveIntermediates/preproduct/InstallationBuildProductsLocation/Applications/xx.app'
2) That command depends on command in Target 'xx': script phase “[CP] Copy Pods Resources”

解决方法:

Xcode菜单栏workspace buildsettings中的Build System修改为Legacy Build System
如图:

7EAFAC943E21E8D7879A0836FE4F4233.jpg

FA72C39ACE18AB7A8C630D4453C72B09.jpg

你可能感兴趣的:(iOS12 适配 模拟器及真机调试)