+ 1

Saving data in iOS.

How many way are there to save data in iOS.

25th Aug 2016, 2:26 PM
Aung Thuya
Aung Thuya - avatar
3 Respostas
+ 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
30th Aug 2016, 1:27 PM
Inder Mishra
Inder Mishra - avatar
0
Yes You can save data permanently . Using NSUserDefaults
26th Aug 2016, 6:00 PM
Prashant
Prashant - avatar
0
Also you could save data to a file to 'Documents' directory using writeToFile method
2nd Sep 2016, 2:56 PM
Aleksandr Budnik
Aleksandr Budnik - avatar