简体   繁体   中英

Ruby UUID's doesn't work on iOS iBeacon

We are generating UUID's using Ruby 1.9.3 (SecureRandom.uuid) and passing them to our iOS devices to monitor Beacons. We generate UUID's from iOS devices as well, but the iOS generated UUID's seem to be fine.

Here is the problem:

  • Server issued UUID, pulled in via API and applied to iOS device. Monitor Regions.
  • App is unable to monitor or range this Beacon using the supplied UUID.
  • We are using a the Radius Networks/AltBeacon library to monitor Beacons on Android devices, and the Beacon is able to be monitored and ranged fine with the same UUID.
  • iOS generated UUID's uploaded to the server work just fine. Only server/Ruby based UUID's don't work on iOS.

Does anyone have any idea why this might be? I'm 100% confident in my region monitoring code that it isn't an issue. When I output the UUID's, they are the correct format, and I'm not getting any errors at all from iOS. It seems like a legit UUID, but for some reason, iOS will not see it. Help!!!

In order to detect a beacon on iOS, the ProximityUUID you provide to the monitoring APIs must match that of a beacon transmitter. Your question suggests you are generating a random UUID in Ruby and then expecting to detect a beacon with the same UUID. This can't ever work, because there are so many possible UUIDs that the chances of ever finding a beacon matching a randomly generated UUID are next to zero.

Perhaps I am misunderstanding your question, but I wanted to offer this in case the issue is really this simple. The question says nothing about how you are transmitting with this UUID. Perhaps details about how this is being done might help clarify the issue. Also helpful would be an example UUID and a snippet of your iOS code that sets up monitoring.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM