ryanfowler / SwiftData

Simple and Effective SQLite Handling in Swift
MIT License
518 stars 93 forks source link

when app enter background then return to foreground in 10 minutes, error #25

Open fealonelei opened 9 years ago

fealonelei commented 9 years ago

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 .