博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to use user’s location in your app?
阅读量:7059 次
发布时间:2019-06-28

本文共 841 字,大约阅读时间需要 2 分钟。

How to use user’s location in your app?

 

there are two more settings

(1)click the project-> Build Phases -> link Binary With Libraries -> click “+” -> search for “location” -> click the CoreLocation.framework, import the library to your project

(2)find info.plist,and add two keys and values

the first key is :NSLocationWhenInUseUsageDescription, you can put whatever you want in the value field to explain your reason to request user location,such as"Because I want to know where you are”. this can help you to request user location when the app is running.

the second key is:NSLocationAlwaysUsageDescription,you can puts reasons in the value field such as”Because I always want to know your locations”,this can help you in any time to get the user location ,even the app is not running.

转载于:https://www.cnblogs.com/iwangzheng/p/5138063.html

你可能感兴趣的文章
解决:在微信中访问app下载链接提示“已停止访问该网页”
查看>>
使用阿里云ECS自建RDS MySQL从库
查看>>
Linux下sed命令
查看>>
胃病犯了怎么办
查看>>
三星2610打印机故障INTERNAL ERROR - Incomplete Session by time out
查看>>
马哥2016全新Linux+Python高端运维班第五周作业
查看>>
thinkphp 跨模块调用配置文件信息
查看>>
nohup命令在后台自动执行程序
查看>>
MAVEN项目后 jar包无法发布到eclipse的web服务器
查看>>
选择结构与循环结构
查看>>
Linux系统生成随机密码的10种方法
查看>>
puppet初体验
查看>>
oracle安装前环境检查
查看>>
ansible出错
查看>>
linux内核中的信号机制--一个简单的例子
查看>>
【Java】File.createTempFile创建临时文件
查看>>
ldap bdb_db_open 错误解决办法
查看>>
根据菜单查找构建的窗体、流程、报表
查看>>
判断某年是否是闰年
查看>>
初探 C++ 标准库(二十六)
查看>>