{ "id": "170655", "key": "TIMOB-25618", "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": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-05-15T20:42:13.000+0000", "created": "2017-12-19T20:50:08.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Escalation" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-05-15T20:43:05.000+0000", "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" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5. Description: \r\nCustomer is having issues accessing Localytics method properly\r\n\r\nh5. Code: \r\nWe are using the Localytics SDK for Analytics and we are having issues accessing a specific method. Attached is the pod file that we are using. \r\n\r\nWe are using the setOptions method to set the \"max_monitoring_regions\" option in our titanium app but it does not work. Below is the code snippet. \r\n\r\nCan you check if we are using the method in the right way with the right arguments? \r\n\r\nCode: \r\n{code}\r\nvar TiApp = require('Titanium/TiApp'); \r\n\r\nvar Localytics = require(\"Localytics/Localytics\"); \r\nconsole.log(\"launction options are \" + Localytics + localyticsKey); \r\nLocalytics.autoIntegrateLaunchOptions(³APP_KEY\", TiApp.app.launchOptions);\r\nLocalytics.setLoggingEnabled(true); \r\nvar options = { \"max_monitoring_regions\" : 2 };\r\nLocalytics.setOptions(options); \r\n{code}\r\n\r\nh5. Podfile: \r\n{quote}install! 'cocoapods',\r\n :integrate_targets => false\r\n\r\nplatform :ios, '7.0'\r\n\r\ntarget 'myWorkplace' do\r\npod 'LocalyticsStaticFramework', '~> 4.2'\r\nend\r\n{quote}\r\n\r\nh5. Request:\r\nCan you see any issues in their implementation or have any changes been made in hyperloop that they need to address in the implementation? ", "attachment": [ { "id": "64878", "filename": "beaconcrash.txt", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T23:09:33.000+0000", "size": 1025317, "mimeType": "text/plain" }, { "id": "65094", "filename": "com.abc.localytics-iphone-1.0.0.zip", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-04-29T07:13:46.000+0000", "size": 7069307, "mimeType": "application/zip" }, { "id": "64753", "filename": "index.js", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-25T20:45:08.000+0000", "size": 49214, "mimeType": "text/javascript" }, { "id": "64754", "filename": "iOSBeacon.js", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-25T20:45:07.000+0000", "size": 5806, "mimeType": "text/javascript" }, { "id": "64755", "filename": "iOSBeaconCrashLog.txt", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-25T20:45:09.000+0000", "size": 7522403, "mimeType": "text/plain" }, { "id": "65090", "filename": "localytics_module_error_log.txt", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-04-27T19:38:40.000+0000", "size": 1005765, "mimeType": "text/plain" }, { "id": "63842", "filename": "Localytics.h", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T20:58:25.000+0000", "size": 52437, "mimeType": "text/x-c" }, { "id": "64853", "filename": "LogOutput.txt", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-13T23:43:25.000+0000", "size": 686275, "mimeType": "text/plain" }, { "id": "64806", "filename": "WorkplaceSvc_Dev__2-5-18_12-44_PM.crash", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T17:56:13.000+0000", "size": 55509, "mimeType": "application/octet-stream" }, { "id": "64880", "filename": "WorkplaceSvc_Dev.app.dSYM.zip", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T23:09:38.000+0000", "size": 6673163, "mimeType": "application/zip" }, { "id": "64854", "filename": "WorkplaceSvc_Dev 2-13-18, 5-17 PM.crash", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-13T23:43:24.000+0000", "size": 62211, "mimeType": "application/octet-stream" }, { "id": "64879", "filename": "WorkplaceSvc_Dev 2-21-18, 4-49 PM.crash", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T23:09:33.000+0000", "size": 83731, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "App is unable to access Localytics method properly", "creator": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 997, "state": "closed", "name": "2018 Sprint 03 SDK", "startDate": "2018-01-28T16:23:12.178Z", "endDate": "2018-02-11T16:23:00.000Z", "completeDate": "2018-02-12T04:22:49.354Z", "originBoardId": 114 }, { "id": 985, "state": "closed", "name": "2018 Sprint 01 SDK", "startDate": "2017-12-31T16:58:54.631Z", "endDate": "2018-01-14T16:58:00.000Z", "completeDate": "2018-01-17T22:44:27.028Z", "originBoardId": 114 }, { "id": 990, "state": "closed", "name": "2018 Sprint 02 SDK", "startDate": "2018-01-14T22:48:43.544Z", "endDate": "2018-01-28T22:48:00.000Z", "completeDate": "2018-01-29T16:22:42.911Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "432448", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[[~emerriman], Can you please take a look at this. Its a pressing issue for ABC.", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T18:09:03.000+0000", "updated": "2017-12-20T18:09:03.000+0000" }, { "id": "432451", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cc [~pkalita]\r\n[~arohini] \r\nI don't know if the localytics sdk is supported by us or not. Is there any other information as to what is not working ? The ticket just mentions a code snippet but it is not clear what behavior they are seeing and why they are saying it is not working ? ", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T19:02:57.000+0000", "updated": "2017-12-20T19:02:57.000+0000" }, { "id": "432452", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~spulipakkam] they are doubtful the that method names passed through hyperloop are being implemented correctly. Is there any way to map out for them what the Method names would be? ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T19:05:18.000+0000", "updated": "2017-12-20T19:05:18.000+0000" }, { "id": "432457", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": " [^Localytics.h] \r\n[~emerriman] I am not sure if we do something like this (see comment from Victor above). I have attached the Localytics method signatures i got from their sdk. \r\n[~vvazquezmontero] I still feel the ticket needs more info. Have they used localytics sdk with hyperloop before ? Are they moving to a new localytics sdk version ( 3 to 4) . What kind of error are they seeing ? \r\nIf we have not done this kind of mapping for any other native library i don't understand why we would need to do it for localytics? \r\n", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T21:02:58.000+0000", "updated": "2017-12-20T21:02:58.000+0000" }, { "id": "432458", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~spulipakkam]I will ask those questions to the customer but according to them we have done this for them before and it is expected from us. \r\n", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T21:06:12.000+0000", "updated": "2017-12-20T21:06:12.000+0000" }, { "id": "432459", "author": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vvazquezmontero] If we have done that for them before wouldn't it be for a subset or specific method signatures. Localytics is not a small sdk it is a lot of methods! If [~emerriman] confirms that this is something we would be able to do then i think we should ask the customer to give us a list of methods they would be using. I don't think we should be spending time on documenting the entire localytics sdk. They(localytic) themselves have not documented their APIs well.", "updateAuthor": { "name": "spulipakkam", "key": "spulipakkam", "displayName": "Srinivasan Pulipakkam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-20T21:13:23.000+0000", "updated": "2017-12-20T21:13:39.000+0000" }, { "id": "432476", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vvazquezmontero], [~spulipakkam] the methods names are definitely correct, otherwise Hyperloop would throw an error at runtime that there is no such method.\r\n\r\nA quick debugging shows that the methods indeed reach the native side, but for some reason they don't show the expected behavior. {{Localytics.setLoggingEnabled(true)}} for example should enable the logging, but no log messages from Localytics are seen after making this call. Further investigating this right now.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-12-21T14:35:48.000+0000", "updated": "2017-12-21T14:35:48.000+0000" }, { "id": "432478", "author": { "name": "patilamrut", "key": "patilamrut", "displayName": "patilamrut", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Victor Vazquez Montero, @Srinivasan Pulipakkam , @Jan Vennemann , @Pooja Kalita\r\nwe have been using localytics for long time now.\r\nTill now we have used init method, tagscreen, tagevent, set profile\r\nthese methods are working fine for now. \r\nwe have always used localytics static framework 4.2.\r\n\r\nI hope this helps.", "updateAuthor": { "name": "patilamrut", "key": "patilamrut", "displayName": "patilamrut", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-21T15:05:47.000+0000", "updated": "2017-12-21T15:05:47.000+0000" }, { "id": "432749", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~morahman], [~emerriman]. did some more debugging and i couldn't find a reason why it does not work for the customer with this specific method yet. I tried several other methods and all of them seem to work as expected. As [~patilamrut] mentioned, they are also using Localytics successfully.\r\n\r\nThe logging issues i mentioned in my previous comment are likely related to the way we retrieve logs. I verified with {{Localytics.isLoggingEnabled}} that the logging is actually enabled after calling {{Localytics.setLoggingEnabled(true)}}, they just don't show up. I'll ping [~cbarber] on this to see if the he has any idea why this is happening. I even created a native module to verify that it's not in any way related to Hyperloop since it shows the same behavior.\r\n\r\nWhile we further validate the logging issues, is it possible to get more details from the customer about the exact issue? {{Localytics.setOptions}} is not documented anywhere except for one [Help Article|https://help.localytics.com/t/how-can-i-use-localytics-side-by-side-with-another-geofencing-or-beacon-service/400]. Is there an easy way for us to verify the iOS monitoring limitations?", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-04T16:34:11.000+0000", "updated": "2018-01-04T16:34:53.000+0000" }, { "id": "432848", "author": { "name": "patilamrut", "key": "patilamrut", "displayName": "patilamrut", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We have created a native iOS project with localytics SDK and Estimote beacon SDK. \r\nWith that we are able to use localytics setoptions method and use estimote sdk to monitor beacon.\r\nThis proves that issue is clearly with hyperloop.\r\nAs if i use hyperloop i cannot use setoptions method.", "updateAuthor": { "name": "patilamrut", "key": "patilamrut", "displayName": "patilamrut", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-08T16:18:34.000+0000", "updated": "2018-01-08T16:18:34.000+0000" }, { "id": "433332", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~jvennemann] Amerisource has come back with a query: \r\n{quote}Based on our testing, the \"Localytics.integrate(\"API_KEY\")\" does not send the analytics data to Localytics. We have not received any analytics data since the update we made yesterday. \r\n\r\nWe are trying couple other methods that supplement the \"Loclaytics.integrate()\" method as mentioned in the Localytics documentation and testing it. I will keep updating our progress in this ticket. \r\n\r\nPlease let us know if you have any insight in this matter. We request you to close this case after we confirm.{quote}", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-19T16:33:33.000+0000", "updated": "2018-01-19T16:33:33.000+0000" }, { "id": "433541", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vvazquezmontero], after further investigation of this issue we think this not related to Hyperloop but rather an incompatibility of the used beacon module and Localytics auto integration. To test it they can use the following code, which replaces their iosBeaconLocator with a complete Hyperloop implementation:\r\n{code}\r\nvar NSUUID = require('Foundation/NSUUID');\r\nvar CLBeacon = require('CoreLocation/CLBeacon');\r\nvar CLBeaconRegion = require('CoreLocation/CLBeaconRegion');\r\nvar CLLocationManager = require('CoreLocation/CLLocationManager');\r\nvar { CLProximityUnknown, CLProximityImmediate, CLProximityNear, CLProximityFar, CLRegionStateInside } = require('CoreLocation');\r\nvar ESTIMOTE_UUID = 'B9407F30-F5F8-466E-AFF9-25556B57FE6D';\r\nvar handleProximity = null;\r\nvar IDENTIFIER = 'Estimote Beacons';\r\nvar locationManager = null;\r\nvar beaconProximities = {};\r\n\r\nexports.startMonitoring = function(userProximityHandler) {\r\n\tconsole.log(\"in starMonitoring for iOSBeacons\");\r\n\r\n\thandleProximity = userProximityHandler;\r\n\r\n\tvar LocationManagerDelegate = Hyperloop.defineClass('LocationManagerDelegate', 'NSObject', 'CLLocationManagerDelegate');\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:didEnterRegion:',\r\n\t\targuments: [ 'CLLocationManager', 'CLBeaconRegion' ],\r\n\t\tcallback: function didEnterRegion(locationManager, beaconRegion) {\r\n\t\t\tTi.API.debug('Entered beacon region ' + beaconRegion.identifier);\r\n\t\t\tlocationManager.startRangingBeaconsInRegion(beaconRegion);\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:didExitRegion:',\r\n\t\targuments: [ 'CLLocationManager', 'CLBeaconRegion' ],\r\n\t\tcallback: function didExitRegion(locationManager, beaconRegion) {\r\n\t\t\tTi.API.debug('Exited beacon region ' + beaconRegion.identifier);\r\n\t\t\tlocationManager.stopRangingBeaconsInRegion(beaconRegion);\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:didStartMonitoringForRegion:',\r\n\t\targuments: [ 'CLLocationManager', 'CLBeaconRegion' ],\r\n\t\tcallback: function didExitRegion(locationManager, beaconRegion) {\r\n\t\t\tTi.API.debug('Started monitoring beacon region ' + beaconRegion.identifier);\r\n\t\t\tlocationManager.requestStateForRegion(beaconRegion);\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:didDetermineState:forRegion:',\r\n\t\targuments: [ 'CLLocationManager', 'CLRegionState', 'CLBeaconRegion' ],\r\n\t\tcallback: function didExitRegion(locationManager, regionState, beaconRegion) {\r\n\t\t\tif (regionState == CLRegionStateInside) {\r\n\t\t\t\tTi.API.debug('Already inside region ' + beaconRegion.identifier + ', start ranging.');\r\n\t\t\t\tlocationManager.startRangingBeaconsInRegion(beaconRegion);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:monitoringDidFailForRegion:withError:',\r\n\t\targuments: [ 'CLLocationManager', 'CLBeaconRegion', 'NSError' ],\r\n\t\tcallback: function monitoringDidFailForRegion(locationManager, beaconRegion, error) {\r\n\t\t\tTi.API.error('Monitoring beacon region ' + beaconRegion.identifier + ' failed!');\r\n\t\t\tTi.API.error(error.localizedDescription);\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:didRangeBeacons:inRegion:',\r\n\t\targuments: [ 'CLLocationManager', 'NSArray', 'CLBeaconRegion'],\r\n\t\tcallback: function didRangeBeacons(locationManager, beacons, beaconRegion) {\r\n\t\t\tTi.API.debug(beacons.count + ' beacons in range');\r\n\t\t\tfor (var i = 0; i < beacons.count; i++) {\r\n\t\t\t\tvar beacon = CLBeacon.cast(beacons.objectAtIndex(i));\r\n\t\t\t\tTi.API.debug('Beacon ' + beacon.proximityUUID + ' proximity: ' + beacon.proximity);\r\n\t\t\t}\r\n\r\n\t\t\treportCrossingsInRegion(beacons, beaconRegion, handleProximity);\r\n\t\t}\r\n\t});\r\n\tLocationManagerDelegate.addMethod({\r\n\t\tselector: 'locationManager:rangingBeaconsDidFailForRegion:withError:',\r\n\t\targuments: [ 'CLLocationManager', 'CLBeaconRegion', 'NSError' ],\r\n\t\tcallback: function rangingBeaconsDidFailForRegion(locationManager, beaconRegion, error) {\r\n\t\t\tTi.API.error('Ranging beacon region ' + beaconRegion.identifier + ' failed!');\r\n\t\t\tTi.API.error(error.localizedDescription);\r\n\t\t}\r\n\t});\r\n\r\n\tlocationManager = CLLocationManager.alloc().init();\r\n\tlocationManager.delegate = new LocationManagerDelegate();\r\n\r\n\tvar beaconRegion = CLBeaconRegion\r\n\t\t.alloc()\r\n\t\t.initWithProximityUUIDIdentifier(NSUUID.alloc().initWithUUIDString(ESTIMOTE_UUID), IDENTIFIER);\r\n\tlocationManager.startRangingBeaconsInRegion(beaconRegion);\r\n};\r\n\r\nexports.stopMonitoring = function(){\r\n\tvar rangedRegions = locationManager.rangedRegions;\r\n\tfor (var i = 0; i < rangedRegions.count; i++) {\r\n\t\tlocationManager.stopRangingBeaconsInRegion(rangedRegions[i]);\r\n\t}\r\n};\r\n\r\n/**\r\n * @see https://github.com/jbeuckm/TiBeacons/blob/master/Classes/OrgBeuckmanTibeaconsModule.m#L398\r\n */\r\nfunction reportCrossingsInRegion(beacons, beaconRegion, callback) {\r\n\tfor (var i = 0; i < beacons.count; i++) {\r\n\t\tvar current = CLBeacon.cast(beacons.objectAtIndex(i));\r\n\t\tvar identifier = current.proximityUUID.UUIDString + '/' + current.major + '/' + current.minor;\r\n\r\n\t\tvar previous = beaconProximities[identifier];\r\n\t\tif (previous && previous.proximity != current.proximity) {\r\n\t\t\tvar event = generateBeaconDetails(current);\r\n\t\t\tevent.identifier = beaconRegion.identifier,\r\n\t\t\tevent.fromProximity = stringifyProxymity(previous.proximity);\r\n\t\t\tcallback(event);\r\n\t\t} else {\r\n\t\t\tvar event = generateBeaconDetails(current);\r\n\t\t\tevent.identifier = beaconRegion.identifier,\r\n\t\t\tcallback(event);\r\n\t\t}\r\n\r\n\t\tbeaconProximities[identifier] = current;\r\n\t}\r\n}\r\n\r\n/**\r\n * @see https://github.com/jbeuckm/TiBeacons/blob/master/Classes/OrgBeuckmanTibeaconsModule.m#L450\r\n */\r\nfunction generateBeaconDetails(beacon) {\r\n\treturn {\r\n\t\tuuid: beacon.proximityUUID.UUIDString,\r\n\t\tmajor: beacon.major,\r\n\t\tminor: beacon.minor,\r\n\t\tproximity: stringifyProxymity(beacon.proximity),\r\n\t\taccuracy: beacon.accuracy,\r\n\t\trssi: beacon.rssi\r\n\t};\r\n}\r\n\r\n/**\r\n * @see https://github.com/jbeuckm/TiBeacons/blob/master/Classes/OrgBeuckmanTibeaconsModule.m#L498\r\n */\r\nfunction stringifyProxymity(beaconProximity) {\r\n\tswitch (beaconProximity) {\r\n\t\tcase CLProximityNear:\r\n\t\t\treturn 'near';\r\n\t\tcase CLProximityImmediate:\r\n\t\t\treturn 'immediate';\r\n\t\tcase CLProximityFar:\r\n\t\t\treturn 'far';\r\n\t\tcase CLProximityUnknown:\r\n\t\tdefault:\r\n\t\t\treturn 'unknown';\r\n\t\t}\r\n}\r\n{code}\r\n\r\nThis will work with {{Localytics.autoIntegrateLaunchOptions}} and includes all delegate methods required for monitoring and ranging beacons. Another minor note: They only use the When-In-Use Authorization style where monitoring regions is not allowed. However, for the sake of completeness, the above code snippet also has monitoring delegates setup. This also means that Localytics.setOptions() is not necessary since Localytics cannot monitor regions and their code only uses ranging.\r\n", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-23T18:46:04.000+0000", "updated": "2018-01-23T18:46:04.000+0000" }, { "id": "433624", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey Jan, \r\nI've shared that with the customer and will update you once then confirm", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-24T22:25:31.000+0000", "updated": "2018-01-24T22:25:31.000+0000" }, { "id": "433690", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] they are now facing crashes while using the app: \r\n{quote}Hello Team, \r\n\r\nThanks for providing the Hyperloop beacon source code for iOS. We implemented the source code in the project and the beacon monitoring started to work. Although, the iOS app was crashing with a SIGSEGV error after opening the app and staying in it for sometime (less than 2 min of navigating in the app). Attached are the crash details and the files that we changed. \r\n\r\nAlso, per Jan's suggestion, I also added the \"AlwaysUse\" authorization for location. \r\n\r\n{code}NSLocationAlwaysUsageDescription \r\nThis application monitors your location to show you information of places/events you're passing by.NSCameraUsageDescription {code}\r\n\r\nSteps to replicate the crash: \r\n\r\n- Use the below code and run the app \r\n- The app requests user for location permission \r\n- On granting permission, the app monitors beacons and displays the beacon information if it finds one \r\n- Navigate to the app by selecting the location (Valley forge) \r\n- Tap on 'View Schedule' \r\n- After you go through few screens, the app crashes. There is no specific screen/point/flow where the app crashes. \r\n\r\nOn observing the crash logs, it seems to be a SIGSEGV error. \r\n\r\nPlease let us know if we are missing anything.{quote}\r\n\r\nFiles:\r\n [^index.js] [^iOSBeacon.js] [^iOSBeaconCrashLog.txt] ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-25T20:45:17.000+0000", "updated": "2018-01-25T20:45:17.000+0000" }, { "id": "433821", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~jvennemann] Is there any update here? The customer is asking for updates.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-30T10:04:21.000+0000", "updated": "2018-01-30T10:04:21.000+0000" }, { "id": "433838", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Looking into it right now! I'll keep you posted once i know more.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-30T16:56:35.000+0000", "updated": "2018-01-30T16:56:35.000+0000" }, { "id": "433847", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~vvazquezmontero], [~mrahman], a couple of questions as i'm not able to reproduce the crash in my environment.\r\n\r\n- Did the crash only occur after changes to the code in index.js?\r\n- There is a minor bug in my initial beacon locator implementation which results in the beacon proximity always being \"unknown\". I was too optimistic and thought destructuring would work. To fix it they have to replace line 5 in iosBeaconLocator.js with\r\n{code}\r\nvar CoreLocation = require('CoreLocation');\r\nvar CLProximityNear = CoreLocation.CLProximityNear;\r\nvar CLProximityImmediate = CoreLocation.CLProximityImmediate;\r\nvar CLProximityFar = CoreLocation.CLProximityFar;\r\nvar CLProximityUnknown = CoreLocation.CLProximityUnknown;\r\n{code}\r\n- Can they provide a full crash report as a {{.crash}} file? The plain device log makes it hard to exactly identify where it crashed in JavaScriptCore.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-30T19:18:01.000+0000", "updated": "2018-01-30T19:18:01.000+0000" }, { "id": "433953", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] Can you provide me what you see on your end and the app version and the environment (QA/Dev) that you’re pointing you? Request from customer", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-01T18:19:36.000+0000", "updated": "2018-02-01T18:19:36.000+0000" }, { "id": "434055", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] They were able to resolve the issues they were seeing on friday through a call but now they are seeing a crash and have shared the crash report: [^WorkplaceSvc_Dev__2-5-18_12-44_PM.crash] ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-05T17:56:14.000+0000", "updated": "2018-02-05T17:56:14.000+0000" }, { "id": "434104", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks [~vvazquezmontero], that helps a lot! Looking into it now.", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-06T16:26:46.000+0000", "updated": "2018-02-06T16:26:46.000+0000" }, { "id": "434264", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jvennemann] do we have anything to share with the customer? ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-08T17:35:29.000+0000", "updated": "2018-02-08T17:35:29.000+0000" }, { "id": "434743", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~jvennemann] they have provided the logs needed and also commented: \r\nAlso, just an FYI - we are targeting the app to use the latest 7.0.2 SDK. Just want to ensure that the latest hyperloop has the updates needed for this issue.\r\n [^beaconcrash.txt] [^WorkplaceSvc_Dev 2-21-18, 4-49 PM.crash] [^WorkplaceSvc_Dev.app.dSYM.zip] \r\nlet me know if you need anything else. \r\n\r\n", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-21T23:09:49.000+0000", "updated": "2018-02-21T23:09:49.000+0000" }, { "id": "435551", "author": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~amukherjee] Can we pls make this a priority?", "updateAuthor": { "name": "arohini", "key": "arohini", "displayName": "Ajith Rohini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-13T18:41:03.000+0000", "updated": "2018-03-13T18:41:03.000+0000" }, { "id": "435557", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~arohini] The issue we have is that Jan is our only developer who has the the knowledge deep enough to fix it. Hans proposed a workaround, and I'll work with him tomorrow to test it. But for an actual fix, it won't be until next week at the earliest when Jan gets back", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-13T21:03:41.000+0000", "updated": "2018-03-13T21:03:41.000+0000" }, { "id": "437403", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I have updated the official Localytics module based on the changes [~gmathews] made before by:\r\n- updating the Localytics SDK to 5.1.0 (latest)\r\n- adding {{startMonitoring(callback)}} and {{stopMonitoring()}} to the module API\r\n\r\nThis allows you to use beacon monitoring without additional modules. It's nearly 1:1 the Hyperloop implementation in native code. I have also made a pull request against the official Localytics repository and it contains the new module binary (com.localytics-iphone-5.1.0.zip):\r\n\r\nhttps://github.com/localytics/localytics-titanium/pull/6\r\n\r\nP.S.: Checking out the PR locally will also fix the error seen before (\"invalid bitcode signature\") that I addressed.\r\n\r\n*EDIT*: I have made a test app that is successfully able to range beacons:\r\n{code:js}\r\n[INFO] test_localytics/1.0 (6.2.2.42c7196)\r\n[INFO] Starting monitoring ...\r\n[INFO] No location permissions, yet. Requesting ...\r\n[INFO] Permissions new granted, let's go!\r\n[INFO] {\r\n[INFO] accuracy = \"0.215443\";\r\n[INFO] identifier = \"Estimote Beacons\";\r\n[INFO] major = 2;\r\n[INFO] minor = 1000;\r\n[INFO] proximity = immediate;\r\n[INFO] rssi = \"-46\";\r\n[INFO] uuid = \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\";\r\n[INFO] }\r\n[INFO] {\r\n[INFO] accuracy = \"0.315342\";\r\n[INFO] fromProximity = immediate;\r\n[INFO] identifier = \"Estimote Beacons\";\r\n[INFO] major = 2;\r\n[INFO] minor = 1000;\r\n[INFO] proximity = near;\r\n[INFO] rssi = \"-52\";\r\n[INFO] uuid = \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\";\r\n[INFO] }\r\n{code}\r\nIt uses the above module and can be downloaded [here|https://www.dropbox.com/s/vfam1mxn0atnhbk/test_localytics.zip?dl=1]. I assume this should resolve all remaining issues regarding beacons. If there is more hands on help needed, please let me know. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-05T08:47:40.000+0000", "updated": "2018-05-05T12:19:49.000+0000" } ], "maxResults": 78, "total": 78, "startAt": 0 } } }