gpt4 book ai didi

ios - 如果区域没有主要,则区域监视在 iOS 中不起作用

转载 作者:可可西里 更新时间:2023-11-01 06:01:20 25 4
gpt4 key购买 nike

在我的 iOs 应用程序中,我正在尝试按如下不同参数监控一些信标区域:

> 方法 1 - 只有 UUID 和标识符的区域:

In above scenario am starting monitoring beacon region with following code where only uuid and identifier given.

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid identifier:strIdentifier]; 

Method 2 - Region With UUID , Major and Identifier :

In above scenario am starting monitoring beacon region with following method where uuid, major and identifier value given

CLBeaconRegion  *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid  major:[self.major intValue] identifier:strIdentifier];

Method 3 - Region with Major Minor and Identifier :

In above scenario am starting monitoring beacon region with following method where all uuid,major,minor and identifier value given

CLBeaconRegion  *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid  major:[self.major intValue] minor:[self.minor intValue] identifier:strIdentifier];

现在,考虑到以上 3 种方法,我开始使用以下方法进行区域监控:

[self.locationManager startMonitoringForRegion:region];

不幸的是,只有第三种方法会调用信标进入和退出委托(delegate)。但是当我使用第一种或第二种方法时,我无法接收进入和退出区域委托(delegate)。

注意:我没有一次运行所有方法。我一次只使用一种方法。

任何人都可以提供任何反馈或提供任何帮助,为什么其他区域方法不起作用但只有第三种方法有效?

最佳答案

确保周围没有其他具有相同 proximityUUID(方法 1)或相同 proximityUUID 和相同主要(方法 2)的信标。当有另一个信标时,应用程序将不会获得退出事件,因为它仍在由此 proximityUUID/major 定义的区域中。

关于ios - 如果区域没有主要,则区域监视在 iOS 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44759951/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com