+ 1
Saving data in iOS.
How many way are there to save data in iOS.
3 Antworten
+ 1
there are three ways you can story data
1. in app delegate , this is preferred if you have to store few flags or variable
2.NSDefault is also used to store data and data is saved in info.plist in normal form.
point that you have to take care while using is it should not be overused as it can slow the performance second it is not safe as data is saved normally without any encryption. keychain could be alternate to NSDefault as data is stored as encrypted form.
3. making dedicated object for data . for doing that you can make data object class
PS : only ns type can be stored in NSDefault . you can't store object
0
Yes You can save data permanently . Using NSUserDefaults
0
Also you could save data to a file to 'Documents' directory using writeToFile method