{ "id": "101578", "key": "TIMOB-11338", "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": "14165", "description": "2012 Sprint 21 API", "name": "2012 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2012-10-22" }, { "id": "14273", "description": "2012 Sprint 21", "name": "2012 Sprint 21", "archived": true, "released": true, "releaseDate": "2012-10-22" } ], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2012-10-11T01:46:09.000+0000", "created": "2012-09-20T06:11:51.000+0000", "priority": null, "labels": [ "ios6", "ipad", "media", "openPhotoGallery", "to-triage" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-03-27T22:55:20.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h1. Steps to reproduce the issue\r\n\r\n# Execute the attached app.js\r\n# Click the 'openPhotoGallery' button\r\n# Close the first alert telling 'I will now call Ti.Media.openPhotoGallery'\r\n# Notice there is no gallery opening\r\n# Try to click the 'click me later' button\r\n# Notice you cannot click it because the app (by some invisible layer?) is blocked", "attachment": [ { "id": "32387", "filename": "app_no_alert.js", "author": { "name": "javierp", "key": "javierp", "displayName": "Javier Perrera ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T15:43:38.000+0000", "size": 767, "mimeType": "text/javascript" }, { "id": "31556", "filename": "app.js", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-09-20T06:11:51.000+0000", "size": 677, "mimeType": "text/javascript" }, { "id": "31598", "filename": "Pfixx.zip", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-09-20T23:59:58.000+0000", "size": 1576172, "mimeType": "application/zip" }, { "id": "31573", "filename": "Screenshot 2012.09.20 12.21.30.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:38:20.000+0000", "size": 292306, "mimeType": "image/png" }, { "id": "31572", "filename": "Screenshot 2012.09.20 12.21.41.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:38:20.000+0000", "size": 349656, "mimeType": "image/png" }, { "id": "31574", "filename": "Screenshot 2012.09.20 12.21.50.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:38:21.000+0000", "size": 300038, "mimeType": "image/png" }, { "id": "31575", "filename": "Screenshot 2012.09.20 12.26.25.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:38:21.000+0000", "size": 520179, "mimeType": "image/png" }, { "id": "31597", "filename": "Testing.zip", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-09-20T23:59:17.000+0000", "size": 3121995, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS6 on iPad: Ti.Media.openPhotoGallery doesn't work and blocks app", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Titanium SDK version: 2.1.3 (09/15/12 12:03 a77d91c)\r\niPhone Device family: universal\r\niPhone SDK version: 6.0\r\niPhone simulated device: ipad\r\n\r\nAlso tested on the New iPad running iOS 6.\r\nThe bug does NOT occur on iPhones.", "comment": { "comments": [ { "id": "219968", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attempted to reproduce in iPad iOS 6.0 simulator and initially got a failure in studio console:\r\n{code}\r\n[WARN] Exception in event callback. {\r\n line = 22;\r\n message = \"'undefined' is not an object (evaluating 'Ti.Media.openPhotoGallery')\";\r\n name = TypeError;\r\n sourceId = 225323488;\r\n sourceURL = \"file://localhost/Users/emerriman/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/5F3C7612-FAF8-4376-8A12-32DF86F5CEBB/testingBug.app/app.js\";\r\n}\r\n{code}\r\n\r\nSecond attempt worked as expected. Also to note, the simulator privacy setting for photos did not contain a request from my test app for access to photos. The gallery was empty.\r\n\r\nOn device, test code worked as expected for me, see screen shots. App requested access to photo gallery and when I approved, setting entry was made in privacy>photos for my test app and was set to allow access.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:30:52.000+0000", "updated": "2012-09-20T12:30:52.000+0000" }, { "id": "219969", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For comment above, I am running:\r\nMountain Lion 10.8.1\r\nXcode 4.5 GM\r\niOS 6.0 GM for iPad 3\r\nTitanium Studio, build: 2.1.2.201208301612\r\nSDK: 2.1.3.v20120918170114", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-20T12:40:44.000+0000", "updated": "2012-09-20T12:40:44.000+0000" }, { "id": "220081", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The debug code pasted in a newly created project works indeed.. just like Eric found.\r\n\r\nBut in my earlier created project, now upgraded to SDK 2.1.3 RC it does not!\r\n\r\nCompare the two newly attached ZIPs containing both projects. In the Pfixx project I stripped all other code and files so it's almost identical to the Testing project. But it just doesn't work!?!?!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-09-21T00:02:29.000+0000", "updated": "2012-09-21T00:02:29.000+0000" }, { "id": "221091", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Executed all 3 attached .js on:\nMountain Lion 10.8.1\nXcode 4.5 GM\niOS 6.0 for iPad 3\nTitanium Studio, build: 2.1.2.201208301612\nSDK: 2.1.3.v20120925173111\n\nTest code worked as expected. Added photos to the simulator's gallery, so it is not empty. The simulator privacy setting for photos did not contain a request from my test app for access to photos. As a result apps do not appear in privacy settings. \nOn device, test code worked as expected. The result is identical to Eric's. ", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T21:05:55.000+0000", "updated": "2012-09-26T21:05:55.000+0000" }, { "id": "221104", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Fokke,\r\n\r\nWe've been unable to reproduce this issue after trying multiple times. If you continue to experience it, or find other examples that cause it, please let us know.\r\n\r\nBest,\r\nIngo", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-26T21:30:56.000+0000", "updated": "2012-09-26T21:30:56.000+0000" }, { "id": "222496", "author": { "name": "javierp", "key": "javierp", "displayName": "Javier Perrera ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi\n\nI am still running into this issue.\n\nIt all works ok as described and in the examples above (with an alert) but my issue is that i cannot have an alert box show up everytime I need the user to open the photo gallery. This could be up to 20 times within the app so i need a way of showing it without an alert box. \nIs there a reason or explanation in why the alert box must be present? And is there anyway of getting around it?\n\nI am running:\n\nTitanium SDK version: 2.1.3 (10/02/12 16:16 15997d0)\niPhone Device family: ipad\niPhone SDK version: 6.0\niPhone simulated device: ipad\nMinimum iOS version: 4.3 Linked iOS Version 6.0\nXCode Version 4.5.1 (4G1004)\n", "updateAuthor": { "name": "javierp", "key": "javierp", "displayName": "Javier Perrera ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T15:14:18.000+0000", "updated": "2012-10-08T15:14:18.000+0000" }, { "id": "222502", "author": { "name": "javierp", "key": "javierp", "displayName": "Javier Perrera ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So this is the app.js (the attached app_no_alert.js) file exactly as it is in the example, with the only change (bar changing the window orientation) being the alert on the openPhotoGallery event being commented out.\r\n\r\nThis makes the code no longer work", "updateAuthor": { "name": "javierp", "key": "javierp", "displayName": "Javier Perrera ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-08T15:43:38.000+0000", "updated": "2012-10-08T16:59:41.000+0000" }, { "id": "222832", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with iPad Simulator iOS 6, without the alert, the app hangs and does not open the gallery. Tested with 2.1.3.GA and 3.0.0v20121009111437", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-10T00:22:35.000+0000", "updated": "2012-10-10T00:22:35.000+0000" }, { "id": "222842", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested \"app_no_alert.js\" with iPad3 ios 6.0 with:\nTitanium Studio, build: 3.0.0.201210090117\nTitanium SDK, build: 2.1.3.GA and 3.0.0v20121009111437\nNo alert,app hangs, same behavior, as described by Natalie", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-10T01:00:27.000+0000", "updated": "2012-10-10T01:00:27.000+0000" }, { "id": "223037", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PhotoGallery(UIImagePickerController) is a portrait-only view controller and in iOS 6 Apple has started enforcing this rule. \n\nShort version being Landscape-only applications that invoke a portrait-only view controller (such as the Game Center sign-in screen or the UIImagePickerController) and are built using the iOS 6 SDK may crash/freeze up the UI.\n\nThe crash log may look like \n\"*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'\"\n\nThe interm solution, while Apple may fix this in the future release is to temporarily make container window in which the photogallery popover is to be attached to have a portrait orientation also included in them. \n{code}\nwin.orientationModes= [Titanium.UI.PORTRAIT,Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];\n{code}\n\nComplete code sample with for testing:\n{code}\nvar win = Ti.UI.createWindow({orientationModes: [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT]});//\n\nvar otherButton = Ti.UI.createButton({\n\ttop: 100,\n\ttitle: 'click me later'\n});\n\nvar openButton = Ti.UI.createButton({\n\ttop: 300,\n\ttitle: 'openPhotoGallery'\n});\n\notherButton.addEventListener('click', function () {\n\talert('You should not see this if the bug report is correct');\n});\n\nopenButton.addEventListener('click', function () {\n\t//alert('I will now call Ti.Media.openPhotoGallery');\n\twin.orientationModes= [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT,Titanium.UI.PORTRAIT];\n\t\n\tTi.Media.openPhotoGallery({\n\t\tsuccess:function(event)\n\t\t{\n\t\t\twin.orientationModes= [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];\n\t\n\t\t},\n\t\tcancel:function()\n\t\t{\n\t\t\twin.orientationModes= [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];\n\t\n\t\t},\n\t\terror:function(error)\n\t\t{\n\t\t\twin.orientationModes= [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];\n\t\n\t\t},\n\t\tpopoverView:openButton,\n\t});\n});\n\nwin.add(otherButton);\nwin.add(openButton);\n\nwin.open();\n{code}\n\nThe reason why the bug does not occur when alert dialog is shown, is because of the fact that when a alert dialog is shown we no longer have the keyWindow of the Application that we control and this new window has all Orientation support on it. \n\nMarking ticket as not our bug.\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-11T01:43:41.000+0000", "updated": "2012-10-11T01:43:41.000+0000" }, { "id": "223038", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "See apple documentation for more info : http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-11T01:57:16.000+0000", "updated": "2012-10-11T01:57:16.000+0000" }, { "id": "237006", "author": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This appears to no longer be an issue in iOS 6.1. I created a simple iPad app that only supports landscape orientation and am able to open the photo gallery without blocking.", "updateAuthor": { "name": "brad@inspiringapps.com", "key": "brad@inspiringapps.com", "displayName": "Brad Weber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-03T02:39:10.000+0000", "updated": "2013-02-03T02:39:10.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }