If my app enter background and a lot of apps run in background , it has a high level of risk to get a sqlite 3 error code 21 when app return foreground. I could not always re-capture the error, however, I think the reason is SwiftData is a singleton which has been delloc by OS when app receive memory warning. Is it possible ?
Please give me some tips to avoid it ?
what should I implement in app delegate methods, such as appDidEnterbackground .
If my app enter background and a lot of apps run in background , it has a high level of risk to get a sqlite 3 error code 21 when app return foreground. I could not always re-capture the error, however, I think the reason is SwiftData is a singleton which has been delloc by OS when app receive memory warning. Is it possible ? Please give me some tips to avoid it ? what should I implement in app delegate methods, such as
appDidEnterbackground
.