Group Group Group Group Group Group Group Group Group
raywenderlich.com Forums

Firebase Remote Config Tutorial for iOS

In this Firebase Remote Config tutorial for iOS, you'll learn how to make changes to your iOS app on the fly without resubmitting to the App Store.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/872-firebase-remote-config-tutorial-for-ios
1 Like

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.

Remote config is one of my favorite new features introduced in the newly revamped Firebase. Thanks for the tutorial.

You’re welcome! Glad you liked it.

A very good tutorial. thanks
I read it. English s a bit problem for me.
Is there any Objective C library for Firebase Remote config. ?

Very nice tutorial! Easy to read and follow, no errors! Thanks.

@arpit723 Yes, there’s an Objective C library. It works very similar to the Swift library – but the syntax is obviously quite different. :]

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!

Thanks! Glad you liked it!

Great tutorial ! There is an error in the code when fetching the remote config though:

guard error != nil else {

should be

guard error == nil else {

Oh, good catch, @lory. I’ll go fix that…

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!

Thank you very much for reply.

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! :]