小编SM1*_*M18的帖子

'FIRInstanceID'的可见@interface没有声明选择器'setAPNSToken:type:'

更新Pod库后,出现appdelegate.m中的上述错误

- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {

    [[FIRInstanceID instanceID] setAPNSToken:deviceToken type:FIRInstanceIDAPNSTokenTypeSandbox];
    NSString *newToken = [deviceToken description];
    newToken = [newToken stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
    newToken = [newToken stringByReplacingOccurrencesOfString:@" " withString:@""];
    NSLog(@"My token is: %@", newToken);

}
Run Code Online (Sandbox Code Playgroud)

ios firebase firebase-cloud-messaging

4
推荐指数
1
解决办法
3676
查看次数

标签 统计

firebase ×1

firebase-cloud-messaging ×1

ios ×1