0

I'm having a hard time trying to display a GMSMapView. I'm seeing a blank map as shown below.

enter image description here

I've seen plenty of answers indicating API Key was not valid or Maps iOS SDK not enable in Google console. But in my case, key works on sample projects. I even created a basic project and had no issues displaying the map.

This is what I see in the console:

2018-09-28 10:54:37.946703+0200 XXXXX[53857:723015] ((null)) was false: 

GMSStyledVectorMapTileService failed to decode tile [4,2,5], +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638
2018-09-28 10:54:38.063481+0200 XXXXX[53857:723015] +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638
2018-09-28 10:54:38.063666+0200 XXXXX[53857:723015] ((null)) was false: GMSStyledVectorMapTileService failed to decode tile [3,1,3], +[GMSx_GMPCClientVectorTileExtensionsRoot indoorBuildingMetadata]: unrecognized selector sent to class 0x10a9af638

Please help, I'm dying here

Nikolai
  • 256
  • 2
  • 13
  • 1
    Check if your `bundle ID` is the same with the entered under the API key in your Google API Console... or .. if not had inverted the lat/long by mistake in Camera location... – TonyMkenu Sep 28 '18 at 10:13
  • There are no restrictions whatsoever for the moment with the key I generated. And, for lat and long, I just copied a sample code from the _Get Started_ section of Google tutorials, which works great on sample project, yet not on actual project I'm working on. – Nikolai Sep 28 '18 at 11:48
  • and what about the `bundle ID` ? Is the same? – TonyMkenu Sep 28 '18 at 12:19
  • I did not restrict the API key to any bundle ID so far. So there's no bundle ID on the Google console side. I did at first, with the same one as my target, but it didn't change anything – Nikolai Sep 28 '18 at 12:25

3 Answers3

3

Ok so it's was kind of specific to my project. Google maps pod was shared among several target of my workspace project. It looks like the key wasn't shared among targets. Now maps pod is only used on main target and it's working fine.

Nikolai
  • 256
  • 2
  • 13
1

This is either linkage problem or the Google Maps resources bundle is misplaced.

  • Make sure you are linking the 3 GoogleMaps frameworks correctly and only once. In our case, the problem was only reproducible in release mode and the reason was that we were linking GoogleMapsUtils with GoogleMaps frameworks AND linking the app again with GoogleMaps frameworks.
  • Also we had moved the GoogleMaps.bundle out of the framework and into our own framework, which was also probably a mistake.

Hope it helps.

RodrigoM
  • 678
  • 9
  • 6
  • That's what we did, we only use it in our main kit. It was tricky to find the origin of the problem though ^^ – Nikolai Jan 09 '19 at 09:46
0

I handled it by integrating google maps manually. I still didn't find a fix by using cocoapods.

Ahmad Farrag
  • 234
  • 2
  • 8