[TIMOB-17473] iOS: Bluetooth LE state restoration callbacks are blocked in Titanium
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.3.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | TCSupport, ble, bluetooth, ibeacon, ios |
Reporter | Andrey Pervushin |
Assignee | Unknown |
Created | 2014-07-28T07:13:42.000+0000 |
Updated | 2018-02-28T20:04:09.000+0000 |
Description
The following 2 callbacks never get called in Titanium when adding handling for the callback in a module.
- (void)centralManager:(CBCentralManager *)central willRestoreState:(NSDictionary *)dict
- (void)peripheralManager:(CBPeripheralManager *)peripheral willRestoreState:(NSDictionary *)dict
The code for handling the callbacks works as expected in a native app.
The same code can be inserted into Titanium module and tested in a Titanium app and you will notice that the the app does restore itself to the background however the callback handlers never fire.
The callbacks are supposed to be called only when the app was previously in the background, then was killed off by iOS,
and then some bluetooth activity for the app comes in.
Similarly, the situation occurs for the following iBeacon related callbacks when the app has been killed off.
- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
The above iBeacon related functions are being called under normal circumstances, just not when the app was killed off as they are in a native app.
Developing ios module with BLE integration faced with same problem. I've asked question here http://developer.appcelerator.com/question/176233/add-code-to-application-didfinishlaunchingwithoptions-from-my-module#answer-280819 as a result I've try to add observer in load method but it doesn't work
Yes, move it please.
Thanks for your report! The Platform team will set the priority on this.