Page MenuHomePhabricator

Migrate data persistence from Yap database to CoreData
Closed, ResolvedPublic

Description

In the 5.2 and 5.3 releases we've migrated our local data layer from the file system to a database fronted by the Yap Database project. However, in supporting our widget and notifications we believe that Yap Database will not be a sustainable interface, particularly for multi-threading cases. To provide a more stable long term data layer we will transition to the CoreData data persistence interface provided by iOS and remove our use of Yap Db.

For the end user there should be no difference in behavior of the app. Therefore the acceptance criteria will be our standard regression suite, particularly cases related to updating app versions and saving pages.

Event Timeline

@JMinor I pulled the build from beta - there were some 100% repro-able crashers caused by the CocoaPods --> Carthage move that Monte found and I fixed. I also updated the migration to not rely on YapDatabase which allows us to remove the framework entirely from the project (it was our largest framework at 15 MB).

Also, I updated the migration to include the feed. Previously the feed was migrated the same way it was from pre-yap to yap - deleted entirely and re-downloaded. This caused the hangs on launch for some users as 1. they could have spotty connections 2. there were bugs which caused completion blocks to never fire. We eliminate any risk of that by not requiring any network connectivity for the feed migration.

These changes are up for review here: https://github.com/wikimedia/wikipedia-ios/pull/1089