How to fix Failed to fetch default token error?

后端 未结 8 2082
无人及你
无人及你 2020-12-01 09:23

\"enter

I am getting this error after installing in iphone.

8条回答
  •  醉话见心
    2020-12-01 09:46

    Have been stuck for a while with this, for me the reason why I could not make it work was that I was using a secondary firebase app. It looks like a bug to me. As a workaround, I had to initialize the additional app before the default app (in AppDelegate.m):

    //initialise the secondary app, for example:
    NSString *logFirebaseOptionFile = [[NSBundle mainBundle] pathForResource:@"GoogleService-LOG-Info" ofType:@"plist"];
    FIROptions *firebaseOptions = [[FIROptions alloc] initWithContentsOfFile:logFirebaseOptionFile];
    NSString *logAppName = @"mybands_logs";
    [FIRApp configureWithName:logAppName options:firebaseOptions];
    
    //then the default app for FCM to work
    [FIRApp configure];
    

提交回复
热议问题