Swift: Missing such module Error "GoogleMaps"

I am trying to use the Google Maps iOS SDK in Swift. I followed these steps from google developers site. The problem is that when I tried to import GoogleMaps in AppDelegate.swift, it shows an error, for example .. No such module 'GoogleMaps'

.

I added all the frameworks and made the necessary changes to the Linking and Build settings. Am I missing something?

+3


source to share


2 answers


The steps on this website are still for Objective-C applications. To write an app in Swift with the Google Maps API you need to add a bridge header and then you can import the module into that header using #import <GoogleMaps/GoogleMaps.h>

.



In application:didFinishLaunchingWithOptions:

instead, [GMSServices provideAPIKey:@"API_KEY"];

you use GMSServices.provideAPIKey("API_KEY")

.

+4


source


Delete all your pod files including workspace except podinstall and lock and install pod again



+1


source







All Articles