Ancestors

Toot

Written by Christian Selig on 2025-01-08 at 16:43

Has anyone hit this bizarre behavior with app groups and Live Activities? Write to the shared app group in the init, and the Live Activity just silently dies forever, no error message. Any other directory and it works fine. Am I holding it wrong?

Code: https://gist.github.com/christianselig/09cbd7a92ee2912ae03f81b828c0f9e0

=> View attached media

=> More informations about this toot | More toots from christianselig@mastodon.social

Descendants

Written by Mega “Byte” Matt :clippy: on 2025-01-08 at 17:15

@christianselig app groups have been a huge pain for me in macOS Sequoia, since they now want you to use the same prefix as iOS—sometimes.

But that’s my rant. Can you time how long it takes to write to it from the Live Activity? Maybe it times out because it has trouble writing to it.

=> More informations about this toot | More toots from megamatt@mastodon.online

Written by Christian Selig on 2025-01-08 at 17:56

@megamatt Oh that's a weird change. And they're right about the same amount of time to write to unfortunately :(

=> More informations about this toot | More toots from christianselig@mastodon.social

Written by Greg Gardner on 2025-01-08 at 17:19

@christianselig I'm definitely getting a lot of recent reports of LiveActivities widgets dying immediately but I'm only reading from an App Group container. Nothing I can find useful in the logs. Seems like they might have added more strict memory or time limitations on them recently. 🤷‍♂️

=> More informations about this toot | More toots from gregggreg@sfba.social

Written by Jordan Morgan on 2025-01-08 at 17:52

@christianselig Does this cause it to go over the 4kb limit maybe?

=> More informations about this toot | More toots from jordanmorgan@mastodon.social

Written by Christian Selig on 2025-01-08 at 17:59

@jordanmorgan That's just the payload for the LA attributes update thingy isn't it? Weirdly I'm not even touching that for this, it's just the initial content state won't even display, and I don't think writing to app group versus documents would take more memory at least

=> More informations about this toot | More toots from christianselig@mastodon.social

Written by Kyle Bashour on 2025-01-08 at 18:28

@christianselig Does it die without force trying? (e.g., is it crashing?) Does the app extension have the app group capability?

=> More informations about this toot | More toots from kylebshr@mastodon.social

Written by Christian Selig on 2025-01-08 at 18:41

@kylebshr Nothing crashes, no errors, no anything. It's bizarre. The extension does have the app group capability (it even succeeds in writing/reading, in fact reading won't cause this behavior, only writing does)

=> More informations about this toot | More toots from christianselig@mastodon.social

Written by Jonathan Willing on 2025-01-09 at 07:51

@christianselig By “init”, do you mean a side effect attached to one of the SwiftUI view inits in your Live Activity?

=> More informations about this toot | More toots from willing@mastodon.social

Written by Christian Selig on 2025-01-09 at 12:43

@willing not the SwiftUI view but in an initializer for the widget phase. Either in the widget itself, or the WidgetBundle’s unit (or main() if you prefer)

=> More informations about this toot | More toots from christianselig@mastodon.social

Written by Jonathan Willing on 2025-01-09 at 23:51

@christianselig Interesting. I experimented with this in the past in a feeble attempt at trying to measure successful remote live activity update receipts, but ended up giving up trying to write from the extension as I didn’t have luck with it.

=> More informations about this toot | More toots from willing@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113793735108715526
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
291.283656 milliseconds
Gemini-to-HTML Time
1.655604 milliseconds

This content has been proxied by September (3851b).