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
For iOS 11 / Swift 4 you should add the following code to your AppDelegate:didFinishLaunchingWithOptions
SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
Final code is:
import FacebookCore
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.\
// FACEBOOK CONFIGURATION
SDKApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}