{ "id": "169897", "key": "AC-5234", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-10-20T21:54:56.000+0000", "created": "2017-09-26T03:16:54.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-14T06:45:46.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": [], "description": "Any call to Ti.Media.saveToPhotoGallery on iOS 11 with any Titanium SDK causes the app to crash with no error or messaging in the console. The permission dialog is never shown. Same code with iOS 10.1 works fine.", "attachment": [], "flagged": false, "summary": "iOS 11: Ti.Media.saveToPhotoGallery is broken and causes app to crash", "creator": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK 6.x", "comment": { "comments": [ { "id": "428463", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-26T09:15:43.000+0000", "updated": "2017-09-26T09:15:55.000+0000" }, { "id": "428496", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Hans,\r\n\r\nThanks a bunch for the info, that was the issue and adding that permission fixed it! Glad to see that PR, that will definitely be helpful. I'm not sure if it's in the documentation anywhere but I didn't see anything off hand - it might be helpful to add what you wrote here maybe.\r\n\r\nThanks again.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-26T21:28:58.000+0000", "updated": "2017-09-26T21:28:58.000+0000" }, { "id": "435748", "author": { "name": "muhammadsabir", "key": "muhammadsabir", "displayName": "Muhammad Sabir", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Hans Knochel Is there any method to check/request that permission like Ti.Media.has***** and Ti.Media.request**** ??? Currently the code for save to gallery is executed before the permissions popup by iOS.", "updateAuthor": { "name": "muhammadsabir", "key": "muhammadsabir", "displayName": "Muhammad Sabir", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-20T05:30:46.000+0000", "updated": "2018-03-20T05:30:46.000+0000" }, { "id": "440715", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "This code works for me(iOS 11.4.1, iPX):\r\n\r\n{code:java}\r\nsaveToPhotoGalleryButton.addEventListener(\"click\", function()\r\n{\r\n\tvar image = takenPhotoImageView.toImage(function(e)\r\n\t{\r\n\t\tif(Ti.Media.hasPhotoGalleryPermissions)\r\n\t\t{\r\n\t\t\tTi.Media.saveToPhotoGallery(image, \r\n\t\t\t{\r\n\t\t\t\tsuccess:function(e)\r\n\t\t\t\t{\r\n\t\t\t\t\talert(\"Image saved\");\r\n\t\t\t\t},\r\n\t\t\t\terror:function(e)\r\n\t\t\t\t{\r\n\t\t\t\t\talert(\"Image not saved: \"+e.error);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tTi.Media.requestPhotoGalleryPermissions();\r\n\t\t}\r\n\t}, true);\r\n\t\r\n});\r\n{code}\r\nIf there is no permissions granted, I request them. in tiapp.xml you have to add this:\r\n\r\n{code:java}\r\nNSPhotoLibraryAddUsageDescription\r\nApp wants to save photos to gallery\r\n{code}\r\n\r\nHans or somebody from appc, can you please modify docs and put this info there? Because there is no single word about missing key and permissions...\r\nThanks\r\n", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2018-08-13T23:52:38.000+0000", "updated": "2018-08-13T23:52:38.000+0000" }, { "id": "440722", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for the feedback [~max87]. Note that it is {{hasPhotoGalleryPermissions()}} not {{hasPhotoGalleryPermissions}}. The latter one will always be true, because the function itself always exists (which is what you are checking).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-14T06:41:29.000+0000", "updated": "2018-08-14T06:41:29.000+0000" }, { "id": "440723", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Yeah, you're right and I'm sorry, it's a typo(I can't edit my previous comment to correct it)", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2018-08-14T06:44:53.000+0000", "updated": "2018-08-14T06:44:53.000+0000" }, { "id": "440724", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR to update the docs: https://github.com/appcelerator/titanium_mobile/pull/10252", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-14T06:45:46.000+0000", "updated": "2018-08-14T06:45:46.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }