我一直试图让地理位置包在过去的3个小时内起作用,并决定寻求帮助,也许你可以看到我无法做到的事情。
我已按照指示操作,无法让应用获得任何iOS设备的定位服务许可。
config.xml中
https://gist.github.com/keoir/90ea3b75fefed70495409fd5692ac5c0
的package.json
https://gist.github.com/keoir/285c4c04671f70c2473783052936af0d
app.component.ts
https://gist.github.com/keoir/2d09d7cc6956b507a47a59701f0e1aa2
答案 0 :(得分:2)
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>Get Position</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
<string>Get position</string>
</edit-config>
之后:离子cordova平台删除ios ---&gt;离子cordova平台添加ios
答案 1 :(得分:0)
将NSLocationWhenInUseUsageDescription添加到.plist。 打开/platforms/ios/{project}/{project}-Info.plist并添加以下内容:
<key>NSLocationWhenInUseUsageDescription</key>
<string>[App Name] would like to access your location when running and displayed.</string>
答案 2 :(得分:0)
我遇到了同样的问题,我跟随this git doc并最终获得了成功。