I am just trying to run facebook login via Firebase in my ios app. I have done everything that is mentioned in Firebase`s ios (swift) guide [https://www.firebase.com/docs/ios/guide/setup.html] but I am still facing compilation error:
Use of unresolved identifier 'FBSDKLoginManager'
If I am using:
let facebookLogin = FBSDKLoginManager()
Please note I have downloaded FBSKCoreKit, FBSLoginKit and FBSKShareKit (via cocoapods).
I have also updated my AppDelegate.swift like mentioned in the 7th step from guide above. I have also updated my ...-Bridging-Header.h file like:
#import <Firebase/Firebase.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKShareKit/FBSDKShareKit.h>
I have also added mentioned frameworks:
libicucore.dylib, libc++.dylib, CFNetwork.framework, Security.framework, SystemConfiguration.framework
Could you please tell me, what I have missed? Thank you for any suggestions.
My pod file:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'Alamofire', '~> 1.2'
pod 'AEXML'
pod 'AlecrimCoreData', '~> 3.0'
pod 'Firebase', '>= 2.3.2'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end
target 'MyProjectTests' do
end
EDIT: Please note I have tried to create new (empty) project, I have added mentioned pods to podfile and I have added mentioned imports to new header bridging file (I have also doublechecked Objective-C bridging header file in Build Setting > Swift Compiler settings). I have added problem line
let facebookLogin = FBSDKLoginManager()
to viewDidLoad() of sample view controller and I have got the same error. I am using XCode Version 6.3.2 (6D2105). Could somebodyreproduce the sme issue or am I doing something wrong? Thank you
So the solution was that the Firebase documentation is outdated - FB`s SDK is already in swift so there is no necessary to add import to your bridging header file. Everything you need to do is just add import to your swift file and you are ready to go
import FBSDKCoreKit
import FBSDKShareKit
import FBSDKLoginKit