From c093686804e2c5d6e27a55b06efe025e153d79e2 Mon Sep 17 00:00:00 2001 From: yogevbd Date: Sun, 24 Feb 2019 15:50:33 +0200 Subject: [PATCH] Fixes isRegisteredForRemoteNotifications on iOS --- RNNotifications/RNNotifications.m | 9 +-------- package.json | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/RNNotifications/RNNotifications.m b/RNNotifications/RNNotifications.m index 844d8e2..571b103 100644 --- a/RNNotifications/RNNotifications.m +++ b/RNNotifications/RNNotifications.m @@ -636,14 +636,7 @@ RCT_EXPORT_METHOD(cancelAllLocalNotifications) RCT_EXPORT_METHOD(isRegisteredForRemoteNotifications:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) { - BOOL ans; - - if (TARGET_IPHONE_SIMULATOR) { - ans = [[[UIApplication sharedApplication] currentUserNotificationSettings] types] != 0; - } - else { - ans = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications]; - } + BOOL ans = [[[UIApplication sharedApplication] currentUserNotificationSettings] types] != 0; resolve(@(ans)); } diff --git a/package.json b/package.json index 1f65772..c070d13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-notifications", - "version": "1.1.23", + "version": "1.1.24", "description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android", "author": "Lidan Hifi ", "license": "MIT", -- 2.26.2