nativescript - 用于跟踪位置的 NativeScript 地理位置设置目的消息
问题描述
我正在使用 nativescript-vue 和nativescript-geolocation插件。
Apple 不批准我的应用程序,因为我没有在向用户发送允许请求时指定地理跟踪的原因(参见示例):
据我所知,nativescript-geolocation 中没有这样的选项来更改该消息。
是否有任何其他方法可以更改此消息,或者我错过了 nativescript-geolocation 中的隐藏选项?
解决方案
参考插件自述文件,
对于 IOS 上的自定义提示消息,需要以下键: NSLocationAlwaysAndWhenInUseUsageDescription (iOS 11.0+) 或 NSLocationAlwaysUsageDescription (iOS 8.0-10.0) 和 NSLocationWhenInUseUsageDescription。阅读更多关于请求始终使用的信息。
您将在您的App_Resources/iOS/info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your message here.</string>
推荐阅读
- php - php对象设置属性的麻烦
- directory - DataDog - 将多个 fnmatch 模式传递给配置
- elasticsearch - elasticsearch删除映射并了解字段值如何存储
- java - Gson 为嵌套对象返回 null
- python - 我只(总是)为 Youtube Data Api v3 获得 10 个 nextpagetoken;我怎样才能增加这个?
- python-3.x - how to import my module in same folder i try to import that it show invalid decimal literal
- python - 不能同时使用列表 url 上的代码。我能做些什么?
- r - 根据匹配日期检索值
- xcode - Xcode 不允许我编辑文件
- android - 将徽章添加到底部导航并且无法引用 getOrCreateBadge