On first authorisation the delegate is never called

I have a small problem, which I expect is due to a typo or small mistake. The first time I load the beacon manager I request authorisation (well every time, but I get the popup the first time).

- (id) init {
    self = [super init];
    
    [ESTConfig setupAppID:@"xxx" andAppToken:@"xxx"];
    self.beaconManager = [[ESTBeaconManager alloc] init];
    self.beaconManager.delegate = self;      
    [self.beaconManager requestAlwaysAuthorization];
    
    return self;
}

However the delegate method

- (void) beaconManager:(id)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status 

is never called. Is this the right procedure, or am I missing something. It means that ranging never starts. When I restart the App everything works perfect as this delegate method is called and ranging is started.

I have had this problem since the beginning and thought it might have been a bug, but now the App needs to be released and it still doesn’t work it becomes a problem. So any suggestions are appreciated.

ps. could a reason be that I have the procedure in the init: of my DOBeaconManager? i would think not, as it works when launched the second time, but still, I cannot see what I do wrong.

I knew it was something small.
On first app launch the beacon info has to be loaded form the server, and the manager is started only if there are relevant beacons. However, this happens on a background thread, and while everything seems to work fine, this obviously cause thread safety problems.

Just to be sure I got that right, so you managed to track the problem down and it turned out to be some threading issues with your own code? Or are we still talking about the Estimote SDK which needs fixing? (:

No, I think the SDKs fine.
I already thought it had to be something specific, as there are very few (although a few) people who have this problem.

The first time I initialise the BeaconManager when the data comes in. But the data is fetched async. When initialising the BeaconManager I do the Authorisation request, so that is also on the async thread. Then while this seemed to work fine, and the BeaconManager seemed to work perfects after from the main thread (as it is stored in the AppDelegate, the callback got lost when the async thread finished at the time the user accepted.

So I basically made a mess of my thread management. :smile:

Ha, makes sense, thanks for explaining (: