{ "id": "170805", "key": "AC-5524", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2018-01-17T08:41:13.000+0000", "created": "2018-01-16T19:47:14.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-01-17T08:41:14.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15000", "name": "Hyperloop" } ], "description": "The latest intecom module in hyperloop produces this configurations. I cant sent a string to it as its as it seems to require and NS data object and i'm sensing a String. Can i convert it?\r\n\r\nTrying:\r\n{{TiIntercom.setDeviceToken('f4cf7dd07dac7a35d6f8479129d9cb05e4dc6a3a087640025121d6dcd76dc8df');\r\n}}\r\nError:\r\n{{: [ERROR] -[__NSCFString bytes]: unrecognized selector sent to instance 0x1c80ad1a0\r\n: [ERROR] TiIntercom ex: {\"line\":147,\"column\":26,\"sourceURL\":\"file:///var/containers/Bundle/Application/E070E5ED-B942-4574-8FB1-B490282A1A82/Buildcloud.app/hyperloop/intercom/intercom.js\",\"description\":\"-[__NSCFString bytes]: unrecognized selector sent to instance 0x1c80ad1a0\",\"name\":\"NSInvalidArgumentException\",\"nativeStack\":\"1 libobjc.A.dylib 0x0000000180580528 objc_exception_throw + 56\\134n2 CoreFoundation 0x0000000181347828 + 0\\134n3 CoreFoundation 0x000000018133fd10 + 1380\\134n4 CoreFoundation 0x0000000181224ecc _CF_forwarding_prep_0 + 92\\134n5 Buildcloud 0x0000000100399874 _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 607308\\134n6 Buildcloud 0x000000010039993c _ZN7plcrash3BIT5async24dwarf_cfa_state_iteratorIyxE4nextEPjPNS1_28plcrash_dwarf_cfa_reg_rule_tEPy + 607508\\134n7 Buildcloud <\\M-b\\M^@\\M-&>\r\n\r\n}}\r\n\r\n\r\n\r\nForm Hyperloop JSON:\r\n\r\n{{\"setDeviceToken:\": {\r\n \"arguments\": [\r\n {\r\n \"encoding\": \"@\",\r\n \"name\": \"deviceToken\",\r\n \"type\": \"objc_pointer\",\r\n *\"value\": \"NSData *\"*\r\n }\r\n ],\r\n \"encoding\": \"v24@0:8@16\",\r\n \"instance\": false,\r\n \"name\": \"setDeviceToken\",\r\n \"returns\": {\r\n \"encoding\": \"v\",\r\n \"type\": \"void\",\r\n \"value\": \"void\"\r\n },\r\n \"selector\": \"setDeviceToken:\"\r\n },}}", "attachment": [], "flagged": false, "summary": "Hyperloop NSData question", "creator": { "name": "korelogic", "key": "korelogic", "displayName": "Michael Hay", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "korelogic", "key": "korelogic", "displayName": "Michael Hay", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Operating System\r\n Name = Mac OS X\r\n Version = 10.13.2\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 17179869184\r\n\r\nNode.js\r\n Node.js Version = 8.0.0\r\n npm Version = 5.0.0\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.14\r\n\r\nTitanium SDK\r\n SDK Version = 7.0.1.GA\r\n SDK Path = /Users/michaelhay/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA\r\n Target Platform = iphone", "comment": { "comments": [ { "id": "433230", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~hknoechel], please can you help here?! ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-17T03:21:32.000+0000", "updated": "2018-01-17T03:21:32.000+0000" }, { "id": "433239", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "You need to pass it as NSData, noch as a String, which is no Hyperloop related task but a general native programming one. [Here|https://stackoverflow.com/a/26346543] is an example of converting it from Swift - should be adoptable by Hyperloop.\r\n\r\nThe other way would be to actually subscribe to the native {{application: didRegisterForRemoteNotificationsWithDeviceToken:}} selector that can be accessed from Hyperloop and native modules starting in 7.1.0 and later.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-17T08:40:50.000+0000", "updated": "2018-01-17T08:40:50.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }