我可以使用iOS模拟器开发iBeacon应用程序吗? [英] Can I develop iBeacon application with the iOS simulator?

查看:138
本文介绍了我可以使用iOS模拟器开发iBeacon应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试开发一个iOS应用程序以接受iBeacon通知.如果iOS模拟器可以使用MacBook的蓝牙功能来接受iBeacon消息,则非常方便.

I was trying to develop an iOS application to accept iBeacon notifications. It's handy if the iOS simulator can use BlueTooth capability of MacBook to accept an iBeacon message.

iOS模拟器是否可以接受来自外部真实iBeacon设备的通知?

Is there a way that iOS simulator can accept notification from an external real iBeacon device?

推荐答案

否,您无法从iOS模拟器获取任何CoreLocation iBeacon事件或CoreBluetooth事件.这使得它在开发iBeacon应用程序中的用途非常有限.

No, you cannot get any CoreLocation iBeacon events or CoreBluetooth events from the iOS simulator. This makes it of very limited use in developing iBeacon applications.

尽管您确实需要一台具有iOS7和BLE(iPhone 4S +)的真实物理设备进行测试,但是您仍然可以在模拟器上进行大量开发工作.您只需要构建后门"或插入测试代码即可触发iBeacon事件. (没有什么可以阻止您从测试代码中显式调用CoreLocation委托方法的.)我发现让iBeacon部分代码正常工作约占工作量的10%.其余的应用程序开发可以在模拟器中完成.

While you will certainly need a real physical device with iOS7 and BLE (iPhone 4S+) for testing, you can still do lots of you development on the simulator. You simply need to build "back doors" or insert test code to trigger your iBeacon events. (There is nothing to prevent you from calling your CoreLocation delegate methods explicitly from test code.) I find that getting the iBeacon part of the code working is about 10 percent of the job. The rest of the app development can be done in the simulator.

这篇关于我可以使用iOS模拟器开发iBeacon应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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