Since iOS 10 shipped we’ve been getting some bug reports from developers using 
our framework, that indicate that we’re unable to access files. (The errors are 
from SQLite, but they imply that SQLite can’t open or access the database 
file.) It seems that the OS’s behavior has changed; maybe it’s quicker to lock 
access to app files.

I’m not sure what to do about working with SQLite databases on iOS, in apps 
that may need to run in the background (e.g. to handle push notifications or 
geofencing.) The evidence is that the default protection (complete-unless-open, 
IIRC) is insufficient, probably because SQLite may have to open or create one 
of its private side files (the -wal or -shm file.) Since SQLite is a 3rd party 
library, I don’t know when it will choose to open or close files, and I 
shouldn’t hardcode anything based on observations of its behavior.

I’ve also heard from one developer that if the app launches in the background 
(to receive a push notification) while the device is locked, it doesn’t have 
access to any files. But I don’t understand how an app can possibly do anything 
useful in in response if it has no access to either the UI or the filesystem!

Clearly there are apps out there that use SQLite, and apps that work correctly 
when launched in the background to handle push notifications. Do they all 
loosen their file protection settings to 
complete-until-first-user-authentication? I can do that, but I’m somewhat 
reluctant to since it reduces data security.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to