Post

Replies

Boosts

Views

Activity

Comment on Unable to Write to UserDefaults from Widget Extension Despite Correct App Group Configuration
Do you have any alternative suggestions for tracking live activity events? I've been consistently running into issues with live activity updates not reflecting properly on the device, and I'm starting to hit a dead end with analytics events—I'm running out of ideas. It’s important to understand how often the updates to live activities fails when the feature is rolled out to a larger audience. We can only reliably measure the success of the experiment if updates are reflected accurately.
3w
Comment on Unable to Write to UserDefaults from Widget Extension Despite Correct App Group Configuration
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “testFromWidget.txt” in the folder “B6DF24C2-5A7A-4801-9A4E-0AC194224369”." UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/B6DF24C2-5A7A-4801-9A4E-0AC194224369/testFromWidget.txt, NSURL=file:///private/var/mobile/Containers/Shared/AppGroup/B6DF24C2-5A7A-4801-9A4E-0AC194224369/testFromWidget.txt, NSUnderlyingError=0x1078790e0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
Aug ’25
Comment on Unable to Write to UserDefaults from Widget Extension Despite Correct App Group Configuration
Apologies - Yes I'm using Widget extensions to display Live Activities. In debugging, I saw that the widget can read from the shared container as expected, but writes are failing. I'm trying to capture analytics events when a Live Activity starts and updates. My initial approach was to write these events to UserDefaults or a file in the shared container, and have the main app send them to our analytics library. Do you have any suggestions for a more reliable way to handle this?
Aug ’25