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
=> More informations about this toot | More toots from christianselig@mastodon.social
@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
@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
@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
@christianselig Does this cause it to go over the 4kb limit maybe?
=> More informations about this toot | More toots from jordanmorgan@mastodon.social
@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
@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
@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
@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
@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
@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 This content has been proxied by September (3851b).Proxy Information
text/gemini