Solution of Realm Migration Error Code 10
When you make a change on model you have two options. You can delete app from simulator and there will not a problem after running again but if you already has shipped your app
to apple store this option is not acceptable for you. The other option is using migration.
This code is a quotation from realm.io
Suppose we have the following Person model:
class Person: Object { @objc dynamic var firstName = "" @objc dynamic var lastName = "" @objc dynamic var age = 0 }