iBeacon iOS 8.3 only showing icon in locked screen when WIFI is activated

139 views Asked by At

Well, I'm having a problem with a beacon. I'm using only the location manager with his monitoring for region's method...which enables the app icon in lock screen.

  1. When beacon is in range and my mobile is using his 3G or 4G network, the app icon in lock screen isn't showed
  2. but, if I switch to WIFI Network the app icon is showed
  3. and, if I'm in WIFI and switch to 3G - 4G, the app icons is showed

Why is this happening? I can't find a true answer for this.

I'm using iOS 8.3 and Xcode 6.3.2

App Delegate section:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    //....other configurations...

    [self startLocalizationMultipleBeaconManagerStartInBackground];
}

- (void)startLocalizationMultipleBeaconManagerStartInBackground{

   BeaconController *beacon = [[BeaconController alloc]init];   
   [beacon startBeacon];
}

My code is this, custom beacon class:

- (void)startBeacon{
  [self configureBeacon];

  self.locationManager = [[CLLocationManager alloc] init];
  self.locationManager = [self settingLocationManager:self.locationManager];

//At this point; authorization is: Authorized Always  

  [self.locationManager startMonitoringForRegion:self.beaconRegion];
}

- (CLLocationManager*)settingLocationManager:(CLLocationManager*)locationManager{
   if([locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
     [locationManager requestAlwaysAuthorization];
   }
    locationManager.delegate = self;
    locationManager.pausesLocationUpdatesAutomatically = NO;

  return locationManager;
}

- (void)configureBeacon{
   NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:kBeaconUUDIDForce];

   self.beaconRegion =  [[CLBeaconRegion alloc] initWithProximityUUID:uuid
                                                        identifier:kBeaconIDForce];
   self.beaconRegion.notifyOnEntry = YES;
   self.beaconRegion.notifyOnExit = YES;
   self.beaconRegion.notifyEntryStateOnDisplay = YES;
}

Any suggestions will be awesome. Thanks.

0

There are 0 answers