How to Add Map API key for Address
- Go to Google Cloud Platform. Click here
- Click on console.
- Select your Firebase Project
- Search for APIs, which are shown in below image.
- Click on Enable to, enable that APIs
- Do above steps for below listed API. (enable all below APIs one by one by searching)
- Go to Credential Tab. you will find your Androiod and iOS API keys.
-
You have to setup those above API keys for both Platform.
1. Android Setup
-
Next, open
android ‣ app ‣ src ‣ main ‣ AndroidManifest.xml
and paste the Google Maps meta data tag into your application tag before the activity tag, placing the API key you copied before to replaceYOUR_API_KEY_HERE
.<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="{{YOUR_API_KEY_HERE}}" />
Note: For the
value
field, please paste in your API Key from the Google Maps API registration process.2. iOS Setup
-
Next, open the
ios ‣ Runner ‣ AppDelegate.swift
file and paste the following code at shown in image.GMSServices.provideAPIKey("YOUR KEY HERE")
Note: Again, for the value field please paste in your API Key from the registration process.
-