{ "id": "164571", "key": "MOD-2313", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "18722", "name": "Ti.Facebook 5.3.2", "archived": false, "released": true }, { "id": "18723", "name": "Ti.Facebook 5.2.9", "archived": false, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-28T11:19:14.000+0000", "created": "2016-11-17T15:31:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "capabilities", "cli-hook", "facebook", "ios" ], "versions": [ { "id": "17524", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-14" }, { "id": "18287", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [ { "id": "53519", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "164508", "key": "TIMOB-24142", "fields": { "summary": "iOS: Custom Ti.Facebook entitlements-file overrides CLI-generated entitlements", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "53507", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "163984", "key": "TIMOB-24041", "fields": { "summary": "Include module hooks in packaged zip", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56000", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "169885", "key": "TIMOB-25340", "fields": { "summary": "Hyperloop: Move to using auto-required 'hooks' folder, not plugin", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:14.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": "14521", "name": "Facebook" } ], "description": "We talked about injecting the required keychain-capabilities automatically in Ti.Facebook, because curating two manual files will cause problems with our push settings that are also injected by the CLI.\r\n\r\nNOTE: This requires Titanium SDK 6.0.1.\r\n\r\nHere's the code that does this, but needs to be added to the module and tested. Preliminary testing indicates the code below works as advertised.\r\n\r\n{code:javascript}\r\n'use strict';\r\n\r\nexports.id = 'com.appcelerator.facebook';\r\n\r\nexports.cliVersion = '>=3.2';\r\n\r\nexports.init = function init(logger, config, cli, appc) {\r\n\tcli.on('build.ios.writeEntitlements', {\r\n\t\tpre: function (data, finished) {\r\n\t\t\tvar applicationIdentifier = '$(AppIdentifierPrefix)' + this.tiapp.id;\r\n\t\t\tvar plist = data.args[0];\r\n\r\n\t\t\tArray.isArray(plist['keychain-access-groups']) || (plist['keychain-access-groups'] = []);\r\n\t\t\tif (!plist['keychain-access-groups'].some(function (id) { return id === applicationIdentifier; })) {\r\n\t\t\t\tplist['keychain-access-groups'].push(applicationIdentifier);\r\n\t\t\t}\r\n\r\n\t\t\tfinished();\r\n\t\t}\r\n\t});\r\n};\r\n{code}", "attachment": [], "flagged": false, "summary": "Ti.Facebook: Add CLI-hook to automatically inject capabilities updates", "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": 758, "state": "closed", "name": "2016 Sprint 24 SDK", "startDate": "2016-11-19T01:32:06.991Z", "endDate": "2016-12-03T01:32:00.000Z", "completeDate": "2016-12-05T01:53:38.311Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "401547", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (ti.facebook/master): https://github.com/appcelerator-modules/ti.facebook/pull/75\r\nPR (ti.facebook/5_2_X): https://github.com/appcelerator-modules/ti.facebook/pull/77\r\nPR (titanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/8627\r\nPR (titanium_mobile/6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8628\r\n\r\nAlso drafted 5.2.9 and 5.3.2 as a prerelease on the Github page.\r\n\r\nTo test, run the [attached project|https://www.dropbox.com/s/tiiy6dmvzo5jkni/test_capabilities.zip?dl=1] that include the Ti.Facebook iOS version 5.2.9 from [here|https://github.com/appcelerator-modules/ti.facebook/releases/tag/ios-5.2.9] and run the project on simulator and device. Then:\r\n# Check the generated capabilities file and ensure the {{keychain-access-groups}} dictionary was written from the CLI hook\r\n# Click on the login button to ensure the Facebook login works (which means that the keychain access group was picked up correctly).\r\n\r\nSpecial note: You can either test with ti.facebook 5.2.9 (which will be used for 6.0.1) or with 5.3.2 (which will be used in 6.1.0).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-18T18:27:36.000+0000", "updated": "2016-11-28T08:25:50.000+0000" }, { "id": "402338", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel], I am seeing some unexpected behavior when building with a custom entitlements file in /platform/ios.\r\nOn first/clean builds, the custom file looks to be copied to the build folder. On subsequent builds, the entitlements file in the build folder is overwritten with the generated file. I would expect the same file in the build folder on each build, without any modifications to the project. \r\nTested with SDK 6.0.1.v20161130023500 and Facebook Module 5.2.9\r\n\r\nThe generated entitlements file has two keychain-access-groups values: One for the team-id and one for $(AppIdentifierPrefix). Facebook login still appears to work with both of these values present.\r\n", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-12-01T14:48:37.000+0000", "updated": "2016-12-01T14:48:37.000+0000" }, { "id": "440076", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:14.000+0000", "updated": "2018-08-06T17:49:14.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }