Question

When I run my app on iPhone 5 I get no user location icon (the blue dot), but instead it shows me an error. I just get bunch of lines like this:

<Error>: CGBitmapContextGetData: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context  and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

I also got the error for the missing GMSSprites-0@2x, but I fixed that by renaming GMSSprites-0_retina to GMSSprites-0@2x.

I figured that it has something to do with Google Maps SDK version, so I updated it to version 1.7.2 a few times, however nothing changes. The weird thing is that when I run in my phone I just get display errors, however when I run in on emulator I get the following:

Google Maps SDK for iOS version: 1.5.0.5445
New version of Google Maps SDK for iOS available: 1.7.2.7908

I understand that for some reason it didn't catch the update of the framework. Here are the steps that I took to update the SDK:

  1. Delete GoogleMaps.framework and GoogleMaps.bundle from project, and remove them from Trash
  2. Did Clean Build Folder
  3. Downloaded the latest SDK from Google's website
  4. Move new GoogleMaps.framework to project. Selected Copy items into destination folder
  5. Right click on GoogleMaps.framework in project navigator, and show it's resources
  6. Moved GoogleMaps.bundle from the GoogleMaps.framework in my project, this time without selecting Copy items into destination folder.
  7. Did another Clean Build Folder
  8. Build the app and run with the same problem

Am I doing something wrong in the steps, or is it just something else?

Was it helpful?

Solution

I managed to fix the problem using CocoaPods. The steps were following:

  1. Make a copy of a whole project folder (just in case)
  2. Remove GoogleMaps.framework and GoogleMaps.bundle
  3. Exit project
  4. Install CocoaPods
  5. Create new Podfile with Google maps SDK
  6. Run pod install

After that the maps should be updated and everything should be working fine

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top