'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即可。工程同理。


你可能感兴趣的:(Cocoapods)