Swift/Firebase Database invalid token error

后端 未结 1 1839
长情又很酷
长情又很酷 2021-01-16 10:08

Experiencing some rather odd issues with Firebase.. I have installed firebase through cocoaPods, included the GoogleService-Info.plist, etc - but when I try to read a value

1条回答
  •  再見小時候
    2021-01-16 10:48

    This error message indicates that the project in the token doesn't match the project that your app is connecting to. From a post on the firebase-talk group:

    There are a couple ways you may hit this:

    1. You've changed your GoogleService-Info.plist to point at a different project, but your app still has a cached token from a previous run.

    2. I believe the iOS Simulator shares the keychain between apps, so if you have multiple apps using Firebase, one app might be picking up the token cached by another app. This only happens in the simulator and we're working on changing the Firebase SDK to avoid this.

    In either case, you can probably resolve the issue by doing an explicit signOut() call before initializing Firebase Database.

    0 讨论(0)
提交回复
热议问题