Cordova geolocation plugin issue on ios 11

问题内容:

I installed the geolocation plugin in cordova

cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="your usage message"

I noticed that with android it works well, but with ios no.
to solve the problem I inserted this rule into the info.plist.

<string>NSLocationWhenInUseUsageDescription</string>
<key>Test geo iphone</key>

After entering this rule the app finally asks me permission to detect the position.

Why cordova does not automatically insert this rule in the info.plist file?
Grazie Ciao!

问题评论:

    
Read my updated answer on stackoverflow.com/questions/33637591/…. The core plugins no longer use the variables as they were colliding with other plugins, the recommended way of setting the usage description is to use edit-config tag (It’s also explained on the plugin docs, in the quirks section)
    
53/5000 So the edit-config should be inserted in the config.xml file?
– user2154895
17 hours ago
    
Yes, going to edit the answer to make it clar
    
Ok thanks, ciao
– user2154895
17 hours ago

原文地址:

https://stackoverflow.com/questions/47740866/cordova-geolocation-plugin-issue-on-ios-11

添加评论

友情链接:蝴蝶教程