** 突然想到为何不把开发中经常遇到的报错信息整理起来,方便以后回顾!说干就干!**
第一. info.plist could`t be removed

](http:https://img.haomeiwen.com/i3018930/5286f1575cce70b1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
解决方法: 快捷键:shift + command + G , 输入含自己电脑路径(/Users/XX/Library/Developer/Xcode),删除DerivedData文件夹,回到xcode,选择 product 后 clean 一下,运行OK!
第二.Signing for "XXX" requires a development team. Select a development team in the project editor.-------------------Code signing is required for product type 'Application' in SDK 'iOS 10.0'

解决方法: 点击项目 --- targets --- General --- Signing---Team 选择自己的开发者团队证书,默认会勾选
默认情况为:

更改后为:

**第三.Debug-iphonesimulator/xxx.app/WeiboSDK.bundle/images: Directory not empty **
解决方法: 快捷键 Shift + Command + G 前往(/Users/你电脑名/Library/Developer/Xcode/DerivedData),删除DerivedData 文件夹,运行成功!
第四.xcode运行到真机报错 While reading xx.png pngcrush caught libpng error

解决方法: 这是提示的png并不是ps导出的png,而是手动修改jpeg后缀名为png,在模拟器上不会报错,但在真机,不识别这种所谓的“png”图片,请UI设计师将图片重新修改就行了!
第五.Could not attach to pid : “XXXX”

解决方法: 不管它,再次运行;这个问题并不是由我们的操作引起的,有时就会莫名其妙的出现,如果还不行,那么就把手机重新插拔或者重启模拟器,还不行就重启Xcode,还不行就clean一下工程,还不行就重启系统!蛋疼!
第六.[NSConcreteMutableData wbsdk_base64EncodedString]: unrecognized selector sent to instance 0x618000053230

解决方法: 在Other Linker Flags 中添加-ObjC就可以了 !
第七.Invalid Podfile
file: syntax error, unexpected end-of-input, expecting keyword_end.

解决方法: vi Podfile 编写格式不对 , 比如说 vi Podfile 时候忘记 加上 end 了 正确格式如下图,当然尽可能添加导入框架的版本信息!

第八.CocoaPods集成时 Apple Mach - O linker Error "std::__!::__next_prime(unsigned long)..."

解决方法: 如图: 添加 libc++.tbd 文件 (备注: pods - build setting - C++ Standard Library 检查是否是libc++(LLVM C++ .... support) 选项 再到 工程的 targets - build phases - Enable Bitcode 设置为NO)

第九.Program License Agreement updated

解决方法:登录开发者帐号首页有个红色的条,点开就会出现一个阅读协议,同意了就行
第十.This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

解决方法:iPhone上已经装了包标识符一样的 App,删掉再运行。
第十一.code signing is required for product type 'xxxxx' in SDK 'iOS 10.0'

解决方法:点击工程 Targets -- General ,勾选Automatically manage signing,配置相关team等即可!

第十二.The maximum number of apps for free development profiles has been reached

解决方法: 苹果免费App ID只能运行2个应用程序,当调试第三个的时候就会报这个错误,我们必须把之前的应用程序删除,就可以调试新的了
第十三. bash: syntax error near unexpected token `newline'

解决方法:终端编译时候戴尖括号之类的**重定向字符**时候会报此错误,解决方法,去除重定向字符!
第十四.ine 2: /Users/xx/Desktop/New-WolfKill/MapFileParser.sh: Permission denied

解决方法: 首次检出,提示对pod读取无权限,在终端中执行以下命令即可 chmod a+x /Users/XX/Desktop/MSU-WolfKill/MapFileParser.sh
第十五、operator delete", referenced from:

解决方法:项目 - TARGETS - General - Linked Framework and Libraries 添加依赖库 libc++.tbd
持续更新
网友评论