Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lot of warnings after installing facebook SDK on my iOS app

Tags:

ios

facebook

i am trying to install facebook SDK on my iOS app in order to make social login using facebook account. but after installing through cocoapods, it gives me a lot of warning message. I am using Xcode 9.2. here is the code on my podfile when installing using cocoapods

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'facebook login firebase' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for facebook login firebase

pod 'Bolts'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'

end

and here is the screenshot of the warning enter image description here https://ibb.co/kx5fCR (here is the link in case the image doesn't appear)

https://developers.facebook.com/docs/ios/getting-started i am in the step 4 of that documentation, but the warnings show up. so what went wrong in here? do i miss something?

like image 398
Alexa289 Avatar asked Jan 10 '18 11:01

Alexa289


1 Answers

Here is your complete Podfile section for installing the Facebook Swift SDK as static libraries and without warnings:

  pod 'Bolts', :modular_headers => true, :inhibit_warnings => true
  pod 'FacebookCore', :inhibit_warnings => true
  pod 'FacebookLogin', :inhibit_warnings => true
  pod 'FacebookShare', :inhibit_warnings => true
  pod 'FBSDKCoreKit', :modular_headers => true, :inhibit_warnings => true
  pod 'FBSDKLoginKit', :modular_headers => true, :inhibit_warnings => true
  pod 'FBSDKShareKit', :modular_headers => true, :inhibit_warnings => true

If you don't want to bother with individual inhibitions, add at the top of your Podfile

inhibit_all_warnings!

Also, if you're using frameworks with

use_frameworks!

then you can skip the need to specify modular headers for the dependencies and simply

  pod 'FacebookCore'
  pod 'FacebookLogin'
  pod 'FacebookShare'

answer current as of Xcode 9.4 / FacebookLogin 0.3.1 / FBSDKLoginKit 4.35.0 / Cocoapods 1.5.3

like image 94
Alex Curylo Avatar answered Sep 18 '22 20:09

Alex Curylo