1. CocoaPods使用
iOS安装CocoaPods详细过程
参考地址:https://www.jianshu.com/p/9e4e36ba8574
问题描述:使用cocoapods时,import 找不到头文件
问题原因:还没设置头文件的目录
解决办法:Target --> User Header Search Paths --> ${SRCROOT} --> recursive
参考地址:https://blog.csdn.net/jiajiayouba/article/details/43491881
CocoaPods 出现 OTHER_LDFLAGS 错误的解决方法
参考地址:http://www.99css.com/1346/
cocoapods RuntimeError - [Xcodeproj] Unknown object version.
问题原因:Xcode 版本和 CocoaPods 的版本不匹配,需要更新CocoaPods
解决方法:终端输入命令 $ gem install cocoapods --pre
bogon:XXX XXX gem install cocoapods --pre
^[[AERROR: While executing gem ... (Gem::FilePermissionError)
You do not have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
问题原因:不用sudo的话会报错,因为权限不够
解决方法:$sudo gem install -n /usr/local/bin cocoapods
2. Xcode 8 添加PCH文件
Build Setting -->Prefix Header -->$(SRCROOT)/工程名称/PrefixHeader.pch
参考地址:https:
3. Xcode 10 配置-lstdc++.6.0.9
Xcode 10 library not found for -lstdc++.6.0.9
原因:Xcode10取消了6.0.9的支持,但是在xcode9上面可以找到。
解决方案
真机:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
模拟器:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
1. 首先打开链接下载libstdc++.6.0.9.tbd
2. 链接:https://pan.baidu.com/s/1Dy4bcaPaC70IFzDq4hIYXQ 密码:azhc
3. 进入到上述目录下,把libstdc++.6.0.9.tbd复制进去
4. 重启Xcode
4. XCode12 iOS12 模拟器中运行
将[libstdc++_sim.zip]文件解压,放到目录
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
将[libstdc++.dylib_sim.zip]解压,放到目录
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
5. Application Loader 上传ipa 失败
ERROR ITMS-90596: "Invalid Bundle. The asset catalog at 'Payload/XXX.app/Assets.car' can't be read. Try rebuilding the app with a non-beta version of Xcode and submit it again."
一开始以为是图片什么16位,p3问题,并不是,看看错误码90596就知道不一样
1. Mac电脑系统最新版
2. Xcode最新版(AppStore下载,不要搞beta测试版什么的)
3. application loader最新版(其实Xcode最新,自然就最新了吧)