I’m encountering an issue with my iOS app that uses Realm for local data storage. Recently, my app started throwing the following error: “Opening Realm files of format version 23 is not supported by this version of Realm”
Here are some details about my setup:
Realm Swift version: 10.25.2
iOS version: 84%iOS 17 ; 12%iOS 16; 3%iOS 15 and Other (2)
Xcode version: 17.0
enter image description here
Context:
I have not updated the Realm Swift library recently. The app has been using version 10.25.2 for a while.
After updating my app to a new version (but without changing the Realm library), some users reported this issue.
I verified that I didn’t open the Realm files with any other tools like Realm Studio that might have upgraded the file format.
Temporary Fix Attempted:
I tried deleting the existing Realm file and initializing a new one. This resolves the issue temporarily and the app functions normally. However, this approach results in the loss of all previously saved user data, making it an impractical long-term solution.
My Questions:
How could the Realm file format version have been upgraded to 23 without updating the Realm library?
Are there any known issues or scenarios where this could happen?
Any insights or suggestions would be greatly appreciated. Thank you!
Thạch Châu Viết is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.