File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ bool HasOpenSystemPreferencesDialog() {
256
256
(type == " calendar" ) ? EKEntityTypeEvent : EKEntityTypeReminder;
257
257
258
258
switch ([EKEventStore authorizationStatusForEntityType: entity_type]) {
259
- case EKAuthorizationStatusAuthorized:
259
+ case EKAuthorizationStatusWriteOnly:
260
+ case EKAuthorizationStatusFullAccess:
260
261
return kAuthorized ;
261
262
case EKAuthorizationStatusDenied:
262
263
return kDenied ;
Original file line number Diff line number Diff line change
1
+ const { askForCalendarAccess, getAuthStatus } = require ( './index.js' )
2
+
3
+ const status = getAuthStatus ( 'calendar' )
4
+ console . log ( `Current access status: ${ status } ` )
5
+
6
+ askForCalendarAccess ( ) . then ( ( status ) => {
7
+ console . log ( `Access to Contacts is ${ status } ` )
8
+ } )
You can’t perform that action at this time.
0 commit comments