After the recent iOS 9 update, along with updates to the Facebook SDK (4.6.0), I\'m finding that my login session is no longer persisting between app launches.
My flow
Adding this line on didFinishLaunchingWithOptions
worked for me:
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
Final method looks something like this:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
if let accessToken = FBSDKAccessToken.currentAccessToken(){
print(accessToken)
}else{
print("Not logged In.")
}
return true
}
Reference