Skip to content

Commit fcb004b

Browse files
authored
docs(README): Update the correspondence between permission groups and the key values of Info.plist (#1479)
- The correspondence table between permission groups and Info.plist key values has been updated in the README file - Several new mapping relationships for permission groups have been added, including sensors, bluetooth, appTrackingTransparency, criticalAlerts, and assistant - Corrected the macro definitions of some permission groups
1 parent c438a1f commit fcb004b

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

permission_handler/README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ You must list the permission you want to use in your application:
127127
## dart: PermissionGroup.criticalAlerts
128128
'PERMISSION_CRITICAL_ALERTS=1',
129129

130-
## dart: PermissionGroup.criticalAlerts
130+
## dart: PermissionGroup.assistant
131131
'PERMISSION_ASSISTANT=1',
132132
]
133133

@@ -147,23 +147,28 @@ You must list the permission you want to use in your application:
147147
e.g. when you don't need camera permission, just delete 'NSCameraUsageDescription'
148148
The following lists the relationship between `Permission` and `The key of Info.plist`:
149149

150-
| Permission | Info.plist | Macro |
151-
|---------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
152-
| PermissionGroup.calendar (< iOS 17) | NSCalendarsUsageDescription | PERMISSION_EVENTS |
153-
| PermissionGroup.calendarWriteOnly (iOS 17+) | NSCalendarsWriteOnlyAccessUsageDescription | PERMISSION_EVENTS |
154-
| PermissionGroup.calendarFullAccess (iOS 17+) | NSCalendarsFullAccessUsageDescription | PERMISSION_EVENTS_FULL_ACCESS |
155-
| PermissionGroup.reminders | NSRemindersUsageDescription | PERMISSION_REMINDERS |
156-
| PermissionGroup.contacts | NSContactsUsageDescription | PERMISSION_CONTACTS |
157-
| PermissionGroup.camera | NSCameraUsageDescription | PERMISSION_CAMERA |
158-
| PermissionGroup.microphone | NSMicrophoneUsageDescription | PERMISSION_MICROPHONE |
159-
| PermissionGroup.speech | NSSpeechRecognitionUsageDescription | PERMISSION_SPEECH_RECOGNIZER |
160-
| PermissionGroup.photos | NSPhotoLibraryUsageDescription | PERMISSION_PHOTOS |
161-
| PermissionGroup.photosAddOnly | NSPhotoLibraryAddUsageDescription | PERMISSION_PHOTOS_ADD_ONLY |
162-
| PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse | NSLocationUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription | PERMISSION_LOCATION |
163-
| PermissionGroup.locationWhenInUse | NSLocationWhenInUseUsageDescription | PERMISSION_LOCATION_WHENINUSE |
164-
| PermissionGroup.notification | PermissionGroupNotification | PERMISSION_NOTIFICATIONS |
165-
| PermissionGroup.mediaLibrary | NSAppleMusicUsageDescription, kTCCServiceMedia |
166-
PERMISSION_MEDIA_LIBRARY |
150+
| Permission | Info.plist | Macro |
151+
|---------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|----------------------------------------|
152+
| PermissionGroup.calendar (< iOS 17) | NSCalendarsUsageDescription | PERMISSION_EVENTS |
153+
| PermissionGroup.calendarWriteOnly (iOS 17+) | NSCalendarsWriteOnlyAccessUsageDescription | PERMISSION_EVENTS |
154+
| PermissionGroup.calendarFullAccess (iOS 17+) | NSCalendarsFullAccessUsageDescription | PERMISSION_EVENTS_FULL_ACCESS |
155+
| PermissionGroup.reminders | NSRemindersUsageDescription | PERMISSION_REMINDERS |
156+
| PermissionGroup.contacts | NSContactsUsageDescription | PERMISSION_CONTACTS |
157+
| PermissionGroup.camera | NSCameraUsageDescription | PERMISSION_CAMERA |
158+
| PermissionGroup.microphone | NSMicrophoneUsageDescription | PERMISSION_MICROPHONE |
159+
| PermissionGroup.speech | NSSpeechRecognitionUsageDescription | PERMISSION_SPEECH_RECOGNIZER |
160+
| PermissionGroup.photos | NSPhotoLibraryUsageDescription | PERMISSION_PHOTOS |
161+
| PermissionGroup.photosAddOnly | NSPhotoLibraryAddUsageDescription | PERMISSION_PHOTOS_ADD_ONLY |
162+
| PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse | NSLocationUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, NSLocationWhenInUseUsageDescription | PERMISSION_LOCATION |
163+
| PermissionGroup.locationWhenInUse | NSLocationWhenInUseUsageDescription | PERMISSION_LOCATION_WHENINUSE |
164+
| PermissionGroup.notification | PermissionGroupNotification | PERMISSION_NOTIFICATIONS |
165+
| PermissionGroup.mediaLibrary | NSAppleMusicUsageDescription, kTCCServiceMedia | PERMISSION_MEDIA_LIBRARY |
166+
| PermissionGroup.sensors | NSMotionUsageDescription | PermissionGroupSensors |
167+
| PermissionGroup.bluetooth | NSBluetoothAlwaysUsageDescription, NSBluetoothPeripheralUsageDescription | PermissionGroupBluetooth |
168+
| PermissionGroup.appTrackingTransparency | NSUserTrackingUsageDescription | PermissionGroupAppTrackingTransparency |
169+
| PermissionGroup.criticalAlerts | UNAuthorizationOptionCriticalAlert | PermissionGroupCriticalAlerts |
170+
| PermissionGroup.assistant | NSSiriUsageDescription | PermissionGroupAssistant |
171+
167172

168173
4. Clean & Rebuild
169174

permission_handler_apple/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ post_install do |installer|
9595
## dart: PermissionGroup.criticalAlerts
9696
'PERMISSION_CRITICAL_ALERTS=1',
9797

98-
## dart: PermissionGroup.criticalAlerts
98+
## dart: PermissionGroup.assistant
9999
'PERMISSION_ASSISTANT=1',
100100
]
101101

0 commit comments

Comments
 (0)