iBeacon应用程序-同时接收/发送 [英] iBeacon app - receiving/transmitting at the same time

查看:105
本文介绍了iBeacon应用程序-同时接收/发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序如何同时传输其iBeacon(做广告)和其他iBeacon的范围(发现运行同一应用程序的对等对象)?

How can my app transmit its iBeacon (to advertise itself) AND range for other iBeacons (to discover peers running the same app) at the same time?

那里有代码示例吗?

推荐答案

是的,这是可能的.您可以下载我的找到iBeacon 应用并尝试它同时在两个iOS设备上.您可以打开每个设备上的发射器,并同时为iBeacon进行测距,并成功查看来自其他设备的iBeacon传输.

Yes, this is possible. You can see for yourself by downloading my Locate for iBeacon app and trying it on two iOS devices simultaneously. You can turn on a transmitter on each device and simultaneously range for iBeacons and successfully see the iBeacon transmission from the other device.

唯一的限制是它只能在前台使用,并且iOS设备在测距时将看不到它自己的传输.

The only limitations are that this only works in the foreground, and an iOS device will not see it's own transmission when ranging.

执行此操作实际上没有任何技巧.任何用于传输或测距的示例代码都可以正常工作...只需同时设置它们.

There is not really any trick to doing this. Any sample code for transmitting or ranging works fine... Just set them both up at the same time.

这篇关于iBeacon应用程序-同时接收/发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆