The prerequisit to this tutorial is the CocoaPods tutorial. However (as of November 8-th 2016) that tutorial is almost useless. It is written in Swift 2.0, but that’s a minor problem. The bigger one is that it uses Alamofire 2 and the current version of Alamofire is 4 which is completely redesigned.
it looks as if all the parameters that are on firebase are in open text to the app. is that right? doesn’t that open it up to hacking?
I suppose I could manually encrypt the variable names and their default values, but is there a neater way?
I’m also wondering if apple now has all of these same features in their CloudKit… one thing I’d like is to save all the user defaults in the cloud, in an encrypted, safe form, free from hacking, but readily available to users…
Perfect tutorial. Everything is loud and clear and working!
Many thanks for that! I really liked your explanations on everything and the examples that you had.
Keep up the good work!
I noticed an issue where if you have a key that exists locally in the plist.
e.g somekey : localvaluefromplist
After you refresh with the server, if the server doesn’t have that key “somekey”, the localvaluefromplist will be cleared out
You would think that if the key doesn’t exist on server, the local value should be used. Unless the key “somekey” was explicitly defined on the server with a blank value but that is not the case, after fetching from server, all non defined keys get their values assigned to blank even if they exist in the local default configuration loaded from plist
Hmm… the local value is used if the server doesn’t have that key. You might want to double-check your implementation, and/or make sure you didn’t try to delete a value on the server by changing it’s value to “(Empty String)” instead of “(No Value)”
You are right, it does work as described. The local value is used if the server doesn’t have that key.
I noticed my setDefaultsFromPlistFileName never loaded the plist due to a bad filename. Although there are no errors/exceptions thrown with a wrong plist file, so I guess one has to watch out for that.
Oh, that’s good to know. I’ll ask the team to either raise an exception or print a big ol’ warning message if the plist isn’t found. Thanks for catching that!
This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]