ios - ionic 3 geolocation ios 中的位置错误

标签 ios google-maps permissions geolocation ionic3

我正在使用 ionic-3 开发混合应用程序。我正在实现 google map 并尝试在我的应用程序中获取当前位置。 map 在 Android 和浏览器中工作正常,但当我在 ios 中构建它时,我收到权限错误。我已在 config.xml

中添加了权限配置文件

config-file in Config.xml

    <config-file file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
        <string>To get your location and provide better service</string>
    </config-file>
    <config-file file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription">
        <string>To get your location and provide better service</string>
    </config-file>
    <config-file parent="NSCameraUsageDescription" target="*-Info.plist">
        <string>need camera to take your profile picture</string>
    </config-file>

I'm getting error as like below images

enter image description here

enter image description here

你能给我建议任何解决方案吗? 谢谢。

最佳答案

终于我找到了解决方案。 我只需要设置模拟器的当前位置。我会解释一下,也许对其他人有帮助。

  1. 在 iPhone 模拟器中运行项目
  2. 在调试菜单下,最后一个条目是“Location”;这会给你一个子菜单
  3. 选择“自定义位置”
  4. 设置您的位置。就是这样

enter image description here

关于ios - ionic 3 geolocation ios 中的位置错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56882847/

相关文章:

ios - 我什么时候可以激活/停用布局约束?

ios - 以编程方式执行时,UIViewController 显示为黑屏

ios - 从后台重新加载应用程序时,出现iOS启动画面

javascript - 使用 zoom javascript 触发谷歌地图点击事件

java - 将图钉放置在 fragment 中的 map fragment 上

ios - 将 JSON 转换为 NSArray

php - 检查 Google Map Point 是否在 PHP 的多边形中

java - Appengine 有权更改 Joda 时间默认时区

react-native - Permissions.askAsync 未按预期工作

linux - 无法CD进入具有755权限的目录吗?