[TIMOB-26031] Hyperloop: iOS - Constructor with block-argument is unable to return valid instance
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Hyperloop 3.0.5 |
| Fix Version/s | n/a |
| Components | Hyperloop, iOS |
| Labels | n/a |
| Reporter | Brian García |
| Assignee | Jan Vennemann |
| Created | 2018-05-10T06:56:55.000+0000 |
| Updated | 2019-04-10T10:46:42.000+0000 |
Description
Trying to implement BraintreeDropIn the controller instance return null, as a result it can't be presented.
var BraintreeDropIn = require('BraintreeDropIn/BraintreeDropIn');
var BTDropInRequest = require('BraintreeDropIn/BTDropInRequest');
var BTDropInController = require('BraintreeDropIn/BTDropInController');
var BTDropInResult = require('BraintreeDropIn/BTDropInResult');
var NSError = require('Foundation/NSError');
var TiApp = require('Titanium/TiApp');
var request = BTDropInRequest.alloc().init();
var token ="sometoken"
var controller = BTDropInController.alloc().init();
var result = BTDropInResult.alloc().init();
var error = new NSError();
console.log(controller, result, error);
var dropIn = BTDropInController.alloc().initWithAuthorizationRequestHandler(token, request, function (controller, result, error) {
console.log('here');
});
console.log(request);
console.log(dropIn);
TiApp.app().showModalController(dropIn, true);
Attachments
| File | Date | Size |
|---|---|---|
| build_iphone.log | 2018-05-10T06:57:22.000+0000 | 575625 |
| metabase-10-iphonesimulator-985858376b81cabfa6f3b13fd4210dfe.h | 2018-05-10T06:56:09.000+0000 | 20077 |
| metabase-cocoapods-bcdc13d42012d5143d2548c404186f3a.json | 2018-05-10T06:56:09.000+0000 | 18541 |
| metabase-mappings-iphonesimulator-10.json | 2018-05-10T06:56:11.000+0000 | 731986 |
| metabase-mappings-iphonesimulator-8.0.json | 2018-05-10T06:56:10.000+0000 | 731989 |
| metadata-framework-availability.json | 2018-05-10T06:56:09.000+0000 | 2106 |
| Podfile | 2018-05-10T06:56:00.000+0000 | 325 |
| symbol_references.json | 2018-05-10T06:56:09.000+0000 | 18118 |
Hello, Please share a full reproducible code/project for us to test. Thanks.
Looks valid to me, moving to TIMOB! But I am wondering why this specific constructor would fail.
Another one:
var BTAppSwitch = require("Braintree/BTAppSwitch"); BTAppSwitch.setReturnURLScheme("com.demo.braintree.payments"); // returns an error regarding method setReturnURLScheme doesn't exist BTAppSwitch.returnURLScheme = "com.demo.braintree.payments";//does not have any effectI'm experiencing the same exact issues on my project. Installed the pods:
added the first snippet from OP on my project, and I get the errorinstall! 'cocoapods', :integrate_targets => false platform :ios, '9.0' target 'BraintreeAlloy' do use_frameworks! pod 'Braintree' pod 'BraintreeDropIn' pod 'Braintree/PayPal' endthe controller is indeed null. I get the same error from @bgarcia with the second snippet:Can anyone look into this? I'm using TiSDK 8.0.1 and Hyperloop 4.0.2.