Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Propagate Remote Config updates in real time
Search
d_date
November 14, 2018
Programming
1.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Propagate Remote Config updates in real time
d_date
November 14, 2018
More Decks by d_date
See All by d_date
TCA Practice in 5 min
d_date
2
1.9k
waiwai-swiftpm-part2
d_date
3
600
わいわいSwift PM part 1
d_date
2
490
What's new in Firebase 2021
d_date
2
1.6k
CI/CDをミニマルに構築する
d_date
1
630
Swift Package centered project - Build and Practice
d_date
20
17k
How to write Great Proposal
d_date
4
2.4k
Thinking about Architecture for SwiftUI
d_date
8
2.5k
Integrate your app to modern world in Niigata
d_date
0
760
Other Decks in Programming
See All in Programming
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
450
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.8k
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
140
業務時間外もAIに働いてもらう話
colorful12
3
10k
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2k
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
450
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
290
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
150
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
120
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
590
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
220
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
310
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
Embracing the Ebb and Flow
colly
88
5.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
270
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
RailsConf 2023
tenderlove
30
1.5k
How GitHub (no longer) Works
holman
316
150k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Transcript
1SPQBHBUF3FNPUF$POH VQEBUFTJOSFBMUJNF 2018/11/14 Firebase Summit 2018 ใࠂձ @Google Daiki Matsudate
/ @d_date
%BJLJ.BUTVEBUF @d_date
1SPQBHBUF3FNPUF$POH VQEBUFTJOSFBMUJNF
None
/&8 3FNPUF$POHUSJHHFST
functions.remoteConfig.onUpdate(versionMetadata => {});
exports.showConfigDiff = functions.remoteConfig.onUpdate(versionMetadata => { return admin.credential.applicationDefault().getAccessToken() .then(accessTokenObj => {
return accessTokenObj.access_token; }) .then(accessToken => { const currentVersion = versionMetadata.versionNumber; const templatePromises = []; templatePromises.push(getTemplate(currentVersion, accessToken)); templatePromises.push(getTemplate(currentVersion - 1, accessToken)); return Promise.all(templatePromises); }) .then(results => { const currentTemplate = results[0]; const previousTemplate = results[1]; const diff = jsonDiff.diffString(previousTemplate, currentTemplate); console.log(diff); return null; }).catch(error => { console.error(error); return null; }); });
1 4VCTDSJCFDMJFOUBQQ JOTUBODFTUPBO'$.UPQJD
extension AppDelegate : MessagingDelegate { func messaging(_ messaging: Messaging, didReceiveRegistrationToken
fcmToken: String) { Messaging.messaging().subscribe(toTopic: "PUSH_RC") { error in print("Subscribed to PUSH_RC topic") } } }
2 $SFBUFBGVODUJPOUPTFOEBO '$.QJOHPOUFNQMBUFVQEBUFT
import * as functions from 'firebase-functions'; import * as admin
from ‘firebase-admin'; admin.initializeApp(); exports.pushConfig = functions.remoteConfig.onUpdate(versionMetadata => { // Create FCM payload to send data message to PUSH_RC topic. const payload: admin.messaging.MessagingPayload = { data: { 'CONFIG_STATE': ‘STALE' } }; const options: admin.messaging.MessagingOptions = { contentAvailable: true } // Use the Admin SDK to send the ping via FCM. return admin.messaging() .sendToTopic('PUSH_RC', payload, options) .then(resp => { console.log(resp); return null; }); });
{ "aps" : { "content-available" : 1 }, }
None
None
None
None
3 4FUUIF3FNPUF$POH TUBUFPOUIFDMJFOU
// Silent push notification func application(_ application: UIApplication, didReceiveRemoteNotification userInfo:
[AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { print("Entire message \(userInfo)") if let _ = userInfo["CONFIG_STATE"] as? String { UserDefaults.standard.set(true, forKey: "CONFIG_STALE") } completionHandler(.newData) }
4 'FUDIUIF3FNPUF$POH VQEBUFTPOBQQTUBSUVQ
func fetchConfig() { welcomeLabel.text = remoteConfig[loadingPhraseConfigKey].stringValue var expirationDuration = 43200
if remoteConfig.configSettings.isDeveloperModeEnabled || UserDefaults.standard.bool(forKey: "CONFIG_STALE") { expirationDuration = 0 UserDefaults.standard.set(false, forKey: "CONFIG_STALE") } remoteConfig.fetch(withExpirationDuration: TimeInterval(expirationDuration)) { (status, error) -> Void in let alertAction: UIAlertAction = .init(title: "OK", style: .default, handler: nil) if status == .success { print("Config fetched!") self.remoteConfig.activateFetched() } else { print("Config not fetched") print("Error: \(error?.localizedDescription ?? "No error available.")") } self.displayWelcome() } }
%&.0
"OBQQDBOGFUDIBNBYJNVNPGUJNFTJOBNJOVUF $BDIJOHBOEUISPUUMJOH
٥3FNPUF$POHUSJHHFST/08"7"*-"#-& ٥4JMFOU1VTI/PUJDBUJPOXJUIˎDPOUFOUBWBJMBCMFˏ ٥&OBCMFSFBMUJNFVQEBUFXJUI3FNPUF$POHBOE'$. 3FDBQ
٥1VTIJOH6QEBUFTUP:PVS"QQ4JMFOUMZ IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPOVTFSOPUJDBUJPOTTFUUJOH@VQ@B@SFNPUF@OPUJDBUJPO@TFSWFS QVTIJOH@VQEBUFT@UP@ZPVS@BQQ@TJMFOUMZ ٥1SPQBHBUF3FNPUF$POHVQEBUFTJOSFBMUJNF IUUQTSFCBTFHPPHMFDPNEPDTSFNPUFDPOHQSPQBHBUFVQEBUFTSFBMUJNF 3FTPVSDFT
None