{ "id": "163850", "key": "TIMOB-24009", "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": [ { "id": "18246", "name": "Hyperloop 2.0.1", "archived": false, "released": true, "releaseDate": "2017-03-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-03T11:41:21.000+0000", "created": "2016-10-10T16:41:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "18247", "name": "Hyperloop 2.0.0", "archived": false, "released": true, "releaseDate": "2016-10-18" } ], "issuelinks": [], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-15T15:56:26.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": "13715", "name": "Hyperloop", "description": "Hyperloop project" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I am currently testing the Facebook iOS SDK with Hyperloop and trying to bridge the {{presentMessengerDialog}} method to Hyperloop. Here is the JS-call:\r\n\r\napp.js\r\n{code:javascript}\r\nvar fb = require('facebook');\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Open Messenger Dialog\"\r\n});\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n fb.presentMessengerDialog({\r\n title: \"Appcelerator Titanium rocks!\", // The title of the link\r\n description: \"Shared from my Titanium application\", // The description of the link\r\n link: \"https://appcelerator.com\", // The link you want to share\r\n referal: \"ti_app\", // The referal to be added as a suffix to your link\r\n placeID: \"my_id\", // The ID for a place to tag with this content\r\n to: [] // List of IDs for taggable people to tag with this content\r\n });\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\nand the Hyperloop implementation is:\r\n\r\nfacebook.js\r\n{code:javascript}\r\nvar FBSDKShareLinkContent = require(\"FBSDKShareKit/FBSDKShareLinkContent\"),\r\n\tFBSDKMessageDialog = require(\"FBSDKShareKit/FBSDKMessageDialog\"),\r\n\tNSURL = require(\"Foundation/NSURL\");\r\n\r\nexports.presentMessengerDialog = function(params) {\r\n var content = new FBSDKShareLinkContent();\r\n \r\n content.setContentURL(NSURL.URLWithString(params[\"link\"]));\r\n content.setContentDescription(params[\"description\"]);\r\n content.setContentTitle(params[\"title\"]);\r\n content.setPlaceID(params[\"placeID\"]);\r\n content.setRef(params[\"referal\"]);\r\n content.setPeopleIDs(params[\"to\"]);\r\n \r\n FBSDKMessageDialog.showWithContentDelegate(content, null); // TODO: Add delegate\r\n};\r\n{code}\r\nThe {{FBSDKShareLinkContent}} class is an {{NSObject}} and implements the {{FBSDKSharingContent}} protocol. The build succeeds, but as soon as we click on the button, the method fails because {{setContentURL}} is undefined. A look into the generated metabase confirms that all properties from the {{FBSDKSharingContent}} are not generated, the ones from {{FBSDKShareLinkContent}} are. \r\n\r\nI am linking the frameworks locally (in /src and appc.js), so it might be something related to locally embedded frameworks only. ", "attachment": [], "flagged": false, "summary": "Hyperloop: iOS - Protocols are not generated properly", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 799, "state": "closed", "name": "2017 Sprint 02 Tooling", "startDate": "2017-01-15T00:01:57.583Z", "endDate": "2017-01-29T00:01:00.000Z", "completeDate": "2017-01-30T21:11:44.577Z", "originBoardId": 199 } ], "comment": { "comments": [ { "id": "398542", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Assigning to [~jvennemann] as we talked about it already. It is no general protocol problem and happens to both local embedded frameworks and cocoapods deps. Jan suggested that the metabase forwards the delegates incorrectly for the properties, which makes sense. Scheduling to 2.0.1 for now.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-10T20:48:54.000+0000", "updated": "2016-10-10T20:48:54.000+0000" }, { "id": "406178", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jvennemann] Could this be a duplicate of TIMOB-24198?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-02T21:24:17.000+0000", "updated": "2017-02-02T21:24:17.000+0000" }, { "id": "406512", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "Actually this is a bug were the properties and methods from a protocol weren't merged into a class. To avoid unnecessary merging a function would check if a protocol was already implemented by a parent class. It could happen that this function would check against the base class instead of it's parent and then falsely assume a parent already implemented the protocol, thus skipping the merge process.\r\n\r\nPR (master): https://github.com/appcelerator/hyperloop.next/pull/121\r\nPR (2_0_X): https://github.com/appcelerator/hyperloop.next/pull/122", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-07T14:59:18.000+0000", "updated": "2017-02-07T14:59:18.000+0000" }, { "id": "412494", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, with Hyperloop 2.0.1, ShareLinkContent now shares correctly.\r\n\r\nTested On:\r\niPhone 7 10.2 Device\r\nMac OS Sierra (10.12.2)\r\nTi SDK: 6.0.2.GA\r\nHyperloop Module (2.0.1)\r\nCocoaPods (1.2.0)\r\nAppc NPM: 4.2.9-1\r\nApp CLI: 6.1.0\r\nXcode 8.2.1\r\nNode v4.6.0\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2017-03-15T15:56:10.000+0000", "updated": "2017-03-15T15:56:10.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }