In iOS 10+, is there ANY way to RELIABLY wake up an app

守給你的承諾、 提交于 2019-12-01 23:00:15

Finally solved this problem! The solution was to use 2 Bluetooth chips in my solution. One chip to be a dedicated BT-Connected Paired/Auth/Bonded device and the other to be a dedicated iBeacon advertiser. With this solution I was able to both, wake up the app whenever I want (by power cycling the iBeacon chip at will) and connecting for BT encryption required characteristics.

Using the didEnterRegion method of the CLLocationManager class, in the background, I can start up the bluetooth manager... connect to the device in the background and then retrieve data successfully over a previously paired connection.

UPDATE: as a side note, it's good to mention that while the iBeacon is fairly reliable in waking up the application in the background, only the didEnterRegion method happens immediately when the iBeacon is found or turned on. The didExitRegion method takes me (on average) about 30 seconds to fire after I turn off the iBeacon or it is no longer in range.

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