evothings / phonegap-estimotebeacons

This repository is no longer maintained - new maintainer is welcome!
MIT License
338 stars 178 forks source link

Ranging Doesn't Work when built through XCode #107

Open linchpinstudios opened 8 years ago

linchpinstudios commented 8 years ago

When running the app through the Evothings Workbench I'm able to run estimote.beacons.startRangingBeaconsInRegion passing a region and get the beacons that are in range.

However when I build the app in XCode and run it on my device, I'm able to run estimote.beacons.startEstimoteBeaconDiscovery and get everything listed. However when I run estimote.beacons.startRangingBeaconsInRegion the function that responds with beacons in range is never called.

PS: all functions don't work when running through phonegap serve

XCode does have two warning for EstimoteBeacons.m

heypiotr commented 8 years ago

Make sure you're requesting Location Services authorization. (startEstimoteBeaconDiscovery uses Core Bluetooth and so it doesn't require it, but startRangingBeaconsInRegion uses iBeacon + Core Location, and thus it needs the authorization)

https://github.com/evothings/phonegap-estimotebeacons/blob/master/documentation.md#authorization-ios-8-and-above

umanghome commented 8 years ago

I haven't tried anything using Evothings, but ranging does not work when I'm building via XCode. It scans the beacons perfectly, just doesn't range.

piscis commented 8 years ago

Same here when I build this via cordova build ios --device and attach a safari console the error callback is triggered with The operation couldn’t be completed. (kCLErrorDomain error 5.) right after I start startRangingBeaconsInRegion

I'm using the sample app located in examples/beacon-finder