
iOS 12: Core Data External Binary Data Storage Becomes Corrupt - epaga
https://mjtsai.com/blog/2018/10/01/ios-12-and-core-data-external-binary-data-storage/
======
vbezhenar
Golden rule: don't upgrade until first sevice pack. Release date set by
management, so you have to ship with whatever bugs are left. But patch is
usually developed with more timely approach.

~~~
Razengan
I reported some bugs as early as the 2nd and 3rd Developer Previews of macOS
Mojave, but they’re still not fixed in the final release.

~~~
protomyth
I’ve been reporting the same bugs in Finder since Mavericks, don’t get your
hopes up that they will be fixed.

~~~
Razengan
You’d think Apple would at least want to take care of any visual
inconsistencies, specially in one of the major features which are touted as
the big incentives for upgrading. There are still some UI elements here and
there which are out of place in Dark Mode at best, or almost illegible at
worst.

Such lax approach to UX polish has traditionally been associated with
Microsoft, not Apple.

------
robin_reala
OK, I’m not an iOS developer. Can anyone explain what this means?

~~~
saagarjha
Core Data is an object persistence framework for iOS that essentially wraps
around SQL. It looks like it’s losing data when the external storage option is
enabled.

~~~
mcintyre1994
What does external storage refer to here? I don't think iOS has extendable
storage does it? So is it eg. iCloud?

~~~
delta1
It appears to be "external" to the sqllite database

[https://forums.raywenderlich.com/t/where-is-allows-
external-...](https://forums.raywenderlich.com/t/where-is-allows-external-
storage-data-actually-stored/18905)

------
mariusmg
The Sqlite database becomes corrupt ?

~~~
okket
I doubt it. The data is stored externally in the filesystem and referenced in
the SQLite database. I guess something happens in the filesystem or during
every second storing process, so that the metadata references become out of
sync.

~~~
londons_explore
I'd guess it's because someone isn't accessing it from a single thread, or
isn't following the lifecycle requirements for storing data in an asynchronous
datastore.

You _absolutely_ have to wait for the completion event for a write before
issuing another write to the same key for example.

------
bsaul
What are the foundationDB guys doing ? After they got bought I was hoping so
much that ios would get a brand new storage technology that really works well
using their famous testing environment.

I don't know what's wrong with core data because throughout the years it's
been one of those technology that are both unconvenient AND regularely
unreliable.

~~~
aaaaaaaaaab
FoundationDB on an embedded device? That's certainly an unorthodox approach,
but I don't see the use case...

On why Core Data is inconvenient: it's as inconvenient as any ORM framework in
general.

[http://blogs.tedneward.com/post/the-vietnam-of-computer-
scie...](http://blogs.tedneward.com/post/the-vietnam-of-computer-science/)

~~~
bsaul
Not the tech itself, but the people that built foundationDB surely know a
thing or two about reliability and building a modern DB api.

Also, you're mentionning ORM, but relying on a relationnal database as the
underlying storage layer for objects doesn't have to be.

