Estimote / iOS-Fleet-Management-SDK

Estimote Fleet Management SDK for iOS
https://developer.estimote.com
MIT License
1.18k stars 398 forks source link

ESTRequestGetBeaconsDetails failing #223

Closed oliveriobw closed 4 years ago

oliveriobw commented 8 years ago

When called with an array of 1 CLBeacon, ESTRequestGetBeaconsDetails mechanism fails with:

"Error Domain=ESTRequestBaseErrorDomain Code=-1 "NSURLConnection failed." UserInfo={NSLocalizedRecoverySuggestion=Check reason field to verify what kind of error happened., NSLocalizedFailureReason=unsupported URL, NSLocalizedDescription=NSURLConnection failed.}"

 int fields =
    ESTBeaconDetailsFieldMac              |
    ESTBeaconDetailsFieldColor            |
    ESTBeaconDetailsFieldName             |
    ESTBeaconDetailsFieldBattery          |
    ESTBeaconDetailsFieldPower            |
    ESTBeaconDetailsFieldHardware         |
    ESTBeaconDetailsFieldFirmware         |
    ESTBeaconDetailsFieldUUIDMajorMinor ;

     ESTRequestGetBeaconsDetails* beaconMac = [[ESTRequestGetBeaconsDetails alloc]initWithBeacons:b andFields:fields];
     [beaconMac sendRequestWithCompletion:^(NSArray * _Nullable beaconVOArray, NSError * _Nullable error)
    {
        if(error){
            dbg_log(@"%@",__FUNCTION__ ,error);
            return;
       }
sergioribeiro commented 7 years ago

I'm having the same issue. Did you find the solution?

oliveriobw commented 7 years ago

They have (or at least had) two variants of the beacon - Location Beacons and Proximity Beacons, each requires a different approach. Detect Proximity Beacons using ESTUtilityManager class that will deliver an identifier you should use to connect using ESTBeaconConnection class. Detect Location Beacons using ESTDeviceManager that returns a device handle allowing direct connections. This is based on last June's SDK though, and they may have changed all this.