I have a RLMObject in my Objective-c. I defined a property like:
@property (assign, nonatomic) NSString *name;
@property (assign, nonatomic) NSString *code;
@property (assign, nonatomic) int day;
@property (assign, nonatomic) int status;
But now, I need change the type of property code to int like:
@property (assign, nonatomic) int code;
If I change this, then when I try access to the model I get an error showing that type was NSString and now int.
How can I change the property without reinstall my app?
You need to perform a migration so the data in the database fits the new data model. Please check the Migrations section of the Realm documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With