{ "id": "133794", "key": "TIMOB-17473", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-07-28T07:13:42.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "TCSupport", "ble", "bluetooth", "ibeacon", "ios" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [ { "id": "39377", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "132012", "key": "AC-1407", "fields": { "summary": "Bluetooth LE state restoration callbacks are blocked in Titanium", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2018-02-28T20:04:09.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The following 2 callbacks never get called in Titanium when adding handling for the callback in a module.\r\n\r\n- (void)centralManager:(CBCentralManager *)central willRestoreState:(NSDictionary *)dict\r\n- (void)peripheralManager:(CBPeripheralManager *)peripheral willRestoreState:(NSDictionary *)dict\r\n\r\nThe code for handling the callbacks works as expected in a native app. \r\nThe 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. \r\n\r\nThe callbacks are supposed to be called only when the app was previously in the background, then was killed off by iOS, \r\nand then some bluetooth activity for the app comes in.\r\n\r\nSimilarly, the situation occurs for the following iBeacon related callbacks when the app has been killed off.\r\n\r\n- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region\r\n- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region\r\n- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region\r\n\r\nThe 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.\r\n", "attachment": [], "flagged": false, "summary": "iOS: Bluetooth LE state restoration callbacks are blocked in Titanium", "creator": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "environment": null, "comment": { "comments": [ { "id": "315951", "author": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "body": "Developing ios module with BLE integration faced with same problem.\r\nI've asked question here\r\nhttp://developer.appcelerator.com/question/176233/add-code-to-application-didfinishlaunchingwithoptions-from-my-module#answer-280819\r\nas a result I've try to add observer in load method but it doesn't work", "updateAuthor": { "name": "rian", "key": "rian", "displayName": "Andrey Pervushin", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2014-07-28T07:20:43.000+0000", "updated": "2014-07-28T07:20:43.000+0000" }, { "id": "315997", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, move it please.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-28T17:34:05.000+0000", "updated": "2014-07-28T17:34:05.000+0000" }, { "id": "317657", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Thanks for your report! The Platform team will set the priority on this. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-08T07:00:13.000+0000", "updated": "2014-08-08T07:00:13.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }