0

I am currently working on GoogleMaps APIs and am following this link https://developers.google.com/maps/documentation/ios-sdk/start .I have successfully completed the 4th step and now am facing problem in the next step where i have to import GoogleMaps in App Delegate's .m file. But i m unable to do so. Can anyone tell me why??

enter image description here

pri
  • 87
  • 11

3 Answers3

0

Sometimes there is the issue with pods. Make sure you have completely installed googleMaps pod. Please try to build application before import. It solved problem for me.

Vishal Kumar
  • 34
  • 1
  • 4
0

you are in the correct way , just add the following code

@import GoogleMaps; in your header file or use like #import <GoogleMaps/GoogleMaps.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[GMSServices provideAPIKey:@"xxxxxxx"];
[self.window makeKeyAndVisible];
return YES;
}

While you should be able to start using the Google Maps SDK at this stage, there is one more step you need to take because of a bug in Cocoapods. In the Project Navigator, select the yourPRojectName project at the top. Choose the yourPRojectName target, select the Build Settings tab, and in Other Linker Flags add -ObjC as shown below:

enter image description here

Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
0

Make sure you installed pod files properly. You can verify it by checking whether all header files are present under "Pods" in "Project navigator" tab at left side.

After that build your app and import

#import "GoogleMaps/GoogleMaps.h"
ship
  • 13
  • 3
  • All header files are there i have checked sir....but still am unable to import "GoogleMaps/GoogleMaps.h". How is that possible?? – pri Jul 18 '16 at 12:41
  • once try cleaning your project and then rebuild it – ship Jul 18 '16 at 12:43