You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Really someone initializes FB SDK as recommended in doc at app start? I immediately knew that it is not good idea. I do it after user request sign in via facebook only...
MyLoginManager.swift
import FBSDKLoginKit;
import Foundation;
import GoogleSignIn;
class MyLoginManager: NSObject, LoginButtonDelegate {
...
public func initAppleLogin() {
...
}
public func initGoogleLogin() {
...
}
public func initFacebookLogin() {
// (!!!) Init FB SDK now, not at app start because of performance reason
FBSDKCoreKit.ApplicationDelegate.shared.application(UIApplication.shared, didFinishLaunchingWithOptions: nil);
// Logout before sign in to avoid dialog that user already logged in
let facebookLoginManager = FBSDKLoginKit.LoginManager();
facebookLoginManager.logOut();
// Fake login button
let loginButton = FBLoginButton(frame: .zero);
loginButton.permissions = ["public_profile", "email"];
loginButton.delegate = self;
loginButton.isHidden = true;
loginButton.sendActions(for: .touchUpInside);
}
func loginButton(_ loginButton: FBLoginButton, didCompleteWith result: FBSDKLoginKit.LoginManagerLoginResult?, error: Error?) -> Void {
...
}
func loginButtonDidLogOut(_ loginButton: FBLoginButton) -> Void {
...
}
...
}
Checklist before submitting a bug report
Xcode version
14.2.0
Facebook iOS SDK version
16.0.1
Dependency Manager
CocoaPods
SDK Framework
FBSDKLoginKit
Goals
Upgrade from SDK 14.0 to 16.0, My project is OC,The App launch time has increased 100ms.
Expected results
Hope to optimize the SDK in launch.
Actual results
no stack trace
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: