Firebase Refresh Token

后端 未结 3 1858
孤独总比滥情好
孤独总比滥情好 2021-01-18 21:07

Using the method

[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]

Im not quite sure what the parameters are calling for? What is

3条回答
  •  失恋的感觉
    2021-01-18 21:59

    You can do like this.

    [[FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeProd];
    
    [[FIRInstanceID instanceID] tokenWithAuthorizedEntity:gcmSenderID scope:kFIRInstanceIDTokenRefreshNotification options:nil handler:^(NSString * _Nullable token, NSError * _Nullable error) {
    
        NSLog(@"GCM Registration token = %@",token);
        NSLog(@"GCM Registration error = %@",error);        
    }];
    

提交回复
热议问题