Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions config/ConfigExample/RemoteConfigViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,32 @@ class RemoteConfigViewController: UIViewController {
let settings = RemoteConfigSettings()
settings.minimumFetchInterval = 0
remoteConfig.configSettings = settings

remoteConfig.add { RemoteConfigUpdate, Error in
NSLog("Received Realtime Signal")
guard Error == nil else {
DispatchQueue.main.async {
self.displayError(Error)
}
return
}

if (RemoteConfigUpdate?.updatedKeys.contains("realtime_rc_changed_params") != nil) {
NSLog("Received realtime_rc_changed_params")
}

self.remoteConfig.activate() { changed, error in
guard error == nil else {
DispatchQueue.main.async {
self.displayError(error)
}
return
}
DispatchQueue.main.async {
self.updateUI()
}
}
}
}

/// Fetches and activates remote config values
Expand Down
46 changes: 20 additions & 26 deletions config/GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,33 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
<string>ca-app-pub-3940256099942544/2934735716</string>
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-3940256099942544/4411468910</string>
<key>CLIENT_ID</key>
<string>1039810801566-jgl63pdueptjd68273smr00gbemki5pg.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.1039810801566-jgl63pdueptjd68273smr00gbemki5pg</string>
<key>API_KEY</key>
<string>AIzaSyAzlj4APqi5S58nFtE52Da0fYBOHA2MhaY</string>
<string>AIzaSyCt4y1e58vCnQ9NBu3VaHOdGtJ0PJu79a4</string>
<key>GCM_SENDER_ID</key>
<string>1039810801566</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.google.firebase.quickstart.ConfigExample</string>
<key>CLIENT_ID</key>
<string>123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com</string>
<key>DATABASE_URL</key>
<string>https://mockproject-1234.firebaseio.com</string>
<key>GCM_SENDER_ID</key>
<string>123456789000</string>
<key>GOOGLE_APP_ID</key>
<string>1:123456789000:ios:f1bf012572b04063</string>
<key>PROJECT_ID</key>
<string>realtimeconfig-donotdelete</string>
<key>STORAGE_BUCKET</key>
<string>realtimeconfig-donotdelete.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<true/>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<true/>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<true></true>
<key>IS_GCM_ENABLED</key>
<true/>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>PLIST_VERSION</key>
<string>1</string>
<key>PROJECT_ID</key>
<string>mockproject-1234</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.123456789000-hjugbg6ud799v4c49dim8ce2usclthar</string>
<key>STORAGE_BUCKET</key>
<string>mockproject-1234.appspot.com</string>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:1039810801566:ios:7a7902c92c2883886cf08f</string>
</dict>
</plist>
5 changes: 3 additions & 2 deletions config/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ target 'ConfigExample' do
use_frameworks!

# Pods for ConfigExample
pod 'FirebaseRemoteConfig'
pod 'FirebaseRemoteConfigSwift', "> 8.12-beta"
pod 'FirebaseRemoteConfig', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'realtime-rc-merge'
pod 'FirebaseRemoteConfigSwift', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'realtime-rc-merge'
pod 'FirebaseAnalytics'

target 'ConfigExampleTests' do
inherit! :search_paths
Expand Down