I've been using Realm for more than a year on a specific app & it has been in the AppStore for just as long. Everything has been fine until a few days ago when a newly approved & released build into the AppStore now crashes for ALL users after updating & attempting to open the app.
Users are saying the only way to fix this is by deleting the app from the device & doing a fresh install. That's a catastrophe. Luckily we save user data/progress on a server.
This started happening immediately after Realm was updated by using the pod update
command in terminal.
By installing a previous build from TestFlight, opening it at least once & then building & running the app on the device with the old TestFlight build from Xcode produces a very specific crash error in the log when initializing an instance of Realm:
"Opening Realm files of format version 20 is not supported by thisversion of Realm"
Note, I did NOT touch or alter the code in any way after pods were updated.
Here's how the Realm configuration currently looks like (& has looked like for the past 6 months):
let config = Realm.Configuration(schemaVersion: 30, migrationBlock: { migration, oldSchemaVersion in if oldSchemaVersion < 30 { migration.deleteData(forType: CategoryRealmModel.className()) migration.deleteData(forType: CourseRealmModel.className()) }})Realm.Configuration.defaultConfiguration = config
Would really appreciate any ideas on what can be done. I need to release a new build that will not crash when updated on top of any older versions.