EventKit Calendar Access Appears Blocked Despite Objective-C Access Being Available
- Dominant language
- Perl
- Stars
- 3.9k
- Forks
- 213
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
### Summary
I investigated whether a-Shell can access iOS Calendar data via EventKit using Python and Rubicon-ObjC.
The results suggest that EventKit itself is available and callable from Python inside a-Shell, but calendar authorization cannot be granted. This may indicate that the application is missing the required Calendar privacy usage description(s) in its Info.plist.
### Environment
- a-Shell
- Python 3.13.1
- iOS 26.5
- Rubicon-ObjC available and functioning
### What Works
#### Objective-C Runtime
Python can load the Objective-C runtime:
```python
python import ctypes objc = ctypes.cdll.LoadLibrary("/usr/lib/libobjc.A.dylib") print(objc)
```
Result:
```
text loaded libobjc successfully
```
#### Foundation and EventKit Frameworks
```
python ctypes.cdll.LoadLibrary("/System/Library/Frameworks/Foundation.framework/Foundation") ctypes.cdll.LoadLibrary("/System/Library/Frameworks/EventKit.framework/EventKit")
```
Both frameworks load successfully.
#### EventKit Classes Are Available
```python
EKEventStore
EKEvent
EKCalendar
```
All classes are discoverable through the Objective-C runtime.
#### EventKit Objects Can Be Created
```python
EKEventStore.alloc().init()
```
Creates an EventKit store successfully.
#### Authorization Status API Works
```python
EKEventStore.authorizationStatusForEntityType_(0)
```
Returns:
```
0
```
(Not Determined)
#### Objective-C Completion Blocks Work
Using Rubicon-ObjC:
```python
store.requestFullAccessToEventsWithCompletion_(completion)
```
The completion handler executes successfully, proving that Objective-C blocks are functioning.
### Observed Failure
Authorization request:
```python
store.requestFullAccessToEventsWithCompletion_(completion)
```
Completion callback result:
t```
Granted: False Auth after: 0
```
Authorization status remains unchanged:
```
Before: 0
After: 0
```
No system permission dialog is displayed.
### Additional Findings
- Rubicon-ObjC works correctly.
- Objective-C blocks work correctly.
- EventKit APIs are callable.
- UIPasteboard access works.
- The failure appears to occur specifically at the Calendar authorization stage.
### Hypothesis
a-Shell may be missing one or more required Calendar privacy usage descriptions, such as:
```xml
NSCalendarsUsageDescription
NSCalendarsFullAccessUsageDescription
NSCalendarsWriteOnlyAccessUsageDescription
```
Without these keys, iOS may refuse authorization requests even though EventKit itself is available.
### Why This Would Be Useful
If Calendar permission were available, Python scripts in a-Shell could access:
- Calendar events
- Reminders (where applicable)
- Scheduling workflows
- Automation integrations
- Personal productivity tooling
without requiring Shortcuts as an intermediary.
### Reproduction Script
```python
from rubicon.objc import ObjCClass, ObjCInstance
import time
EKEventStore = ObjCClass("EKEventStore")
store = EKEventStore.alloc().init()
print("Auth before:", EKEventStore.authorizationStatusForEntityType_(0))
def completion(granted: bool, error: ObjCInstance) -> None:
print("Granted:", granted)
print("Auth after:", EKEventStore.authorizationStatusForEntityType_(0))
store.requestFullAccessToEventsWithCompletion_(completion)
time.sleep(10)
```
Observed output:
```
Auth before: 0 Granted: False Auth after: 0
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.