Location Services not working in iOS 11

前端 未结 8 564
春和景丽
春和景丽 2020-11-27 14:59

I just rebuilt my app with the iOS 11 SDK in an attempt to remove the blue banner that is now always appearing. I thought - \"Brilliant, that worked\", only to

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 15:36

    working under iOS11 i discovered, that Info.plist needs al least NSLocationAlwaysAndWhenInUseUsageDescription in Info.plist:

    Strange enough when your app is multilingual the localized versions of your strings need all three keys mentioned in this post else requestAlwaysAuthorization() and locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) will fail silently.

    Shot showing german translation as example:

    Hope this saves you time when stumbling upon.

提交回复
热议问题