Can I develop iBeacon application with the iOS simulator?

こ雲淡風輕ζ 提交于 2020-01-23 04:45:17

问题


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.

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


回答1:


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.

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.



来源:https://stackoverflow.com/questions/22109083/can-i-develop-ibeacon-application-with-the-ios-simulator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!