iphone - How to add google map to ios6 sdk -


when try add google map ios6 according link google map

and api key , put in app crashed , reason "google map sdk ios must initialized via [gmsservices provideapikey:...]"

can body me, give me video how thing ...

    #import "appdelegate.h" #import <googlemaps/googlemaps.h> #import "viewcontroller.h"  @implementation appdelegate  - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; // override point customization after application launch. self.viewcontroller = [[viewcontroller alloc] initwithnibname:@"viewcontroller" bundle:nil]; self.window.rootviewcontroller = self.viewcontroller; [self.window makekeyandvisible]; return yes; [gmsservices provideapikey:@"aizasyboogggqnvdydbkcxgeb1of6wu2ibe6rjk"];  } 

did step 8 here?

if did, can update question code application:didfinishlaunchingwithoptions: method?

update:

move call [gmsservices provideapikey:] higher in application:didfinishlaunchingwithoptions: method, somewhere before line:

self.window.rootviewcontroller = self.viewcontroller; 

this line sets root view controller, cause view controller's root view allocated, calling loadview. in google's sample code loadview creates gmsmapview, , code have now, trying create gmsmapview before providing api key, causes google maps sdk ios crash.

also way, had placed call [gmsservices provideapikey:] after return statement, never called.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -