Skip to content

Commit

Permalink
Merge pull request #198 from shankari/native_upgrade_2021
Browse files Browse the repository at this point in the history
Minor fix to the notification checks
  • Loading branch information
shankari authored Apr 27, 2022
2 parents 8f7a40a + d3dbf83 commit a2b3e26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-em-datacollection"
version="1.7.1">
version="1.7.2">

<name>DataCollection</name>
<description>Background data collection FTW! This is the part that I really
Expand Down
2 changes: 1 addition & 1 deletion src/ios/Verification/TripDiarySensorControlChecks.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ +(BOOL)checkMotionActivityPermissions {
+(BOOL)checkNotificationsEnabled {
UIUserNotificationSettings* requestedSettings = [self REQUESTED_NOTIFICATION_TYPES];
UIUserNotificationSettings* currSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];
return requestedSettings.types == currSettings.types;
return (currSettings.types & requestedSettings.types) == requestedSettings.types;
}

+(UIUserNotificationSettings*) REQUESTED_NOTIFICATION_TYPES {
Expand Down

0 comments on commit a2b3e26

Please sign in to comment.