简体   繁体   English

Ruby UUID在iOS iBeacon上不起作用

[英]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. 我们正在使用Ruby 1.9.3(SecureRandom.uuid)生成UUID,并将它们传递给我们的iOS设备以监视信标。 We generate UUID's from iOS devices as well, but the iOS generated UUID's seem to be fine. 我们也从iOS设备生成UUID,但iOS生成的UUID似乎还不错。

Here is the problem: 这是问题所在:

  • Server issued UUID, pulled in via API and applied to iOS device. 服务器发布UUID,通过API提取并应用于iOS设备。 Monitor Regions. 监视区域。
  • App is unable to monitor or range this Beacon using the supplied UUID. 应用程序无法使用提供的UUID监视或定位此Beacon。
  • 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. 我们正在使用Radius Networks / AltBeacon库来监视Android设备上的信标,并且可以使用相同的UUID来监视和调整信标。
  • iOS generated UUID's uploaded to the server work just fine. iOS生成的UUID上传到服务器工作正常。 Only server/Ruby based UUID's don't work on iOS. 仅基于服务器/ Ruby的UUID在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. 我对自己的区域监视代码100%充满信心,这不是问题。 When I output the UUID's, they are the correct format, and I'm not getting any errors at all from iOS. 当我输出UUID时,它们是正确的格式,并且从iOS中我完全没有收到任何错误。 It seems like a legit UUID, but for some reason, iOS will not see it. 它看起来像是合法的UUID,但由于某些原因,iOS无法看到它。 Help!!! 救命!!!

In order to detect a beacon on iOS, the ProximityUUID you provide to the monitoring APIs must match that of a beacon transmitter. 为了在iOS上检测到信标,您提供给监视API的ProximityUUID必须与信标发送器的ProximityUUID相匹配。 Your question suggests you are generating a random UUID in Ruby and then expecting to detect a beacon with the same UUID. 您的问题建议您在Ruby中生成一个随机UUID,然后期望检测到具有相同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. 这永远行不通,因为有太多可能的UUID,以至于找到与随机生成的UUID匹配的信标的机会几乎为零。

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. 该问题没有说明您如何使用此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. UUID示例和设置监控的iOS代码片段也很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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