stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.68k stars 1.56k forks source link

iPhone xs Max background Operation not permitted #883

Closed leekey1 closed 3 years ago

leekey1 commented 5 years ago

Build Information

let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! do{ self.db = try Connection("(path)/test.sqlite3") createGeoLocationTableIfNotExists() }catch let err{ print("sqlite db conntect failed: (err)") }

log 2019-02-26 16:01:21.772554+0800 test[3572:1023842] [logging] os_unix.c:37220: (1) seekAndRead(/var/mobile/Containers/Data/Application/7B491B30-5794-4224-A648-1A589BE6734F/Documents/test.sqlite3) - Operation not permitted

in foreahead, it works ok, but in background after 3 minute not working. I use in location update . but same code run ok in iphone 6 plus in simulator both run ok

Someone have a clue to solve it?

thanks

nathanfallet commented 3 years ago

Please ask on StackOverflow for this kind of questions (we are tracking bugs on GitHub)