I am integrating FacebookSDK using Cocoapods. When I create an object of FBSDKLoginManager like let login = FBSDKLoginManager() I get the error "Use of unresolved identifier 'FBSDKLoginManager'". I can see autoComplete and its pointing to correct methods but it still shows the error. Here is my pod file:
platform :ios, '9.0'
use_frameworks!
target 'BuildTheTower' do
pod 'SVProgressHUD'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end
and here is my bridging header file :
#ifndef ObjectiveC_Bridging_Header_h
#define ObjectiveC_Bridging_Header_h
#import <SVProgressHUD/SVProgressHUD.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#endif /* ObjectiveC_Bridging_Header_h */
Other things such as FBSDKAppEvents.activateApp() and FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) are working fine but FBSDKLoginManager is not.
Bridging headers are not needed. Just add import statements.
See the official tutorial/docs for more info.