[iid][ios] temporarily remove Messaging dependency for v4.3.0 release until an outcome is agreed on original PR #1215
This commit is contained in:
parent
1d2757dc30
commit
7e68d5eb11
|
@ -1,7 +1,7 @@
|
|||
#import "RNFirebaseInstanceId.h"
|
||||
|
||||
#if __has_include(<FirebaseInstanceID/FIRInstanceID.h>)
|
||||
#import <FirebaseMessaging/FirebaseMessaging.h>
|
||||
//#import <FirebaseMessaging/FirebaseMessaging.h>
|
||||
#import <FirebaseInstanceID/FIRInstanceID.h>
|
||||
|
||||
@implementation RNFirebaseInstanceId
|
||||
|
@ -32,9 +32,9 @@ RCT_EXPORT_METHOD(getToken:(NSString *)authorizedEntity
|
|||
resolver:(RCTPromiseResolveBlock)resolve
|
||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||
NSDictionary * options = nil;
|
||||
if ([FIRMessaging messaging].APNSToken) {
|
||||
options = @{@"apns_token": [FIRMessaging messaging].APNSToken};
|
||||
}
|
||||
// if ([FIRMessaging messaging].APNSToken) {
|
||||
// options = @{@"apns_token": [FIRMessaging messaging].APNSToken};
|
||||
// }
|
||||
[[FIRInstanceID instanceID] tokenWithAuthorizedEntity:authorizedEntity scope:scope options:options handler:^(NSString * _Nullable identity, NSError * _Nullable error) {
|
||||
if (error) {
|
||||
reject(@"instance_id_error", @"Failed to getToken", error);
|
||||
|
|
Loading…
Reference in New Issue