{ "id": "171641", "key": "TIMOB-26031", "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": "2018-05-10T06:56:55.000+0000", "priority": null, "labels": [], "versions": [ { "id": "20182", "description": "", "name": "Hyperloop 3.0.5", "archived": false, "released": true } ], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2019-04-10T10:46:42.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": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Trying to implement BraintreeDropIn the controller instance return null, as a result it can't be presented. \r\n\r\n\r\n\r\n{code:javascript}\r\nvar BraintreeDropIn = require('BraintreeDropIn/BraintreeDropIn');\r\n\tvar BTDropInRequest = require('BraintreeDropIn/BTDropInRequest');\r\n\tvar BTDropInController = require('BraintreeDropIn/BTDropInController');\r\n\tvar BTDropInResult = require('BraintreeDropIn/BTDropInResult');\r\n\tvar NSError = require('Foundation/NSError');\r\n\tvar TiApp = require('Titanium/TiApp');\r\n\tvar request = BTDropInRequest.alloc().init();\r\n\tvar token =\"sometoken\"\r\nvar controller = BTDropInController.alloc().init();\r\n\tvar result = BTDropInResult.alloc().init();\r\n\tvar error = new NSError();\r\n\tconsole.log(controller, result, error);\r\n\tvar dropIn = BTDropInController.alloc().initWithAuthorizationRequestHandler(token, request, function (controller, result, error) {\r\n\t\tconsole.log('here');\r\n\t});\r\n\tconsole.log(request);\r\n\tconsole.log(dropIn);\r\n\r\n\tTiApp.app().showModalController(dropIn, true);\r\n{code}\r\n ", "attachment": [ { "id": "65149", "filename": "build_iphone.log", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:57:22.000+0000", "size": 575625, "mimeType": "text/plain" }, { "id": "65147", "filename": "metabase-10-iphonesimulator-985858376b81cabfa6f3b13fd4210dfe.h", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:09.000+0000", "size": 20077, "mimeType": "text/x-c" }, { "id": "65146", "filename": "metabase-cocoapods-bcdc13d42012d5143d2548c404186f3a.json", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:09.000+0000", "size": 18541, "mimeType": "application/json" }, { "id": "65144", "filename": "metabase-mappings-iphonesimulator-10.json", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:11.000+0000", "size": 731986, "mimeType": "application/json" }, { "id": "65145", "filename": "metabase-mappings-iphonesimulator-8.0.json", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:10.000+0000", "size": 731989, "mimeType": "application/json" }, { "id": "65143", "filename": "metadata-framework-availability.json", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:09.000+0000", "size": 2106, "mimeType": "application/json" }, { "id": "65148", "filename": "Podfile", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:00.000+0000", "size": 325, "mimeType": "text/html" }, { "id": "65142", "filename": "symbol_references.json", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-10T06:56:09.000+0000", "size": 18118, "mimeType": "application/json" } ], "flagged": false, "summary": "Hyperloop: iOS - Constructor with block-argument is unable to return valid instance", "creator": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Hyperloop 3.0.5\r\nSDK 7.1.1.GA", "comment": { "comments": [ { "id": "437572", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Please share a full reproducible code/project for us to test. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-05-11T01:17:12.000+0000", "updated": "2018-05-11T01:17:12.000+0000" }, { "id": "437576", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Looks valid to me, moving to TIMOB! But I am wondering why this specific constructor would fail.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-11T08:19:07.000+0000", "updated": "2018-05-11T08:19:07.000+0000" }, { "id": "437577", "author": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another one: \r\n{code:javascript}\r\nvar BTAppSwitch = require(\"Braintree/BTAppSwitch\"); \r\nBTAppSwitch.setReturnURLScheme(\"com.demo.braintree.payments\"); // returns an error regarding method setReturnURLScheme doesn't exist\r\nBTAppSwitch.returnURLScheme = \"com.demo.braintree.payments\";//does not have any effect\r\n\r\n{code}", "updateAuthor": { "name": "bgarcia", "key": "bgarcia", "displayName": "Brian García", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-11T08:56:13.000+0000", "updated": "2018-05-11T08:56:13.000+0000" }, { "id": "447593", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'm experiencing the same exact issues on my project. Installed the pods:\r\n\r\n{code}\r\ninstall! 'cocoapods',\r\n :integrate_targets => false\r\n\r\nplatform :ios, '9.0'\r\ntarget 'BraintreeAlloy' do\r\n\tuse_frameworks!\r\n\tpod 'Braintree'\r\n\tpod 'BraintreeDropIn'\r\n\tpod 'Braintree/PayPal'\r\n\r\nend\r\n{code}\r\n\r\nadded the first snippet from OP on my project, and I get the error\r\n\r\n{code}\r\nApplication tried to present a nil modal view controller on target\r\n{code}\r\n\r\nthe controller is indeed null.\r\n\r\nI get the same error from @bgarcia with the second snippet:\r\n{code}\r\n\"BTAppSwitch.setReturnURLScheme is not a function.\r\n{code}\r\n\r\nCan anyone look into this? I'm using TiSDK 8.0.1 and Hyperloop 4.0.2.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-04-10T10:46:42.000+0000", "updated": "2019-04-10T10:46:42.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }