refactor: update notification permission handling and improve Info.plist descriptions (#1393)

- Removed automatic notification permission request during app launch to prevent unwanted prompts; permissions will now be requested only when the user explicitly enables notifications.
- Updated NSFaceIDUsageDescription in Info.plist for clarity on personal information storage.
This commit is contained in:
turnoffthiscomputer
2025-11-11 21:45:26 +01:00
committed by GitHub
parent 2f2045a6fd
commit d86ee9e03f
2 changed files with 5 additions and 18 deletions

View File

@@ -19,23 +19,10 @@
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
// Request permission for notifications
[center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge)
completionHandler:^(BOOL granted, NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to request notification authorization: %@", error.localizedDescription);
return;
}
if (granted) {
NSLog(@"Notification authorization granted");
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] registerForRemoteNotifications];
});
} else {
NSLog(@"Notification authorization denied by user");
}
}];
// NOTE: Notification permission request removed from app launch
// Permission is now requested only when user explicitly enables notifications
// (e.g., in Points screen or settings)
// The auto-request was causing unwanted permission prompts on first app launch
}
self.moduleName = @"OpenPassport";

View File

@@ -59,7 +59,7 @@
<key>NSCameraUsageDescription</key>
<string>Needed to scan the passport MRZ.</string>
<key>NSFaceIDUsageDescription</key>
<string>Needed to secure the secret</string>
<string>Personal information is only stored in the secure element of your device.</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSLocationWhenInUseUsageDescription</key>