Difference between revisions of "Firebase 教學說明"
From AdLocus
m (→為Firebase 加入 APN 驗證金鑰) |
m (→為Firebase 加入 APN 驗證金鑰) |
||
Line 14: | Line 14: | ||
== 為Firebase 加入 APN 驗證金鑰 == | == 為Firebase 加入 APN 驗證金鑰 == | ||
* 上傳您的APNs身份驗證密鑰 | * 上傳您的APNs身份驗證密鑰 | ||
− | ** | + | ** 將您的APNs身份驗證密鑰上載到Firebase。如果您還沒有APNs身份驗證密鑰,請參閱[https://firebase.google.com/docs/cloud-messaging/ios/certs 使用FCM配置APNs] |
** 在Firebase控制台的項目內部,選擇齒輪圖標,選擇Project Settings ,然後選擇Cloud Messaging選項卡 | ** 在Firebase控制台的項目內部,選擇齒輪圖標,選擇Project Settings ,然後選擇Cloud Messaging選項卡 | ||
** 在iOS應用配置下的APNs身份驗證密鑰中 ,單擊“上載”按鈕 | ** 在iOS應用配置下的APNs身份驗證密鑰中 ,單擊“上載”按鈕 | ||
** 瀏覽到保存密鑰的位置,選擇它,然後單擊“ 打開” 。添加密鑰的密鑰ID(可在[https://developer.apple.com/membercenter/index.action Apple Developer Member Center]中的證書,標識符和配置文件中找到),然後單擊Upload | ** 瀏覽到保存密鑰的位置,選擇它,然後單擊“ 打開” 。添加密鑰的密鑰ID(可在[https://developer.apple.com/membercenter/index.action Apple Developer Member Center]中的證書,標識符和配置文件中找到),然後單擊Upload | ||
− | |||
− |
Revision as of 11:21, 27 August 2020
Contents
加入 Firebase 專案
- AdLocus 登入Firebase控制台
- 建立專案後依照指示將 Firebase 新增至您的 iOS 應用程式即可開始使用
- 選擇 iOS 版本
- 註冊應用程式
- 下載設定檔
- 將您剛才下載的 GoogleService-Info.plist 檔案移到 Xcode 專案的根目錄中,並將該檔案新增到所有目標中
- 新增 Firebase SDK
- Google 服務會用 CocoaPods 來安裝和管理依附元件。請開啟終端機視窗,然後前往應用程式的 Xcode 專案位置
- 新增初始化程式碼
- 如要在應用程式啟動時連線至 Firebase,請將下方的初始化程式碼加入主要 AppDelegate 類別
為Firebase 加入 APN 驗證金鑰
- 上傳您的APNs身份驗證密鑰
- 將您的APNs身份驗證密鑰上載到Firebase。如果您還沒有APNs身份驗證密鑰,請參閱使用FCM配置APNs
- 在Firebase控制台的項目內部,選擇齒輪圖標,選擇Project Settings ,然後選擇Cloud Messaging選項卡
- 在iOS應用配置下的APNs身份驗證密鑰中 ,單擊“上載”按鈕
- 瀏覽到保存密鑰的位置,選擇它,然後單擊“ 打開” 。添加密鑰的密鑰ID(可在Apple Developer Member Center中的證書,標識符和配置文件中找到),然後單擊Upload