{ "id": "171849", "key": "TIMOB-26162", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2018-06-27T12:52:28.000+0000", "created": "2018-06-27T09:51:22.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "animation", "ios", "native_behavior" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-06-27T12:54:47.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Issue Description:*\r\nAnimation is working fine if application is in foreground, but if we launch the app from background, animation is not working on iOS using ti SDK 7.2.0.GA, 7.0.2.GA. App just freezes. On android, it works as expected. \r\n\r\n*Test Code:*\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\n*index.js*\r\n{code}\r\nmove($.progressBarItemsView);\r\nTi.App.addEventListener(\"paused\", onPausediOS);\r\nTi.App.addEventListener(\"resumed\", onResumediOS);\r\nfunction onPausediOS() {\r\n\tmove($.progressBarItemsView, true);\r\n}\r\n\r\nfunction onResumediOS() {\r\n\tmove($.progressBarItemsView, false);\r\n}\r\n\r\n/*function move(view) {\r\n view.right = 0;\r\n var origin = view.getRect();\r\n var forth = Titanium.UI.createAnimation();\r\n forth.duration = 1500;\r\n forth.left = 0;\r\n forth.autoreverse = true;\r\n forth.repeat = 999999;\r\n view.animate(forth);\r\n }*/\r\n\r\nfunction move(view, pauseFlag) {\r\n\tview.right = 0;\r\n\tvar origin = view.getRect();\r\n\tvar forth = Titanium.UI.createAnimation();\r\n\tif (pauseFlag) {\r\n\t\tforth.duration = 0;\r\n\t\tforth.left = 0;\r\n\t\tforth.autoreverse = false;\r\n\t\tforth.repeat = 0;\r\n\t\t//view.animate(forth);\r\n\t} else {\r\n\t\tTi.API.info('pauseFlag>>>' + pauseFlag);\r\n\t\tforth.duration = 1500;\r\n\t\tforth.left = 0;\r\n\t\tforth.autoreverse = true;\r\n\t\tforth.repeat = 999999;\r\n\t\tview.animate(forth);\r\n\t}\r\n}\r\n\r\n$.index.open();\r\n{code}\r\n\r\n*index.tss*\r\n{code}\r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n}\r\n\r\n\"Label\": {\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#000\"\r\n}\r\n\r\n\"#label\": {\r\n\tfont: {\r\n\t\tfontSize: 12\r\n\t}\r\n}\r\n\r\n\"#title_lbl\":\r\n{\r\n\tcolor: \"#515151\",\r\n\ttext: \"Just a Moment . . .\",\r\n\theight: Titanium.UI.SIZE,\r\n\ttextAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tfont: {\r\n\t\tfontSize: \"24sp\",\r\n\t\t//fontFamily: Alloy.Globals.IMG_CONFIG.FONT_SANS_REGULAR\r\n\t},\r\n\ttouchEnabled: true,\r\n},\r\n{code}\r\n\r\n*Steps to reproduce:*\r\nRun the test code.\r\nObserve that animation is working.\r\nKeep the app in background.\r\nLaunch the app from background again and observe that animation does not work\r\n\r\n*Expected:*\r\nAnimation should work when app is launched from background.\r\n\r\n*Actual:*\r\nAnimation does not work\r\n\r\n*Test log:*\r\n{code}\r\n[INFO] : pauseFlag>>>undefined\r\n[DEBUG] : Application booted in 3630.563974 ms\r\n[DEBUG] : Firing app event: resumed\r\n[INFO] : pauseFlag>>>false\r\n[WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation.\r\n[WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation.\r\n[WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation.\r\n[WARN] : New layout set while view [object progressBarItemsView] animating: Will relayout after animation.\r\n[DEBUG] : Firing app event: paused\r\n[DEBUG] : Firing app event: resumed\r\n[INFO] : pauseFlag>>>false\r\n[DEBUG] : Firing app event: paused\r\n[DEBUG] : Firing app event: resumed\r\n[INFO] : pauseFlag>>>false\r\n{code}\r\n\r\nDropbox link for animation POC:\r\nhttps://www.dropbox.com/s/pr2ua7ndz93pzhf/ProgressbarPOC.zip?dl=0\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Animation is not working when the app window is opened from the background.", "creator": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "jnaher", "key": "jnaher", "displayName": "Jebun Naher", "active": false, "timeZone": "Asia/Dhaka" }, "environment": "Appcelerator Command-Line Interface, version 7.0.4\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.5\r\n\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.13\r\n Core Package = 7.0.4\r\n\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\n node-appc Version = 0.2.44\r\n\r\nTitanium SDKs = 7.2.0.GA, 7.0.2.GA\r\n\r\nSimulator: iPhone 6 (iOS 11.0)\r\n ", "closedSprints": [ { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "438757", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is by Apple design - Animations should not be performed while the app is backgrounded. Quote from Apple:\r\n{quote}\r\nWhen your application goes into the background, all animations are removed from all layers. You will have to re-establish these animations each time you come to the foreground.\r\n{quote}\r\nOriginal discussion [here|https://forums.developer.apple.com/thread/15796] and a similar discussion [here|https://github.com/airbnb/lottie-ios/issues/413].", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-06-27T12:52:28.000+0000", "updated": "2018-06-27T12:53:54.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }