Open cassiosousa opened 4 years ago
It depends on the nature of the data you want to save.
Is it sensitive? Is it huge? Is it structured? Has it to be restored among reinstallations?
Services like Firebase, Parse, iCloud or even a backend, could be used if you are heading to have a more complex platform, with login, multi-channel access (mobile and web).
For structured local persistence, you could go with Realm, CoreData, or even a pure Sqlite (but if you go with Sqlite, I strongly recommend the usage of some wrapper).
For sensitive data, the best choice is going with Keychain.
For non-sensitive and simple structures data, go with UserPreferences or Files in Documents.
Henrique, Great explanation.
I think that to save the data into iCloud is a great idea in this case, besides isn't adding more complexity.
However, I think that to save the locations in keychain is great idea as well, maybe for anybody here might to consider those data are sensitive. The users also could want sync with Icloud.
Now, Let's go to code.
Are you suggest some wrapper to keychain like SwiftKeychainWrapper or keychain-swift?
Take a look at that: https://github.com/kishikawakatsumi/KeychainAccess There are more stars.
IMHO, a bookmark isn't a kind of sensitive data.
I think you can go with a simple approach to start and let to decide later if more privacy is necessary. Remember, even with the UserPreference approach, the data is secure as long as the cellphone is with the user. If he gets stolen, the bookmark from this POC is the last worry he will have.
Henrique,
I started to work at the view of bookmarkLocation. Those corners are giving work :), but it will be rewarding.
Henrique,
I started to work at the view of bookmarkLocation. Those corners are giving work :), but it will be rewarding.
I didn't get it.
Henrique, I started to work at the view of bookmarkLocation. Those corners are giving work :), but it will be rewarding.
I didn't get it.
I'm sorry, 🤦🏻♂️ Explanation:
Create button Bookmark a location
Create action button to bookmark location.
Where go we save that data?
Well, I think should be to save this data on device because we don't have a service like firebase or anything looked. Might we to save with CoreData or anything else like SqlLite?
I wanted help to decide how to implements this Issue.
Thank you.