{ "id": "171679", "key": "AC-5744", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2018-05-21T09:01:05.000+0000", "created": "2018-05-20T22:46:05.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-05-21T14:33:40.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When requesting gallery permissions, after accepting permissions the gallery does not open.\r\n \r\nSteps to reproduce:\r\n1. Create a sample application\r\n2. Update the index.js with the attached\r\n3. Update the alloy.js with the attached to force splashscreen as snapshot.\r\n4. Update the tiapp.xml with the NSPhotoLibraryUsageDescription and NSPhotoLibraryAddUsageDescription key in the attached tiapp.xml\r\n5. Run the application and click on \"Hello World\"\r\n6. Accept permissions\r\n7. Notice nothing happens.\r\n\r\nindex.js\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n \r\nfunction doClick(e) {\r\n\tvar _galleryOptions = {\r\n\t\tallowEditing : false,\r\n\t\tallowMultiple : false,\r\n\t\tautohide : true,\r\n\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO]\r\n\t};\r\n\r\n\tif (Ti.Media.hasPhotoGalleryPermissions()) {\r\n\t\tTi.Media.openPhotoGallery(_galleryOptions);\r\n\t} else {\r\n\t\tTi.Media.requestPhotoGalleryPermissions(function(_evt) {\r\n\t\t\tif (_evt.success) {\r\n\t\t\t\tTi.Media.openPhotoGallery(_galleryOptions);\r\n\t\t\t} else {\r\n\t\t\t\talert('We need gallery permissions');\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n \r\n \r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger'\r\n});\r\n \r\nbtn.addEventListener('click', doClick);\r\n \r\nwin.add(btn);\r\n \r\nwin.open();\r\n{code}\r\n\r\ntiapp.xml\r\n{code:java}\r\nNSPhotoLibraryUsageDescription\r\n To allow you to upload photos of documents\r\n NSPhotoLibraryAddUsageDescription\r\n To allow you to upload photos of documents\r\n{code}\r\n\r\nalloy.js\r\n{code:java}\r\nTi.App.forceSplashAsSnapshot = true\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Requesting permissions to open gallery will not allow gallery to open.", "creator": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "6.3.0.GA & 7.1.1.GA", "comment": { "comments": [ { "id": "437806", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Works fine here (both with main- and kroll-thread). Try to reinstall your app or reach out to the community via Slack or Stackoverflow for more questions.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-21T09:01:05.000+0000", "updated": "2018-05-21T09:01:05.000+0000" }, { "id": "437810", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I left out the forceSplashAsSnapshot must be set to true.", "updateAuthor": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-21T13:58:29.000+0000", "updated": "2018-05-21T13:58:29.000+0000" }, { "id": "437812", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thats a very important detail, hehe. In that case, it is a duplicate of TIMOB-26047 which already has a fix in place that you can use today. Cheers!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-21T14:33:40.000+0000", "updated": "2018-05-21T14:33:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }