[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:
Salakar 2018-07-10 22:15:50 +01:00
parent 1d2757dc30
commit 7e68d5eb11
1 changed files with 4 additions and 4 deletions

View File

@ -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);