I am trying to add the Facebook login feature using FBSDKCoreKit
and FBSDKLogin
. When I try to import these two framework to my AppDelegate
I have solved this problem by typing import FBSDKLoginKit
Dont copy!! just write.
Hope it Helps
In AppDelegate import:
import FacebookCore
import FacebookLogin
and add:
func application(_ application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
SDKApplicationDelegate.shared.application(application,
didFinishLaunchingWithOptions: launchOptions)
return true
}
func application(_ app: UIApplication, open url: URL, options:
[UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
return SDKApplicationDelegate.shared.application(app, open: url,
options: options)
}
I resolved No such module 'FrameworkName'
issue with following steps:
1) Create a group, call it Framework
(optional, best practice)
2) Drag desired SDK(s) from Original SDK path to Framework
, in your case FBSDKCoreKit
and FBSDKLoginKit
3) When the dialog pops 'Choose options for adding these files:', choose following:
Additional step for Facebook SDK version 4.0:
4) Select the target in the project editor and click Build Settings, change Framework Search Paths to: ~/Documents/FacebookSDKDirectoryName
I'd like to suggest one of the easiest way.
Dada! Works like a charm!
I resolved this problem by adding FacebookSDK
Directory path to the "Framework Search Paths"
Go to Build Settings and search for "framework search"
It's the usual suspects.
Check your Frameworks folder. Check Project -> Build Phases -> Link Binary with Libraries, and make sure FBSDKCoreKit
and FBSDKLoginKit
are included.
If they're there, and the error still exists, tap on each framework, and make sure Target Membership
is checked under File inspector.