iOS and Google Maps Premium Plan

3

Is it possible to use the Google maps Premium key in an iOS application without having to import the Google Maps SDK? Or is it necessary to import the SDK?

greetings

    
asked by Ojrzsr 03.10.2016 в 17:25
source

2 answers

0

To use Google maps you need to download the SDK if. You can download it using cocoapods or directly download it from the website and install it.

After installing it you have to request an API key and add it to the application by calling the SDK from the AppDelegate.

You can base yourself on the official guide that will be most useful to you: link

    
answered by 03.10.2016 в 20:46
0

You must import the Google Maps SDK, either using cocoa pods or downloading it directly.

If you are going to use cocoapods, you have to add them in the Podfile file:

use_frameworks!
target 'NOMBRE_TARGET' do
pod 'GoogleMaps'
end

AppDelegate imports:

import GoogleMaps
import UIKit

class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    let googleMapsApiKey = "MY_GOOGLE_IOS_API_KEY"

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.
        GMSServices.provideAPIKey(googleMapsApiKey)
        return true
     }
}

On iOS, you can not use the Client ID , only the Api Password .

"You can use an API key to authenticate requests to any of our APIs. To create your key, you must use the Google API Console project associated with your project ID.

Instead of an API key, you can use your customer ID to make requests to any of the APIs, to exception of the Google Places API, the Google Maps Geolocation API, Google Maps Roads API and the Mobile API (Android and iOS) . " Link

    
answered by 08.06.2017 в 12:10