From ddb6d43ffaa65b64a1e899e82d8bd821f4a5b446 Mon Sep 17 00:00:00 2001 From: Thomas S Date: Fri, 6 Oct 2017 05:22:43 +0200 Subject: [PATCH] docs(geolocation): update install command (#2016) Hello guys, I make this pull request to add the installation variable `GEOLOCATION_USAGE_DESCRIPTION` needed on iOS, since version 10. Without this variable, using `getCurrentPosition` do nothing on iOS because phone wait user authorization. But that authorization is not display because there is no message defined. This variable make this part of code in `info.plist` : ``` NSLocationWhenInUseUsageDescription To allow locate you ``` Source : https://github.com/apache/cordova-plugin-geolocation#ios-quirks Have a good coding day :) --- src/@ionic-native/plugins/geolocation/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/@ionic-native/plugins/geolocation/index.ts b/src/@ionic-native/plugins/geolocation/index.ts index f78a82507..52e8f52d2 100644 --- a/src/@ionic-native/plugins/geolocation/index.ts +++ b/src/@ionic-native/plugins/geolocation/index.ts @@ -153,6 +153,8 @@ export interface GeolocationOptions { plugin: 'cordova-plugin-geolocation', pluginRef: 'navigator.geolocation', repo: 'https://github.com/apache/cordova-plugin-geolocation', + install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"', + installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'], platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone'] }) @Injectable()