Use of Unresolved Identifier 'GMSServices'

前端 未结 4 1151
刺人心
刺人心 2021-02-18 21:13

I am using Xcode 7.1 and the deployment target is iOS 9.1. The app is \"AreaCalculator\" and it was written in Swift. I did following to set up the framework and import the map:

4条回答
  •  梦谈多话
    2021-02-18 22:12

    ....
    #add this line
    import GoogleMaps
    
    
    @UIApplicationMain
    @objc class AppDelegate: FlutterAppDelegate {
      override func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
      ) -> Bool {
      GMSServices.provideAPIKey("YOUR-API-KEY")
        GeneratedPluginRegistrant.register(with: self)
        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
      }
    }
    

提交回复
热议问题