Commit c0936868 authored by yogevbd's avatar yogevbd

Fixes isRegisteredForRemoteNotifications on iOS

parent 77f672cd
......@@ -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));
}
......
{
"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 <lidan.hifi@gmail.com>",
"license": "MIT",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment