Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17473] iOS: Bluetooth LE state restoration callbacks are blocked in Titanium

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsiOS
LabelsTCSupport, ble, bluetooth, ibeacon, ios
ReporterAndrey Pervushin
AssigneeUnknown
Created2014-07-28T07:13:42.000+0000
Updated2018-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.

Comments

  1. Andrey Pervushin 2014-07-28

    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
  2. Ingo Muschenetz 2014-07-28

    Yes, move it please.
  3. Mauro Parra-Miranda 2014-08-08

    Thanks for your report! The Platform team will set the priority on this.

JSON Source