Facebook cocoapods 'sharedApplication' is unavailable: not available on iOS (App Extension)

You can add the following block to your Podfile to address this programatically.

If you are using pods you can add the following block to your Podfile to address this issue:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
    end
  end
end

This will set the require only App-Extension-Safe Api to No for all pod project targets and should allow your builds to succeed.


That's what helped me: Pods project -> select Target which contains this error -> Build Settings -> set Require Only App-Extension-Safe API to No

You might probably have to do the same for other FB frameworks


i had the same problem,i solved it by setting require only App-Extension-Safe Api to no it seemed that all the facebook pods require only App-Extension-Safe Api were set to yes so i have to set no for all xcodeproject,target,all facebook pods , you can find require only App-Extension-Safe Api in build setting for pods,target,and project important note when ever you reinstall pods they are reseted to yes