iOS报错详情

1:Xcode报错You don’t have permission.

D7A1DEBC-F58D-453B-B594-E167D911A4E5.png

原因1:


66C37014-3509-4B6F-9BA3-8D2EA872C709.png

将"Default compiler (Apple LLVM 9.0)"改成“Default compiler (Apple LLVM 9.0)”
** 注:这个方法好像不行*
原因2:
添加了两个plist文件,把新的删了

2:OBJC_CLASS$_某文件名", referenced from:

原因1. .m文件没有导入
在Build Phases里的Compile Sources 中添加报错的文件
原因2. .framework文件没有导入
**
(在xcode9.0中,手动拖的SDK需要直接导入到“Link Binary With ...”)

静态库编译时往往需要一些库的支持,查看你是否有没有导入的库文件
同样是在Build Phases里的Link Binary With Libraries中添加

3:'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based

/Users/lirong/Documents/git/ios/Pods/MBProgressHUD/MBProgressHUD.m:760:54: 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

今天运行Xcode一直报这个错误,然后去搜索解决答案,各种都是让把cocoapods卸载了重装的,试了都不成功。最后终于找到解决答案。

To remove sharedApplication issue from CocoaPods Libraries you just need to change Build Options within Build Settings for your pod.
Just type to search Require Only App-Extension-Safe API and then change the value to NO as it is on the image below:

在pods Target里面,点击buildSettings 然后把Require Only App-Extension-Safe API 然后把YES改为NO即可。工程同理

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容