简体   繁体   中英

New Possible iBeacon Monitoring Issue since Xcode 6.3

So here's the breakDown

All Swift language Configuration 1: Xcode 6.3 With any version iOS 8.1+

Configuration 2: Xcode 6.2 With any version iOS 8.2 and lower, since XCode 6.3 is need to build to iOS 8.3 devices.

Iphone 5 / Ipod 5th Gen in both tests.

DURING CONFIG # 1 In our app we monitor for a Main region, (UUID with no major/minor). After an enter event is raised we also start monitoring the sub regions that have the same UUID, but with assigned major/minors. After entering into the "main" region with multiple smaller regions, when just ONE of those is removed, the function didExitRegion of CLLocationManager is called but it is called with the main region and not the sub region as expected. When we exit all sub regions (thus exit the main region) we get 2 callbacks, both of which are for the main region.

The intended behavior we would expect is that when you exit a sub region, but not the main region that you would get a call back for the sub region. And when exiting the last of the sub regions you get 2 callbacks, one from the sub region and the second from the main region.
This is the behavior that is written about in the apple docs and ALSO how it worked in our CONFIG # 2 aka until Xcode version 6.3 (basically how it worked until the upgrade of Xcode.

My real question: Is anyone else having this issue, and does anyone know any possible work around to get the didExitRegion call to return the correct CLRegion. I've also used one of our companies dev help support things, hoping that apple itself can answer since this seems to be very much a part of how xcode is handling the OS calls. So if i hear back from them i will post it below.
Sorry in advance for my newbness, this is only my 2nd or third question, still getting the hang of it.
EDIT: Never mind, I'm a HUGE idiot, I was overwriting the variable by accidentally copy pasting some code i was fixing for a different problem...

This is just a thought…

From startMonitoringForRegion:

You must call this method once for each region you want to monitor. If an existing region with the same identifier is already being monitored by the app, the old region is replaced by the new one.

Try registering the smaller regions first. Also take a look at monitoredRegions at runtime and see if it contains what you expect.

您没有正确设置didEnterRegion and didExitRegion的条件,这不是xcode的问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM