Skip to content

Commit

Permalink
Add Swift 4 backward compatibility for example project
Browse files Browse the repository at this point in the history
  • Loading branch information
aksswami committed Oct 4, 2018
1 parent c39d434 commit 0ce1977
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
import UIKit
import GoogleMaps

#if swift(>=4.2)
typealias ApplicationLaunchOptionsKey = UIApplication.LaunchOptionsKey
#else
typealias ApplicationLaunchOptionsKey = UIApplicationLaunchOptionsKey
#endif

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [ApplicationLaunchOptionsKey: Any]?) -> Bool {
// TODO: Replace with your API Key from https://developers.google.com/maps/documentation/ios-sdk/
GMSServices.provideAPIKey("YOUR-API-KEY")
return true
Expand Down

0 comments on commit 0ce1977

Please sign in to comment.