{ "id": "136406", "key": "AC-1653", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-07-03T23:36:42.000+0000", "created": "2014-09-10T22:15:15.000+0000", "labels": [ "TCSupportTriage", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updated": "2016-03-08T07:38:08.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": "When I add the remote-notification UIBackgroundMode to tiapp.xml, opening the app immediately after a push notification arrives results in a black screen. The app continues to run (confirmed by doing a test alert and logging), but the UI is missing. I have tried opening a new dummy window in the resume event, but nothing is displayed, just a black screen. If I go back to the home screen and then re-enter the app, the UI is displayed as normal. Removing the remote-notification plist settings returns the app to normal resume behaviour.\r\n\r\nThis problem has also been reported by users using background-fetch.\r\n\r\nFurther testing has showed that alert(); does produce a dialog on screen (while the screen is black). So may point to a Window unload issue?", "attachment": [], "flagged": false, "summary": "Black screen on resume when background processing is interrupted iOS", "creator": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "subtasks": [], "reporter": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "environment": null, "comment": { "comments": [ { "id": "322946", "author": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "body": "Further testing has shown that the UI is not returned to \"Normal\" state until \r\nTi.App.iOS.endBackgroundHandler is called. Immediatly calling Ti.App.iOS.endBackgroundHandler on the Ti.App.iOS.addEventListener('silentpush', function(e)) corrects the black screen issue. However I believe the intention is to call Ti.App.iOS.endBackgroundHandler when processing is complete, not arbitrarily.", "updateAuthor": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2014-09-11T00:00:03.000+0000", "updated": "2014-09-11T00:00:03.000+0000" }, { "id": "324363", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Nick! \r\n\r\nPlease follow the instructions on how to add a bug report :\r\n\r\nhttps://wiki.appcelerator.org/display/guides2/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-SubmittingTickets\r\n\r\nIn short: \r\n\r\n1. Provide a clean simple title\r\n2. Provide a simple straightforward description\r\n3. Steps to reproduce the issue \r\n4. Sample code that reproduces the issue (in the form of app.js that can be added to a new mobile project in classic titanium) \r\n5. Expected results\r\n6. Actual results\r\n\r\nBest Regards! ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-09-17T21:41:55.000+0000", "updated": "2014-09-17T21:41:55.000+0000" }, { "id": "325386", "author": { "name": "msgtonaveen", "key": "msgtonaveen", "displayName": "Naveen R", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have this issue too\r\n\r\nSample Code:\r\n\r\nvar window = Ti.UI.createWindow({\r\n\r\n});\r\nvar view = Titanium.UI.createView({\r\n borderRadius:10,\r\n backgroundColor:'red',\r\n width:50,\r\n height:50\r\n});\r\nTi.App.iOS.addEventListener(\"silentpush\", function (e) {\r\n if (e && typeof e !== 'undefined' && e.aps && e.aps['content-available'] && typeof e.aps['content-available'] !== 'undefined') {\r\n Ti.API.info('silent push received in app.js');\r\n }\r\n});\r\n\r\nwindow.add(view);\r\nwindow.open();\r\n\r\nSteps to reproduce:\r\n1. Send a silent push to the above app while it is in background\r\n2. Open the app immediately after the push notification is received\r\n3. You will see a black screen.\r\n\r\nExpected Result: \r\nApp should open\r\n\r\nAcutal result: \r\nBlack screen\r\n\r\nAdditional findings\r\nIf a silent push is received and I open the app, I get a black screen. If I press the home button again and reopen the app, the black screen vanishes.\r\n\r\nAlso if I call Ti.App.iOS.endBackgroundHandler(e.handlerId); inside the event listener, the black screen doesn't appear. But I guess Ti.App.iOS.endBackgroundHandler(e.handlerId); should be called only when the processing is complete.\r\n\r\nGenerally if the app is opened before the expiration of the 30 second window provided by apple for background download or before Ti.App.iOS.endBackgroundHandler(e.handlerId); is called, I get a black screen.\r\n", "updateAuthor": { "name": "msgtonaveen", "key": "msgtonaveen", "displayName": "Naveen R", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-24T07:24:27.000+0000", "updated": "2014-09-24T09:11:01.000+0000" }, { "id": "326580", "author": { "name": "pilo", "key": "pilo", "displayName": "erez pilosof", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "any thought why it happens ? way around it ? also happens on ios8 remotenotificationaction handlers...", "updateAuthor": { "name": "pilo", "key": "pilo", "displayName": "erez pilosof", "active": true, "timeZone": "Asia/Jerusalem" }, "created": "2014-10-01T14:22:10.000+0000", "updated": "2014-10-01T14:22:10.000+0000" }, { "id": "326720", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "I have been heavily testing this one with xcode.\r\n\r\n- it won't always happen.\r\n- Only happen when the app must be started in the background: remote-notification\r\n- You MUST wait for the app to start in the background before opening it to see the bug.\r\n- I think it s related to drawing not happening.\r\n\r\nI have seen the black screen but not only. On thing i also see is a drawing problem with UITableView. If the UITableView is loaded in the background, then my cells are not drawing. THey are layed out correctly but drawing is not called.\r\n\r\nStill investigating, this is a really hard one ...", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2014-10-02T08:22:50.000+0000", "updated": "2014-10-02T08:22:50.000+0000" }, { "id": "356916", "author": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "body": "There is sample code in the comments -why has this been closed?", "updateAuthor": { "name": "nickkemp", "key": "nickkemp", "displayName": "Nick Kemp", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2015-07-03T23:54:04.000+0000", "updated": "2015-07-03T23:54:04.000+0000" }, { "id": "356918", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~nickkemp] we can not replicate the issue with the information provided, are you able to replicate?\r\n", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-07-04T00:03:36.000+0000", "updated": "2015-07-04T00:03:36.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }