0

I've been trying to integrate Facebook with an IOS app using cocoapods (Xcode 9.0, IOS 11). After installing pods and adjusting the info.plist with all fb info, I got stuck on importing FacebookCore (it won't work with FBSDKCoreKit, FacebookLoginKit, FBSDKLoginKit also). Xcode issues the "No such module" warn. More than that, if I choose to run the project (without importing anything), it issues more than 20 warns, including Bolts framework, FBSDKCoreKit, FacebookCore etc.. Does anyone know how to handle this?

Thank you

EDIT --> Importing the Facebook frameworks manually made it work, so the problem might be with the cocoapods. Any ideas about what went wrong with the pods?

user1141890
  • 79
  • 1
  • 7

2 Answers2

1

I implemented the Facebook login flow for iOS 10 using the following pods: 'FBSDKCoreKit', 'FBSDKLoginKit', 'FBSDKShareKit', 'FBSDKMessengerShareKit'.

It does work, but in iOS 11, it's opening a webview to do login on an iPad. It might work better on an iPhone. There's a small note in the Facebook documentation, that iPads have reduced functionality, at least on iOS 10. I'm not sure about iOS 11 yet...

To do login in a swift file, you only need to import FBSDKCoreKit and FBSDKLoginKit. The "FacebookCore" you're referring to, is at version 0.2.0, so I wouldn't want to use that one myself. Run the command "pod search --simple FacebookCore" in a terminal, to check for yourself.

I remember also trying it, but there were many problems in the framework, so I stopped trying, and just went for the normal Facebook pods instead of this "Facebook for Swift" pod.

Try to follow the Facebook login process without that one, and it might just work for you.

edit: (I found your post because I was looking for the following) “Social accounts have been removed from Settings iOS 11. Third-party apps no longer have access to those signed-in accounts.” : https://www.theverge.com/2017/6/5/15743010/apple-ios-11-wwdc-2017-facebook-twitter-social-accounts-login

...so no more smooth social media logins, I guess...

Tim Kofoed
  • 61
  • 6
0

I had the same issues with many errors with Bolt and others and I changed the Swift version to 3.2 for the FacebookShare POD:

POD File Contents:

pod 'FacebookCore', '~> 0.2'
pod 'FacebookLogin', '~> 0.2'
pod 'FacebookShare', '~> 0.2'
pod 'FBSDKCoreKit', '~> 4.22.1'
pod 'FBSDKLoginKit', '~> 4.22.1'
pod 'FBSDKShareKit', '~> 4.22.1'