简体   繁体   中英

how to get googleappid for firebase firestore config?

I am trying to create a flutter application which connects to firestore to store and retrieve data. from the flutter cloud_firestore plugin docs, i can see that i need some values to configure it.

final FirebaseApp app = await FirebaseApp.configure(
    name: 'test',
    options: const FirebaseOptions(
           googleAppID: '1:79601577497:ios:5f2bcc6ba8cecddd',
           gcmSenderID: '79601577497',
           apiKey: 'AIzaSyArgmRGfB5kiQT6CunAOmKRVKEsxKmy6YI-G72PVU',
           projectID: 'flutter-firestore',
        ),
    );

I know how to fetch the gcmSenderID, apiKey and projectID, but i am not able to understand how to get the googleAppID.

Please advice final Firestore firestore = new Firestore(app: app);

as @martin-zeitler suggested, the id is availabile in the downloaded google-services.json file. thanks for pointing it out.

You can get gcmsenderId from this link

在此处输入图片说明

Login to firebase --> cog wheel next to Project Overview --> Project settings --> scroll down to "Your apps" (add one if missing) --> will show "SDK setup and configuration"

在此处输入图像描述

Rename AppID to googleAppID on FirebaseOptions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM