IpsLocation-iOS
IpsLocation-iOS 是一套基于 iOS 8.0 及以上版本的室内地图应用程序开发接口,供开发者在自己的iOS应用中加入室内定位功能。
获取 AppKey
请联系 [email protected] 邮件获取 AppKey、mapId、
使用 CocoaPods 部署
在 Podfile 中使用以下命令:
pod 'IpsLocation', '~> 1.0.2'
然后运行以下命令
$ pod install
注意
导入 IpsmapLocation 后需要在
- Build Settings 中将 Enable Bitcode 的默认 YES 更改为 NO(IpsmapSDK 为了兼容科大许飞 SDK 才使用 NO)。
- 在 Info.plist 中添加授权申明
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App需要您的同意,才能访问蓝牙</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>App需要您的同意,才能在使用期间访问位置 </string>
使用说明
是否在地图范围内的接口
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor whiteColor];
self.manger = [IpsmapLocationManger new];
self.manger.locationTimeOut = 20;
self.manger.delegate = self;
[self.manger startLocationEngine:@"lGaWCUtqoj"];
}
- (void)ipsmapLocationManager:(IpsmapLocationManger *_Nullable)manager didUpdateLocation:(IpsLocation *_Nullable)location
{
if (location.inThisMap) {
NSLog(@"在医院里面");
}
}