xCode 10 and SQLite

Our app do not work anymore on iOS 9 and 10 since we have migrated to xCode 10 (mandatory now to load an app on the store) . I was working like a charm on xCode 9..

We believe that this is due to a bug in xCode 10 when accessing SQLite. It occurs only on iOS 9 and 10 but works well on iOS 12.


Here are the symptoms:

Using libsqlite3.tdb (apple binding to sqlite3), could'not write to sqlite database in application documnet directory.

Error code returned is SQLITE_IOERR (disk error).

Database file is created correctly but is zero sized.

Same code is functioning correctly when used on IOS 12.1.

.

And the configuration:

XCODE : 10.1

Target SDK : 9.5 or 12.1

Target Device : IOS 9.3, 10.1

Same code is functioning correctly when used on IOS 12.1.


Has anybody got the same problem ? Any idea for a workaround ? We are currently thinking about loading a native version of SQLite in the app instead of using the apple version. (The app is Avalon Offshore. It makes an intensive use of SQLite)


Thanks,

Phil

Replies

No, I've not met this problem.


So, just a suggestion. If I did, I would look at a thread issue: you expect something to occur before other thing, it did so in XCode 9 and no more in XCode 10.

A way to check is to temporarilly introduce some timeouts (if you can) in your code, to make sure some action cn be completed before another starts.


Once you have found the cause, may search for a workaround.


Notre: if that is the cause of the problem, that means that you've used implicitely undocumented behavior on how actions are scheduld.

Hi, thanks for the suggestion....

We have loaded SQLite in the app, so that we do not use anymore the embedded version and it works again.