core bluetooth - Launching iOS BLE Central application on iPhone reboot -
i planning develop ios application using corebluetooth framework monitors pedometer peripheral continuously , counts footsteps.
i know if backgroud execution mode set ble central, application continue receive ble events in background.
apple documentation states in case app gets terminated due low memory, system can keep track of ble events particular central manager if state preservation , restoration adopted.
assume have ios application operates in central mode. app subscribed receive notification pedometer when ever footstep characteristic changes.
i have adopted following in app.
- ble central background mode
- ble state preservation/restoration central manager
i start app, scan, pair , connect pedometer , app starts receiving footsteps.
my questions:
now if iphone reboots, continue receive ble events app launched in background without user having manually launch application again , connect pedometer?
if app terminated user explicitly using multitasking gesture, app able receive ble events without user having manually launch application again , connect pedometer?
is there way launch application on ios boot up?
- now if iphone reboots, continue receive ble events app launched in background without user having manually launch application again , connect pedometer?
your app won't receive ble events because apps started in terminated state after reboot (despite remaining in app switcher). user have manually launch app @ least once after reboot in order use ble.
- if app terminated user explicitly using multitasking gesture, app able receive ble events without user having manually launch application again , connect pedometer?
same above, app has entered terminated state, won't able communicate using ble until explicitly launched again.
- is there way launch application on ios boot up?
ios doesn't provide way launch application on boot.
the 1 exception of can find ibeacons. if app registers receive updates specific ibeacon, ios launch app when finds (even after reboot or if user explicitly kills switcher). when ibeacon callback can start ble logic , run in background per usual. of course means need advertise ibeacon on pedometer, may or may not feasible.
bear in mind detection of ibeacon pretty finicky, after reboot. have little guarantee how fast or if delivered ibeacon callback start app. it's something.
Comments
Post a Comment