【问题标题】:how to get googleappid for firebase firestore config?如何获取用于 Firebase Firestore 配置的 googleappid?
【发布时间】:2019-01-18 17:55:57
【问题描述】:

我正在尝试创建一个连接到 Firestore 以存储和检索数据的颤振应用程序。从颤动的 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);

【问题讨论】:

标签: firebase google-cloud-firestore flutter


【解决方案1】:

正如@martin-zeitler 建议的那样,该 id 在下载的 google-services.json 文件中可用。 感谢您指出。

【讨论】:

  • 此文件中列出了一些 ID。很高兴知道哪个特定的映射到 googleAppID。
  • 在这个键 "client" 中查找值:[ { "client_info": { "mobilesdk_app_id":
【解决方案2】:

你可以从this link得到gcmsenderId

【讨论】:

    猜你喜欢
    • 2018-12-09
    • 2020-12-04
    • 2018-03-15
    • 2023-02-01
    • 1970-01-01
    • 2018-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多