-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Crash mapbox::sqlite::Exception authorisation denied on iOS with Data Protection enabled #6205
Comments
The SQLite database is created in C++ code that the Objective-C code has no control over, but maybe we can set the attribute on the directory containing it like we do for excluding the database from backups. |
Previously: #4841. |
I've got another crash, with different exception, but I think the cause is the same. |
I'm not interacting with the map or other MapBox APIs while the app is in background. The app dying while in background is a real blocking issue as the app itself won't be wake-up again to receive location updates until the user taps again on the icon. |
For searchability, here’s the crashed thread from the original post:
And from #6205 (comment):
|
We expect that this issue will be resolved by #8125 that is in the Mapbox iOS SDK as of 3.5.0 beta 2. I'll leave this issue open for tracking until we can collect more evidence that the sqlite errors noted here no longer occur. |
Platform: iOS
Mapbox SDK version: 3.3.4
Steps to trigger behavior
CoreLocation
.MGLMapView
instance visible that appears as soon as you launch the app.Expected behaviour
The app will be relaunched in background by the system as soon as a location update is available. The device can be locked and the data will be encrypted.
The app should be able to run anyway in background.
Actual behaviour
The app crashes as with a
mapbox::sqlite::Exception
authorization denied.I suppose that it is caused by MapBox trying to access a sqlite database that is present but not accessible as Data Protection kicks in.
If you really need to be always able to access the database, you should consider to create the file with no file protection specifying
FileProtectionType.none
:It would even better if you check if the file is available and use it only if the app is in foreground, so its content stays encrypted.
mapbox-crashlog.txt
The text was updated successfully, but these errors were encountered: