“Provided schema version 0 is less than last set version 2.” Realm error swift — iOS (Migration solution)

Mr.Javed Multani
Nov 1 · 1 min read

Sometimes while you are using realm and want to change or modify the schema of database realm gives such kind of error and literally developer sucks to find the solution for it.

Here the best solution for version checking and migrate old schema version to new one without delete the database file or app.

First,open AppDelegate file import the realm libraries like:

import Realm            
import…

Keep the story going. Sign up for an extra free read.

You've completed your member preview for this month, but when you sign up for a free Medium account, you get one more story.
Already have an account? Sign in

Mr.Javed Multani

Written by

iOS Developer, Triple graduated, Passionate, Love workout, blogger

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade