GenericLocalPersistence
GenericLocalPersistence is a clean and easy-to-use code that is useful for integrating local storage like,
- UserDefaults
- PList
- Keychain
Read more from MEDIUM
Installation
From CocoaPods
First, add the following line to your Podfile
Usage of UserDefault
import GenericLocalPersistence
Set & Get value from User Default
Usage of Plist
import GenericLocalPersistence
Set & Get value from plist file
Replace "userDetails" with custom name for creating plist file to store data
Usage of KeyChain
import GenericLocalPersistence
Set & Get value from KeyChain file
Store password value
Store username value
NOTE
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.