{ "id": "128873", "key": "TIMOB-17143", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "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": "2015-04-20T01:42:13.000+0000", "created": "2014-04-10T14:35:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-3.4.0" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-05-26T18:17:07.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": "It seems like the \"old\" way of taking screenshots results in black toolbars when running the app on a device.\r\n\r\nSimply adding [window drawViewHierarchyInRect:window.bounds afterScreenUpdates:YES]; for iOS 7 seems to fix the problem, as mentioned in this StackOverflow answer: http://stackoverflow.com/a/8017292/646859\r\n\r\nI've tried it and it seems to work. I'm not used to contributing to open source-projects to I hope someone can take a look at it for me :)\r\n\r\n» Marcus", "attachment": [ { "id": "51455", "filename": "ios7.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T18:17:01.000+0000", "size": 59495, "mimeType": "image/png" }, { "id": "51456", "filename": "ios8.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T18:17:01.000+0000", "size": 61871, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS : Ti.Media.takeScreenshot() returns black toolbars", "creator": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "arood", "key": "arood", "displayName": "Marcus Olovsson", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS7 on device", "closedSprints": [ { "id": 371, "state": "closed", "name": "2015 Sprint 08 SDK", "startDate": "2015-04-11T00:00:49.626Z", "endDate": "2015-04-24T12:00:00.000Z", "completeDate": "2015-04-28T15:02:06.073Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "300533", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you Marcus for pointing to the solution for this issue. In order to investigate further we need a simple runnable test case that demonstrates this issue.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-10T17:37:44.000+0000", "updated": "2014-04-10T17:37:44.000+0000" }, { "id": "306995", "author": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "body": "Code to reproduce\r\n\r\n{code:javascript}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\nvar tab1 = Ti.UI.createTab({\r\n window: Ti.UI.createWindow({title: \"Hello\", backgroundColor: \"red\"}),\r\n title: 'Should be grey on iOS7',\r\n icon: 'myicon.png'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n window: Ti.UI.createWindow({title: \"Hello\", backgroundColor: 'blue'}),\r\n title: 'Should be grey on iOS7',\r\n icon: 'myicon.png'\r\n});\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n\r\n\r\nvar emailDialog = Ti.UI.createEmailDialog();\r\n emailDialog.subject = 'Black tabs on iOS 7 :(';\r\n emailDialog.toRecipients = ['john.doe@whatever.xyz'];\r\n \r\nTi.Media.takeScreenshot(function(event) {\r\n\temailDialog.addAttachment(event.media);\r\n\temailDialog.open();\r\n});\r\n{code}\r\n\r\nThis code creates an app with 2 tabs with a grey background (on iOS 7).\r\nThen, the app takes a screenshot and open the preview in an email.\r\n\r\n- When you'll check the screenshot in the email, you'll notice that the grey tabs are now black.\r\n- If you use the same code, with only 1 tab, it will be grey in the screenshot\r\n\r\nThanks in advance for the fix :)", "updateAuthor": { "name": "knice", "key": "knice", "displayName": "Romain", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-30T13:21:06.000+0000", "updated": "2014-05-30T13:21:06.000+0000" }, { "id": "308499", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Romain - Thanks for the test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T18:08:59.000+0000", "updated": "2014-06-11T18:08:59.000+0000" }, { "id": "308500", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this to engineering as I can reproduce the issue with the provided test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-11T18:09:40.000+0000", "updated": "2014-06-11T18:09:40.000+0000" }, { "id": "324653", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue exist with 3.2.3 but can't reproduce on 3.4.0 \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\nTiSDK 3.4.0 \r\niOS : 7.0\r\nTitanium Command-Line Interface, CLI version 3.3.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T05:54:40.000+0000", "updated": "2014-09-19T05:55:47.000+0000" }, { "id": "324765", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening ticket. Can still reproduce on an iOS 7 device (see ios7.png), but not on an iOS 8 device (see ios8.png).\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 3.4.0.201409161950\r\nSDK build: 3.4.0.v20140918202513\r\nCLI: 3.4.0-rc4\r\nAlloy: 1.5.0-rc3\r\nXcode: 6.0.1\r\nDevices: iphone 5 (7.1.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T18:15:17.000+0000", "updated": "2014-09-19T18:15:50.000+0000" }, { "id": "345670", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Can still reproduce on SDK 3.5.1.GA.\r\nUpdated sample code to test on simulator:\r\n{code}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\nvar tab1 = Ti.UI.createTab({\r\n window: Ti.UI.createWindow({title: \"Hello\", backgroundColor: \"red\"}),\r\n title: 'Should be grey on iOS7',\r\n icon: 'myicon.png'\r\n});\r\nvar tab2 = Ti.UI.createTab({\r\n window: Ti.UI.createWindow({title: \"Hello\", backgroundColor: 'blue'}),\r\n title: 'Should be grey on iOS7',\r\n icon: 'myicon.png'\r\n});\r\ntabGroup.addTab(tab1);\r\ntabGroup.addTab(tab2);\r\ntabGroup.open();\r\n\r\nvar fileName = 'testme.png';\r\n\r\ntab1.window.addEventListener('click', function(e) {\r\n Ti.Media.takeScreenshot(function(e) {\r\n var file = Ti.Filesystem.getFile(Ti.Filesystem.getTempDirectory(), fileName);\r\n Ti.API.info(fileName + ': ' + file.resolve());\r\n file.write(e.media);\r\n file = null;\r\n });\r\n});\r\n{code}", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-11T06:47:21.000+0000", "updated": "2015-03-11T06:47:21.000+0000" }, { "id": "350064", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Unable to reproduce on device and simulator in the following environment:\r\niOS Device: iOS 7.1.2 iPad 2\r\niOS Simulator: iOS 7.1, iOS 8.3\r\nXcode: 6.3\r\nTitanium SDK : 3.5.1.GA\r\nAppc CLI: 0.2.247\r\nStudio build: 4.0.0.201504170803\r\n\r\nIt seems like the latest Xcode Base SDK iOS 8.3 may have fixed this issue.\r\n\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-04-20T01:41:52.000+0000", "updated": "2015-04-20T01:41:52.000+0000" }, { "id": "353531", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing. Cannot reproduce using:\r\n\r\nStudio 4.0.0.201505202026\r\nTi SDK 4.0.1.v20150521135010\r\nAppc NPM 4.0.0\r\nAppc CLI 4.0.1-0\r\nTi CLI 4.0.0\r\nAlloy 1.6.0\r\nXcode 6.4\r\n\r\nScreenshots are taken without the black bar, as expected.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-05-26T18:17:07.000+0000", "updated": "2015-05-26T18:17:07.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }