{ "id": "172663", "key": "MOD-2487", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [], "resolution": null, "resolutiondate": null, "created": "2018-11-23T15:32:08.000+0000", "priority": null, "labels": [ "ios", "keychain-access", "ti.identity" ], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-28T21:55:08.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": "15701", "name": "Identity", "description": "Deprecated the old “TouchId” component " } ], "description": "While trying to share a keychain item with a native app using Ti.Identity, I noticed that, while the native app could read items created by my Titanium app, the opposite wasn't working at all.\r\n\r\nLooking at the code of Ti.Identity, I found this at line 197 of APSKeychainWrapper.m:\r\n\r\n{code:objectiveC}\r\n baseAttributes = [NSMutableDictionary dictionaryWithDictionary:@{\r\n (id)kSecClass: (id)kSecClassGenericPassword,\r\n (id)kSecAttrAccount: _identifier,\r\n (id)kSecAttrService: _service,\r\n (id)kSecAttrAccount: @\"\",\r\n (id)kSecAttrLabel: @\"\",\r\n (id)kSecAttrDescription: @\"\"\r\n }];\r\n{code}\r\n\r\n\"kSecAttrLabel\" and \"kSecAttrDescription\" are both passed as empty strings. The resulting query to the keychain filters only the items that have both their label and description set to empty string. Ti.Identity.KeychainItem has no \"label\" or \"description\" attributes, so there is no way to control this behavior.\r\n\r\n\"kSecAttrAccount\" is also assigned both the value of _identifier and empty string. This works fine anyway, since only the first assignment is kept, but it's confusing.\r\n\r\nI've created [a pull request|https://github.com/appcelerator-modules/titanium-identity/pull/22] to solve this issue.", "attachment": [], "flagged": false, "summary": "iOS: Ti.Identity can't find keychain items with empty label or description", "creator": { "name": "ajonus", "key": "ajonus", "displayName": "Andrea Jonus", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "ajonus", "key": "ajonus", "displayName": "Andrea Jonus", "active": true, "timeZone": "Europe/Rome" }, "environment": "Ti.Identity 1.0.5\r\nTitanium 7.4.0", "comment": { "comments": [ { "id": "443981", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "\r\n[~ajonus],\r\nThanks for reporting this. Can you please test this on 7.5.0.GA ans let us know how it goes.", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-11-28T08:16:20.000+0000", "updated": "2018-11-28T08:16:20.000+0000" }, { "id": "445257", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can please someone move the ticket to TIMOB, merge the PR and release a new version?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-13T15:21:48.000+0000", "updated": "2019-01-13T15:21:48.000+0000" }, { "id": "453865", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-28T21:55:06.000+0000", "updated": "2020-01-28T21:55:06.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }