2

I just installed CocoaPods and added a pod to my project in Xcode so that I could use the Google Maps SDK for iOS, and now I'm not able to get types or values for any variables in the debugger console. The only way I can see a variable's value is through a print statement in the code.

I'm using Swift 2.0 in Xcode 7.0 beta, and I followed these instructions almost exactly to install the pod into my project: https://developers.google.com/maps/documentation/ios-sdk/start. The only thing I did differently was to change the second line in the Podspec from "platform :ios, '8.1'" to "platform :ios, '9.0'".

I looked at the answers to this similar question: Xcode debugger sometimes doesn't display variable values?, but I was already using a debug build, and I'm pretty sure my problem is related to CocoaPods, because everything was working fine before I added that to my project.

Community
  • 1
  • 1

3 Answers3

1

This is known issue, you can find more info and starred isuue here.

TL-DR - Quick workaround:

Add Objective-C bridging header file and add #import <GoogleMaps/GoogleMaps.h>"

Remove all "import GoogleMaps" from your swift files

PS: Tricky stuff - you have to remove all imports from your swift files - I have forgotten to remove the one and it causes this debug issue.

Martin Makarsky
  • 2,580
  • 1
  • 17
  • 28
  • Thanks for the suggestion. I didn't get a chance to try it before the problem was fixed by updating the Google Maps SDK, but I appreciate your help. – Kelly Corrigan Nov 05 '15 at 19:20
  • This also fixed the manual installation of the Firebase framework, just had to use the bridging header instead of the modulemap file. – Endanke Jan 30 '17 at 10:26
0

I hade the same problem dunno if you solved it but, for me this happened because googlemaps was causing too many errors. So the workaround is remove all your googlemaps import in the projekt and add an import to googlemaps in your bridging header instead.

  • The only problem google maps seems to be causing in my project is [this](https://stackoverflow.com/questions/32233939/core-data-failed-to-load-optimized-model-at-path), but maybe my error is related to that one. I'm doing okay without having a functioning debugger for now, so I think I'm just going to wait and hope the issue gets fixed. Thanks for the suggested workaround! I'll try it out if I really need to get the debugger working. – Kelly Corrigan Sep 26 '15 at 01:26
0

Updating to version 1.10.21020.0 of Google Maps SDK for iOS fixed the problem.