Post

Replies

Boosts

Views

Activity

Reply to Live Activity is starting app in the background while device is locked
[quote='797759022, DTS Engineer, /thread/760711?answerId=797759022#797759022'] Detect the problem as early as possibile and fail/behave in a way that protects your users data and your apps ability of function. For many app, that can simply mean detecting the issue by checking your ability to access a dedicated "check" file, notifying the user of the issue, and then stopping any further action until something changes. Don't try to fix/change ANY of these issues unless you're in the foreground. In nearly every case I've looked at, the actual damage was caused by the app trying to modify/"fix" things, NOT the immediate failure. [/quote] Thanks for the suggestion, in our case the crash is due to our recovery solution, like you mentioned but we're having trouble coming up with a proper fix. Our app relies various services that depend on the file system to operate and we wouldn't want the app to launch without being able to access that information. Due to our usage of the Data protection access level NSFileProtectionCompleteUntilFirstUserAuthentication any access to our entire app sandbox is inaccessible and forces the application to exhibit untestable and bad user experiences. In some cases we're seeing users be logged out due to us being unable to access auth tokens. Couple of questions: Are there other scenarios that may exist where our app could be launched without being user-initiated? Would our issue be better suited for a code-level support ticket since it appears that the issue might be easier to discuss with more context?
Jul ’24