{ "id": "164554", "key": "TIMOB-24152", "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": "18154", "name": "Release 6.0.1", "archived": false, "released": true, "releaseDate": "2016-12-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-11-18T10:17:15.000+0000", "created": "2016-11-16T16:45:07.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "qe-6.0.1", "regression" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-02-28T10:04:45.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": "With SDK *6.0.0.G.A* there is a problem with the function *Ti.Media.saveToPhotoGallery()*;\r\n\r\n- On *simulator* works ok.\r\n- On *device* when call the function the result is this : \r\n{code}\r\n\"undefined is not a function (evaluating 'Ti.Media.saveToPhotoGallery')\";\r\n{code}\r\n\r\nWith SDK *5.5.1.G.A* works ok also on device", "attachment": [], "flagged": false, "summary": "iOS: Ti.Media.saveToPhotoGallery crashes on device in SDK 6.0.0.GA", "creator": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "environment": "Appcelerator Studio, build: 4.8.0.201611121409\r\nTitanium SDK 6.0.0.G.A\r\n", "comment": { "comments": [ { "id": "401206", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/8613\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8614\r\n\r\nTest-case:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n \r\nvar btn = Ti.UI.createButton({\r\n title: \"Save to Photo Gallery\"\r\n});\r\n \r\nbtn.addEventListener(\"click\", function() {\r\n var blob = Ti.UI.createView({\r\n backgroundColor: \"red\",\r\n width: 500,\r\n height: 500\r\n }).toImage();\r\n \r\n Ti.Media.saveToPhotoGallery(blob, {\r\n\t\tsuccess: function(e) {\r\n\t Ti.API.info(\"Success!\");\r\n\t\t},\r\n\t\terror: function(e) {\r\n\t\t\tTi.API.error(\"Error: \" + e.error);\r\n\t\t}\r\n });\r\n});\r\n \r\nwin.add(btn);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-11-16T18:35:06.000+0000", "updated": "2016-11-16T18:39:02.000+0000" }, { "id": "401530", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Ti.Media.saveToPhotoGallery no longer crashes on device with the latest 6.0.1 build. \r\n\r\nTested On:\r\niPhone 6 Plus 10.1.1 Device\r\niPhone 5S 9.3.5 Device\r\nMac OS Sierra (10.12.1)\r\nTi SDK: 6.0.1.v20161118021643\r\nAppc Studio: 4.8.0.201611121409\r\nAppc NPM: 4.2.8\r\nApp CLI: 6.0.0\r\nXcode 8.1\r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-11-18T17:33:30.000+0000", "updated": "2016-11-18T17:33:30.000+0000" }, { "id": "408040", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Guys,\r\nI'm on SDK 6.0.1, my `iphone/Classes/MediaModule.m` has the macros as well as my \"iphone/Classes/defines.h\" but it still saying \"\"undefined is not a function (evaluating 'Titanium.Media.saveToPhotoGallery')\"\"\r\nDo you have any clue?\r\n\r\nThanks!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-27T16:38:25.000+0000", "updated": "2017-02-27T16:38:25.000+0000" }, { "id": "408074", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Carlos, that should be fixed then. Do you have an example code we could test? Did you test my above snippet? Just paste it here or send on Slack and we'll take care immediately. ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-27T22:29:39.000+0000", "updated": "2017-02-27T22:29:39.000+0000" }, { "id": "408114", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "yeap, with your code snippet it doesn't work as well =/ \r\nOn simulator the app crashes and on device I got the error above", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-28T10:04:45.000+0000", "updated": "2017-02-28T10:04:45.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }