一、申请秘钥
要使用百度地图就必须要有秘钥,申请网址:
百度地图秘钥申请网址
- 附:依赖库
CoreLocation.framework
SystemConfiguration.framework
Security.framework
libsqlite3.0.tbd
CoreTelephony.framework
libstdc++.6.0.9.tbd
AdSupport.framework
其中,地图模块不包含的为
AdSupport.framework
需要加的配置信息
App Transport Security Settings
下面值改为YES
Allow Arbitrary Loads
权限
Privacy - Location Always and When In Use Usage Description
值为
NSLocationAlwaysAndWhenInUseUsageDescription
- 还有一个
Privacy - Location When In Use Usage Description
值为
NSLocationWhenInUseUsageDescription
1)只允许前台使用时定位,需要在info.plist里添加:NSLocationWhenInUseUsageDescription
2)允许永久使用时定位,需要在info.plist里添加:NSLocationWhenInUseUsageDescription, NSLocationAlwaysUsageDescription,NSLocationAlwaysAndWhenInUseUsageDescription
网友评论