-2

I have followed this tutorial:

https://www.youtube.com/watch?v=OaiLpVG6Tlc

correctly (or so I believe), however I get these errors on launch:

2016-09-07 20:36:05.520: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
2016-09-07 20:36:15.743 customLogin[833:] <FIRAnalytics/WARNING> Failed to get InstanceID: Error Domain=com.firebase.iid Code=-34018 "(null)"
2016-09-07 20:36:19.504: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
2016-09-07 20:36:46.642: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
2016-09-07 20:37:28.821: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
2016-09-07 20:38:31.108: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"

How can I fix this?

When I try and press the login button or create account button on my app I also get this error:

"An error occurred when accessing the keychain".

1

2 Answers 2

8

Try going to your Target > Capabilities, and setting Keychain Sharing to On.

Sign up to request clarification or add additional context in comments.

Comments

1

First Enable this from firebase enter image description here

// For Firebase Login code :

@IBAction func OnLoginButtonClicked(sender: AnyObject) {

FIRAuth.auth()?.signInWithEmail(Username.text!, password: Password.text!, completion: {

    user , error in
            if error != nil {

                print("Wrong Password ")
            }
            else {
               print("Login Successfully :)")
                 }
    })

// Create For New Account

@IBAction func OnCreateButtonClicked(sender:AnyObject){

    FIRAuth.auth()?.createUserWithEmail(Username.text!, password: Password.text!, completion: {
      user , error in

        if error != nil {

            print("Account Does't Created ! Something went to Wrong !")
        }

        else {

            print("Account Created Successfully :)")

        }           

})

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.