{ "id": "163396", "key": "TIMOB-24910", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2019-09-17T15:10:50.000+0000", "created": "2016-09-22T23:22:33.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "delegate", "engTriage", "hyperloop" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-12-02T23:06:28.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": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I'm trying to use the Braintree SDK with Hyperloop and found an issue while trying to create a protocol bridge.\r\n\r\n{code:java}\r\nCaught exception: JSParseError: invalid protocol specified \"BTDropInViewControllerDelegate\"\r\n{code}\r\n\r\nIt happenes because of this:\r\n\r\n{code:java}\r\nvar delegate = Hyperloop.defineClass('delegate', 'NSObject', ['BTDropInViewControllerDelegate']);\r\n\r\n//rest of code doesn't matter.\r\n\r\nmodule.exports = delegate;\r\n{code}\r\n\r\nI'm requiring this file in a controller and the error above pops up when building the project.\r\nI think this issue is happening because the *BTDropInViewControllerDelegate* protocol is not declared in a file with the same name - and I guess that's what's Hyperloop expects.\r\nThis protocol is being defined inside the file *BTDropInViewController*.\r\n\r\nI'm importing Braintree with Pods.\r\n\r\n{code:javascript}\r\nplatform :ios, '8.0'\r\ntarget 'loopmodules-braintree' do\r\n\tpod 'Braintree', '~> 3.9'\r\nend\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Hyperloops iOS - Allow protocols declared within other classes", "creator": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "subtasks": [], "reporter": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "environment": "Hyperloop 2.0.0\r\nSDK 6.0.0 Beta", "closedSprints": [ { "id": 1169, "state": "closed", "name": "2019 Sprint 22", "startDate": "2019-10-21T15:38:21.747Z", "endDate": "2019-11-03T15:38:00.000Z", "completeDate": "2019-11-04T18:36:57.022Z", "originBoardId": 114 }, { "id": 1170, "state": "closed", "name": "2019 Sprint 23", "startDate": "2019-11-04T18:38:14.526Z", "endDate": "2019-11-17T18:38:00.000Z", "completeDate": "2019-11-18T16:38:18.423Z", "originBoardId": 114 }, { "id": 1171, "state": "closed", "name": "2019 Sprint 24", "startDate": "2019-11-18T16:40:09.114Z", "endDate": "2019-12-01T16:40:00.000Z", "completeDate": "2019-12-02T23:06:24.654Z", "originBoardId": 114 }, { "id": 1172, "state": "closed", "name": "2019 Sprint 25", "startDate": "2019-12-02T23:08:39.644Z", "endDate": "2019-12-15T23:08:00.000Z", "completeDate": "2019-12-16T05:54:54.518Z", "originBoardId": 114 }, { "id": 1163, "state": "closed", "name": "2019 Sprint 19", "startDate": "2019-09-09T20:43:13.091Z", "endDate": "2019-09-22T20:43:00.000Z", "completeDate": "2019-09-23T15:37:35.874Z", "originBoardId": 114 }, { "id": 1165, "state": "closed", "name": "2019 Sprint 20", "startDate": "2019-09-23T15:38:43.949Z", "endDate": "2019-10-06T15:38:00.000Z", "completeDate": "2019-10-07T18:33:11.953Z", "originBoardId": 114 }, { "id": 1168, "state": "closed", "name": "2019 Sprint 21", "startDate": "2019-10-07T18:35:57.052Z", "endDate": "2019-10-20T18:35:00.000Z", "completeDate": "2019-10-21T15:38:00.182Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "397131", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The delegate is not available in recent Braintree SDK-versions and has been replaced with \r\n{code:objc}\r\n- (void)dropInViewController:(BTDropInViewController *)viewController didSucceedWithTokenization:(BTPaymentMethodNonce *)paymentMethodNonce;\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-23T22:41:05.000+0000", "updated": "2016-09-23T22:41:25.000+0000" }, { "id": "397156", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Resolving for now. Probably you used the v3 docs and the v4 source that changed the selector as described above. If not, let us know.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-24T16:43:43.000+0000", "updated": "2016-09-24T16:43:43.000+0000" }, { "id": "397690", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "Hey @Hans. As you've said, I'm using the v3.\r\n\r\n\r\n{code:java}\r\ninstall! 'cocoapods',\r\n :integrate_targets => false\r\n\r\nplatform :ios, '8.0'\r\ntarget 'loopmodules-braintree' do\r\n\tpod 'Braintree', '~> 3.9'\r\nend\r\n{code}\r\n\r\n\r\nv4 is not working because of another problem - the documentation tells me to use something that's not included in the pods, but this is not a problem you should be concerned about.\r\n\r\nAs for what you said above, the delegate I'm using does have that method I'm declaring. You can check that here:\r\nhttp://cocoadocs.org/docsets/Braintree/3.9.7/Protocols/BTDropInViewControllerDelegate.html\r\n\r\n\r\n", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-09-29T23:48:00.000+0000", "updated": "2016-09-29T23:48:00.000+0000" }, { "id": "398459", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "waiting...", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-10-09T23:58:07.000+0000", "updated": "2016-10-09T23:58:07.000+0000" }, { "id": "399551", "author": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "body": "This ticket is valid and I've found the cause of the issue.\r\nThere's nothing to do with different versions of the Braintree SDK.\r\n\r\nHyperloop is not being able to find the *BTDropInViewControllerDelegate* protocol because it is defined within the class *BTDropInViewController*. As of now Hyperloop looks for a file with the exact name of the protocol you're trying to support. \r\n\r\nThere should be a way to specify where a protocol is being defined in case it \"doesn't have its own file\". \r\n\r\n", "updateAuthor": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "created": "2016-10-21T04:47:39.000+0000", "updated": "2016-10-21T04:52:20.000+0000" }, { "id": "423492", "author": { "name": "paul@appwapp.com", "key": "paul@appwapp.com", "displayName": "paul@appwapp.com", "active": true, "timeZone": "America/New_York" }, "body": "Have there been any changes to Hyperloop to support protocols declared inside other files? I am currently experiencing this issue using Google VR SDK in Hyperloop, and the Hyperloop documentation has not discussed this issue in any sort of useful detail.", "updateAuthor": { "name": "paul@appwapp.com", "key": "paul@appwapp.com", "displayName": "paul@appwapp.com", "active": true, "timeZone": "America/New_York" }, "created": "2017-07-05T13:50:43.000+0000", "updated": "2017-07-05T13:50:43.000+0000" }, { "id": "431456", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[Hyperloop 3.0.1|https://github.com/appcelerator-modules/hyperloop-builds/releases/tag/v3.0.1] may solve this by being more smart regarding framework imports. Will validate next week after the 7.0.0 release.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-29T15:00:47.000+0000", "updated": "2017-11-29T15:00:47.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }