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

后端 未结 1 842
轻奢々
轻奢々 2021-01-21 11:50

I have been at this over 3 months and pulling my hair out. So please don\'t respond with beginner answers.

I am wondering if, in 2017 with iOS 10+, there is A

相关标签:
1条回答
  • 2021-01-21 12:23

    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.

    0 讨论(0)
提交回复
热议问题