AppForShare

How to add a map to your app without code

· 9 min read

How to add a map to your app without code

You can add a map to an app without writing code, and with the AppForShare AI App Builder it takes three things: turn on Maps in the app's Integrations card, paste your own Google Maps key, and ask the chat for a map on a screen, for example "Show our three stores on a map on the home screen". Android apps get Google Maps, iPhone apps get Apple Maps with no key at all, and web apps get the Google Maps JavaScript API. The card shows the exact values Google Cloud Console asks for, and its checks tell you what is still missing before you build.

This guide walks through what a map needs on each platform, how to create a Google key that only works in your app, why the SHA-1 values matter, how to show a person's own location the way the stores expect, and what to do when the map stays blank.

What a map needs on each platform

A map in a mobile app is a native component that draws tiles from a map provider. Each platform has its own provider and its own rules for keys.

PlatformMapKey you need
AndroidGoogle Maps (Maps SDK for Android)A Google Maps Android API key, restricted to your package name and SHA-1 values
iPhoneApple MapsNone
Web appGoogle Maps JavaScript APIA web key, restricted to your site domain

The key is yours, in your own Google Cloud project. That keeps the map usage, the quotas and the bill in your hands, and it means you can take the app anywhere later without asking anyone for a new key.

Add a map in five steps

  1. Open Integrations. Open the app in the App builder. The Integrations card shows once the app has a design. Click Set up on the Maps row.
  2. Create the key. The card lists numbered steps with your app's own package name, SHA-1 values and bundle ID, each with a Copy button. Follow them in Google Cloud Console (more on this below).
  3. Paste the key and turn maps on. Paste the key, choose whether the map shows the person's own location, and click Turn on and save. Turning maps on uses no credits.
  4. Run the checks. Click Check now. AppForShare checks the key format, tests the key with Google and lists anything missing, in plain words.
  5. Ask the chat for a map. Write what the screen should show. The change is checked like any other change, and the next build carries the map and the key.

Previews in the browser always show a sample map, so no key ever goes into a preview. The real map appears in a build installed from its install link, and in a web app on your own domain after a deploy.

Creating a Google Maps key that only works in your app

A Google Maps key sits inside the app, where anyone with the file could read it. That is normal and safe as long as the key is restricted. An Android key restricted to your package name and signing certificates only works in your app; a web key restricted to your domain only works on your site.

For an Android key, the steps on the card are:

  1. Open Google Cloud Console, make or pick a project and link a billing account. Google asks for one even for usage inside its free amount.
  2. In APIs and Services, Library, enable "Maps SDK for Android".
  3. In Credentials, create an API key. Under Application restrictions pick "Android apps" and add the package name with each SHA-1 value from the card. Under API restrictions pick "Maps SDK for Android" only.
  4. Set a budget alert and daily quotas, so a mistake can never run up a bill.
  5. Paste the key on the card. A Google key starts with AIza and has 39 characters.

The card refuses anything that looks like a secret: a service account file, a private key, a Firebase server key or a secret key of another service. Maps never need those, and they should never be inside an app.

Why the SHA-1 values matter

Android checks the key against the certificate that signed the copy of the app on the phone. If that certificate's SHA-1 fingerprint is not on the key, the map shows grey tiles or stays blank. One app can be signed by more than one key over its life, so the key needs each of them:

  • The upload key. AppForShare signs your Android builds with the app's own key. Its SHA-1 shows on the card after the first Android build. See Android and iOS builds for how that key is made.
  • The Play App Signing key. Google Play signs the copies it delivers with its own key. After your first Google Play upload, copy the "App signing key certificate" SHA-1 from Play Console, Test and release, App integrity, and add it to the key and to More SHA-1 values on the card.
  • The AppForShare store signing key. If the app is also in the AppForShare store, the card lists the SHA-1 its store releases are signed with. Add it too, or the map stays blank in copies installed from the store.

A map that works in test builds but not from Google Play is almost always the missing Play App Signing SHA-1. It is the most common maps problem on Android, and the card reminds you of it in its checks.

Showing the person's own location

A store finder is more useful with a "near me" button. Turn on Show the person's own location and the app can show a blue dot and the places around it. It is off by default, and with it off the app has no location permission at all.

With it on, the app follows the rules both stores care about:

  • Only while the app is open. The app asks for location only while it is in use, never in the background. On Android that is the approximate and precise location permissions, with no background location.
  • Only after a tap. The app asks when the person taps a map action, such as "Show places near me", not when a screen loads. If they say no, the map keeps working.
  • A specific reason on iPhone. You write one sentence that iPhone shows in the permission dialog, such as "Your location shows the stores near you." Apple asks that the text says why the app needs the location, so the checks warn when it is empty, too short or as general as "Uses your location".

Where the places come from

Markers come from the app's own data. In the managed backend, a location field holds a latitude and a longitude, and you can type it in the dashboard as "29.7604, -95.3698". Before real data exists, the AI fills the map with sample places near each other in one city, so the design looks right from the start.

Saving a location to the backend counts as collecting it for the store privacy forms, so the Store checklist on the Release card lists "Precise location" for those fields. A position that only shows on the phone and is never saved is not collected, and the checklist does not list it. See before your first store release for the rest of the checklist.

Maps in a web app

Web apps use the Maps JavaScript API with a key restricted to your domain. Enable "Maps JavaScript API", create a key under Credentials with the "Websites" restriction and your domain, such as https://www.example.com/*, and paste it as the web key. The preview address shows a sample map, and the real map shows on your own domain after you deploy the app to your Netlify or Vercel account.

What it costs

Maps in the app are on Pro and Team. Turning them on uses no credits, and the chat change that adds a map to a screen costs the same as any other change. On Free, the design shows a sample map, and you can read the setup guide before you move up. The pricing page has the credit prices.

Map usage runs on your own Google Cloud project, so Google bills it there under its own pricing and free amount, and AppForShare never sees the bill. A budget alert and daily quotas keep it predictable.

From the terminal or an AI assistant

The appforshare CLI does the same as the card. appforshare builder integrations <app id> maps prints the setup guide and the values to copy; --android-key or --web-key turns maps on and saves the key, --my-location on and --location-reason set the location option, and --check runs the checks. The MCP server tool builder_integrations lets Claude, Cursor and other assistants read the state and the checks. It is read only and never takes a key, so keys stay out of chats.

Common questions

Do I need a Google Maps key for the iPhone app?

No. On iPhone the map is Apple Maps, which needs no key. The Android key is only for Android, and web apps use a separate web key.

Is it safe to put a Google Maps key in the app?

Yes, when it is restricted. An Android key restricted to your package name and SHA-1 values only works in your app, and the check warns you when a key works without restrictions.

Why is my map blank on Android?

The key is missing the SHA-1 of the key that signed that copy. Add the upload key SHA-1 for test builds, the Play App Signing SHA-1 for copies from Google Play, and the store signing SHA-1 for copies from the AppForShare store.

Does the app track location in the background?

No. Location is only added when you turn it on, and then only while the app is open, after the person taps a map action.

Do I have to change the app again after I change the key?

No. Builds, the code download and web deploys read the saved values when they run, so a new build carries the new key without a new chat change.

Which plans include maps?

Pro and Team. On Free the design shows a sample map.

Try it with your own app

Create a free account, open App builder in the dashboard and design an app from a short brief. On Pro or Team, generate it, turn on Maps in Integrations and ask the chat for a map. The maps docs have every step, check and fix in one place.

Keep reading

App Distribution Platform · · 5 min read

AppForShare File Size and Upload Limits

AppForShare limits the size of each build you upload by plan: 50 MB without an account, 150 MB on the Free plan, 2 GB on Pro and 4 GB on Team. Accounts also have a storage total, and every plan...