Hallo to all.
I’m new in this forum. I started by few days to develop with Estimate Starter Kit.
I Have personalized the UUID and Minor and Maior of a Beacon to start with some test.
I would to like to get “my beacon” between the others.
For to do this I thought that the best way is to do this:
Login into the Cloud
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ESTCloudManager setupAppID:@"XXX" andAppToken:@"XXXXX"];
[ESTCloudManager enableMonitoringAnalytics:false];
Create an utility object:
utility = [[ESTUtilityManager alloc] init];
_utility.delegate = self;
[_utility startEstimoteBeaconDiscovery];
And in the delegate make this:
- (void) utilityManager:(ESTUtilityManager *)manager didDiscoverBeacons:(NSArray *)beacons {
NSLog(@"In utility");
if ([beacons count] != 0) {
id beacon = [beacons objectAtIndex:0];
if ([beacon isKindOfClass:[ESTBluetoothBeacon class]]) {
_beacon = [beacons objectAtIndex:0];
NSString *macAddress = _beacon.macAddress;
_beaconConnection = [[ESTBeaconConnection alloc] initWithMacAddress:macAddress delegate:self startImmediately:true];
[_beaconConnection startConnection];
}
}
}
And last in the beaconDidSucceed delegate I make this:
- (void) beaconConnectionDidSucceed:(ESTBeaconConnection *)connection {
NSLog(@"UUID Found: %@ | UUID searched: %@",[_beaconConnection.proximityUUID UUIDString], [_beaconUUID UUIDString]);
if ([[_beaconConnection.proximityUUID UUIDString] isEqualToString:[_beaconUUID UUIDString]])
NSLog(@"UTILITY Maior: %@, Minor: %@",_beacon.major,_beacon.minor, );
}
The problem is that I receive the error: Error Domain=com.estimote Code=2 “Authorization failed for this beacon.” in the
- (void)beaconConnection:(ESTBeaconConnection *)connection didFailWithError:(NSError *)error {
Obviously in the Cloud portal I’ve set the appId and retrieved the appToken properly.
Thanks in advance