I may be missing something, but I followed the steps indicated at the Google Maps SDK for iOS Site, but so far I have had no success. I tried running the sample code they have at the bottom of the page, and my compiler keeps bugging me with an uncaught exception.
Here is my implementation:
@implementation ViewController {
GMSMapView *mapView_;
}
Followed by this in the viewDidLoad:
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86
longitude:151.20
zoom:6];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86, 151.20);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.map = mapView_;
I did include line:
[GMSServices provideAPIKey:@"API Key"];
and replaced the API Key string with my actual API Key. Yet I get this at compile time.
I used a breakpoint, and the exception seems to originate when executing this line:
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
Any of your help would very much be appreciated.