[英]how to get googleappid for firebase firestore config?
我正在嘗試創建一個 flutter 應用程序,它連接到 firestore 以存儲和檢索數據。 從 flutter cloud_firestore 插件文檔,我可以看到我需要一些值來配置它。
final FirebaseApp app = await FirebaseApp.configure(
name: 'test',
options: const FirebaseOptions(
googleAppID: '1:79601577497:ios:5f2bcc6ba8cecddd',
gcmSenderID: '79601577497',
apiKey: 'AIzaSyArgmRGfB5kiQT6CunAOmKRVKEsxKmy6YI-G72PVU',
projectID: 'flutter-firestore',
),
);
我知道如何獲取 gcmSenderID、apiKey 和 projectID,但我無法理解如何獲取 googleAppID。
請告知 final Firestore firestore = new Firestore(app: app);
正如@ martin-zeitler建議的那樣,該ID在下載的google-services.json文件中可用。 感謝您指出。
您可以從此鏈接獲取gcmsenderId
在 FirebaseOptions 上將 AppID 重命名為 googleAppID
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.