Posts

Post not yet marked as solved
1 Replies
211 Views
Hello, We have an iOS application which detects when the user starts driving by detecting an USB iBeacon which is installed in the car of the users. For that we are monitoring the iBeacon region with CoreLocation and we are detecting the iBeacon when the locationManager(_:didDetermineState:for:) delegate method is called. We received some reports from a user that the iBeacon monitoring stops working when a specific BT device (specifically a hearing aid) is connected to the iPhone. The hearing aid is connected in the iOS Settings > Bluetooth page, similar how a regular BT headset is connected. When the hearing aid is disconnected then the iBeacon monitoring resumes and starts working properly again. We can't reproduce this issue with our BT headsets, so maybe the problem is specific to just some BT device connections? The advertising time interval of the iBeacon is 100mS as requested in the Apple documentation. Previously we had problems when a phone call was made through a BT headset when we used an advertising interval > 100mS in order to improve the battery usage of the iBeacon. But we changed to use an USB iBeacon, so the battery usage is not a concern anymore. Did somebody experience similar issues or has a solution? Specifically, can some specific BT connections set up in iOS Settings > Bluetooth page interfere with the iBeacon monitoring when using CoreLocation? Thank you very much!
Posted Last updated
.
Post not yet marked as solved
1 Replies
617 Views
Hello, we are experiencing some strange problems with ranging and monitoring the same beacon region in the same time on iPhone 5S. These problems are not experienced on an iPhone XR so we suspect that it could be some kind of iOS issue on iPhone 5S.iOS: 12.4.1Device: iPhone 5SXcode: 10.3Deployment target set to: 12.4Code: Objective CDescription / steps of the problem:- In a really simple test application we start monitoring and ranging a beacon region (with 2 beacons in proximity) in the same time (code snippet attached below)- We are logging the beacons found by the ranging process- The app shows that 2 beacons are detected- Move the app in background, wait a little bit, and bring it into foreground again- The app will show only one beacon (the other one is lost)Notes:- When our test app detects only 1 beacon instead of 2 beacons, then any other apps on that iPhone 5S that uses ranging will detect just one beacon (this is why we suspect that it should be an iOS issue)- If that beacon region contains only 1 beacon then I can reproduce that issue only if I stop and restart the beacon in the proximity of the iPhone (the ranging process will not see it again). With 2 or more beacons it is reproducible even if the app is moved to background and brought into foreground again as noted above.- Sometimes if I close the screen of the iPhone and re-open it then the lost beacon will re-appear for a moment but it will disappear again- If 'startMonitoringForRegion' is commented out in the code then everything works fine- The above issues are not reproducible on an iPhone XRDid somebody experienced the above issues and have a good workaround for them? Thank you very much in advance.----------------#import "ViewController.h"#import <CoreLocation/CoreLocation.h>@interface ViewController () <CLLocationManagerDelegate>@property (nonatomic, strong) CLLocationManager *locationManager;@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; self.locationManager.allowsBackgroundLocationUpdates = YES; self.locationManager.pausesLocationUpdatesAutomatically = NO; [self.locationManager requestAlwaysAuthorization]; CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:@"C336AA38-54BB-483B-AE75-3BA707855035"] identifier:@"test"]; [self.locationManager startMonitoringForRegion:region]; [self.locationManager startRangingBeaconsInRegion:region];}- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { }- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region { }- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region { }- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray<CLBeacon *> *)beacons inRegion:(CLBeaconRegion *)region { NSLog(@"%@",beacons);}@end
Posted Last updated
.