Apple AirLocation演示应用程序范围未显示信标 [英] Apple AirLocation demo App ranging not shows beacons

查看:92
本文介绍了Apple AirLocation演示应用程序范围未显示信标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个Estimote信标,可以在App Store估算应用程序中看到.

I have3 Estimote beacons that can be seen with the App store Estimate App.

现在,我正在尝试运行Apple演示应用程序AirLocation AirLocate

Now I am trying to run the Apple demo app AirLocation AirLocate

我已将APLDefaults.m文件中的UUID更改为默认的Estimote UUID _supportedProximityUUIDs = @[[[NSUUID alloc] initWithUUIDString:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D"]];

I have changed the UUID in the APLDefaults.m file to the default Estimote UUID _supportedProximityUUIDs = @[[[NSUUID alloc] initWithUUIDString:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D"]];

我已启用区域启动startMonitoringForRegion,因为 stackoverflow 说.

I have enabled the Region to start startMonitoringForRegion as this stackoverflow says.

但是他们没有露面,您看到了吗?还是我缺少一些估算值?

But they are not showing up, have you seen this ? Or am I missing some Estimate specific.

致谢

推荐答案

问题是AirLocate是为iOS7编写的,而在iOS8中,iBeacons和其他位置操作的权限模型已更改.为了使该程序在从XCode 6进行编译时可以在iOS 8上运行,您需要在AppDelegate中添加请求权限的代码.像这样:

The problem is that AirLocate was written for iOS7, and in iOS8, the permissions model for iBeacons and other location operations has changed. In order to get the program to work on iOS 8 when compiled from XCode 6, you need to add code that requests permission in your AppDelegate. Like this:

if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
    [self.locationManager requestAlwaysAuthorization];
}

这将提示用户授权位置操作,包括信标. 您还需要编辑该应用程序的info.plist,并添加一个名为NSLocationAlwaysUsageDescription的新字符串键,其值类似于此应用程序需要访问位置服务",以便操作系统可以提示用户该权限.

This will prompt the user to authorize location operations including beacons. You also need to edit the info.plist for the app, and add a new string key called NSLocationAlwaysUsageDescription with a value like "This app needs access to location services" so the OS can prompt the user for this permission.

运行应用程序后,您可以检查设置以查看是否已正确授予此权限.

After you run your app, you can check in settings to see if this permission has been granted properly.

这篇关于Apple AirLocation演示应用程序范围未显示信标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆