iOS 8 extension dependencies issues. Importing one project file to extension view controller

你。 提交于 2019-12-05 06:38:23

you can use this in your Podfile to prevent "Require only App-Extension-Safe API". Just put it to the end of your Podfile.

post_install do |installer_representation|
installer_representation.project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
        end
    end
end

1) You only need to add files to the extension target that you actually intend on using. I would recommend only pulling over what you need by finding the files and in the File Inspector, adding them to both targets.

2) Yep that's right. You'll need to update libraries that check that for you or fork them and fix them yourself.

3) I think you're referring to the default templates when creating one of the app extensions. Yes, you need to use UIKit not Foundation. Foundation will work for iOS or OS X, but clearly isn't enough if you are making a UIKit application.

4) The link_with command will make all pods in your Podfile link to all of the targets listed. If that's what you need, then, fine, do that. If you just need a small subset of pods for your extension, use the following:

target 'whateverTarget', :exclusive => true do
    pod 'SomePod'
end

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:

Propably you will need to do this for every of your pods.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!