Failed to successfully update network information during initialization Xcode error

I was struggling with this next program execution which I am currently doing in Xcode 8 and Swift 3 ... it is just a simple login program, but whenever the app launches the console it just prints the error "Failed to update network info successfully during initialization "even before the login button was pressed and the solutions are very small and none of them worked for me.

import UIKit
import FBSDKCoreKit
import FBSDKLoginKit
class ViewController: UIViewController, FBSDKLoginButtonDelegate {
    @IBOutlet weak var btnButton: FBSDKLoginButton!     
    override func viewDidLoad() {
     super.viewDidLoad()
                 // Do any additional setup after loading the view, typically from a nib.
    }
 override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!)
        {
                if error == nil
                {
                   print("login Successful")
                   self.configureFacebook() 
                }
                else
                {
                    print("error\(error!)")
                }
               }
func loginButtonDidLogOut(_ loginButton: FBSDKLoginButton!)
        {
            let loginManager: FBSDKLoginManager = FBSDKLoginManager()
            loginManager.logOut()
            print("logout successful")    
        }
func configureFacebook()
        {
            btnButton.readPermissions = ["public_profile", "email", "user_friends"];
            btnButton.delegate = self         
    }
}

      

+3


source to share





All Articles