接續上次講嘅 Vue PWA + Docker,今次係要加多少少功能,加個 Firebase Push Notifications,中文係咪叫「推送短訊」? 雖然今時今日嚟講係小功能,不過由於有 Windows、macOS、Android、同埋 iOS,仲有 Chrome、Edge Chromium 等等不同嘅 browser,都算幾麻煩㗎,我為咗減少工作量,淨係針對 Chrome 做測試,間唔中用埋 Edge Chromium 嚟証實有冇搞錯。
Firebase + APNs Authentication Key
最近個 app 上咗 Apple App Store 之後就收唔倒 Firebase 嘅 Push Notifications,我知道 APN Cert 有分 Development 同 Production,我隻 app Development 就無問題,但係 Production 就整嚟整去佢都係收唔倒,搞搞下,我就諗,不如試下 APNs Authentication Key,用佢就唔使分 Development 定係 Production 啦!一於試下:
macOS >> Certificate Signing Request 步驟
做 iPhone developer 經常要搞好多種不同嘅 Certs,尢其係喺 Apple Developer Console 裡面,有好多唔同嘅字眼,又要你提供好多唔同嘅 Certs,啲 Certs 之內又有好多細項,填到你失暈, 😐
Xamarin Push Notification (用 Firebase 經 APN 發至 iPhone)
蘋果一向都唔係咁歡迎人哋答順風車嘅,所以,要 send notification 俾 iPhone 就較為複雜:
- 首先,你要俾錢做 developer
- 去 Developer Console 整張 APN Cert(APN 係 Apple Push Notification)
- 留意,張 Cert 有分 Development 同 Production,兩張 Certs 唔互通
- 下載張 Cert
- 轉成 .p12 格式
- 上載到 Firebase Console
Continue reading “Xamarin Push Notification (用 Firebase 經 APN 發至 iPhone)”
Visual Studio for Mac 開唔倒 GoogleService-Info.plist
pfSense IKEv2 Mobile Clients
張大圖 (Featured Image)差不多說明咗今次嘅 lab,唯一嘅差別係:我用一隻 VPN Hub 將兩個 branch networks 接駁,兩個 networks 互通,然後我再由個 Mobile User 以 IKEv2 駁去隻 VPN Hub,於是 Mobile Users 就可以 access 兩個 networks。VPN Hub 喺上一篇講咗,今篇講用 Windows 10 同 macOS 經 IKEv2 駁去隻 pfSense VPN Hub。
KeyStore Explorer 自製 Certificate
事沿 Firebase Authentication 要我提供 SHA certificate fingerprints,之前我係用 Linux scripts,今次諗下不如搵隻 GUI 免費軟件試下,一來方便啲,二來可以集中處理我日積月累嘅 certificates,搵下搵下就選咗 KeyStore Explorer。KeyStore Explorer 有 Windows 同 OSX 版,對我來講(Mac同 PC 兩邊走)就非常方便。當然,你部機一定要安裝 JAVA。
Firebase Cloud Messaging + VWG
Firebase Cloud Messaging/Web Push/Web API/Service Worker 好多名詞,😂
Firebase Cloud Messaging (FCM) 前身係 Google Cloud Messaging (GCM),Google 買咗 Firebase 之後將 GCM 併入 Firebase 改名為 FCM,FCM 可以推送你嘅 notifications 去 iOS/Android devices 同埋 Web Browser。iOS 同 Android 收 notification 一啲都冇出奇,因為自從有 smart phone 就好似有 notification 哩樣嘢,我要玩嘅係:用 VWG (C#)喺 server 推送 notification 俾 desktop computers’ Web Browsers,好新鮮嘅技術,2015 年底先至有,目前好似淨係 Chrome 同 Firefox 有此功能,Safari 都未跟上。
Visual WebGUI + Firebase Authentication
今日係 2016 Aug.,Google 仲未推出 .NET 版嘅 Firebase Authentication SDK,我又急住要用,唯有試下自己動手,為咗增加難度(我冇得揀 🤗),我要喺 Visual WebGUI 結合 Firebase Authentiction!
Google Firebase Authentication 初試啼聲
Firebase 俾 Google 買咗之後,Google 最近結合 Google Cloud Messaging 重新推出,叫 Firebase Cloud Messaging,增多咗好多功能,我係 Google 粉絲,又有用開 Google Cloud Services 當然要幫襯下,我打算用兩項:Authentication 同 Cloud Messaging,今次就先講講 Authentication。