kal
kal

Reputation: 391

Google Maps iOS SDK: Map not loading

I am new to iOS development and am trying out a simple app using Google Maps SDK. I am following the steps listed on Google Maps Getting Started guide.

I have seen the similar question: Google Maps iOS SDK Integration not loading maps where the problem is with bundle ID. I made sure it is not the case for me.

I already spent 3 days trying new app from scratch.

I ran it on simulator and real phone. I get the marker and Google logo but no map. Can some one give some clues?

Upvotes: 9

Views: 12591

Answers (2)

Waqas Khalid Obeidy
Waqas Khalid Obeidy

Reputation: 676

Please make sure you generate the right api key before you run the project for the first time. I faced the similar issue and fixed it by generating and enabling the right APIKey for iOS (and not javascript or android) using this link -- APIKey for iOS

Upvotes: 2

kal
kal

Reputation: 391

Hi I found the issue and fixed the problem. The problem is with the API key - not code. Before IOS app, i was trying a sample android map app and i used the same console to create new api key without enabling google maps api for IOS.

Developers console somehow allows to add IOS restrictions on API key even though SDK for IOS is not enabled - because of this, I never thought I need to do anything more.

If you get this error and you already verified bundle ID is current, check the following:

  • Go to https://console.developers.google.com
  • Click on dashboard
  • Click on "Enable APIs and Services" with a + mark on the top of the page.
  • Check that you have "Google Maps SDK for iOS" enabled. if it is not, enable it.
  • Rerun your app and enjoy :)

-Kal

Upvotes: 30

Related Questions