[英]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.