{ "id": "162602", "key": "TIMOB-23778", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-15T23:58:56.000+0000", "created": "2016-08-15T20:52:25.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-5.5.0" ], "versions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [ { "id": "52395", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "161058", "key": "TIMOB-23509", "fields": { "summary": "iOS10: Expose new visual effects on Ti.UI.iOS.BlurView", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-08-16T20:24:18.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": "Two new visual effects for iOS10 were exposed for Ti.UI.iOS.BlurView:\r\n{{Ti.UI.iOS.BLUR_EFFECT_STYLE_REGULAR}}\r\n{{Ti.UI.iOS.BLUR_EFFECT_STYLE_PROMINENT}}\r\n\r\nCurrently, when running an app with these styles on a device < iOS10, the following error is returned: \r\n{code:java}\r\n[ERROR] Invalid type passed to function. expected: Number, was: NSNull -[TiUIiOSBlurView setEffect_:] (TiUIiOSBlurView.m:43)\r\n{code}\r\n\r\nIt would be beneficial to handle this better through the form of a warning, stating that the currently selected style is not supported for the current iOS version. \r\n\r\nh1. TEST CODE:\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n \r\n// Reference image (or view)\r\nvar img = Ti.UI.createImageView({\r\n image: \"/default_app_logo.png\",\r\n top: 100,\r\n width: 300,\r\n height: 300\r\n});\r\n \r\n// Blur view\r\nvar blur = Ti.UI.iOS.createBlurView({\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.FILL\r\n});\r\n \r\nimg.add(blur);\r\n \r\n// Effect controls\r\nvar tabs = Ti.UI.iOS.createTabbedBar({\r\n labels: [\"Extra light\", \"Light\", \"Dark\", \"Regular\", \"Prominent\"],\r\n bottom: 100\r\n});\r\n \r\n// Available blur effects\r\nvar effects = [\r\n Ti.UI.iOS.BLUR_EFFECT_STYLE_EXTRA_LIGHT,\r\n Ti.UI.iOS.BLUR_EFFECT_STYLE_LIGHT,\r\n Ti.UI.iOS.BLUR_EFFECT_STYLE_DARK,\r\n Ti.UI.iOS.BLUR_EFFECT_STYLE_REGULAR,\r\n Ti.UI.iOS.BLUR_EFFECT_STYLE_PROMINENT\r\n];\r\n \r\ntabs.addEventListener(\"click\", function(e) {\r\n blur.setEffect(effects[e.index]);\r\n});\r\n \r\nwin.add(tabs);\r\nwin.add(img);\r\nwin.open();\r\n{code}\r\n\r\n\r\nh2. Steps to Reproduce\r\n1. Create a new classic mobile application.\r\n2. Copy test code to app.js file.\r\n3. Build the app to an iOS device / sim < iOS10.\r\n4. Launch the app and select \"Regular\" or \"Prominent\" buttons.\r\n\r\nh2. Actual Result\r\n\r\nError is returned to the console, which does not clearly describe the issue.\r\n\r\nh2. Expected Result\r\n\r\nAppropriate warning message should be returned stating that the style is not supported for the current version.\r\n", "attachment": [], "flagged": false, "summary": "iOS: Improve warning when calling iOS10 visual effects for Ti.UI.iOS.BlurView on < iOS10 ", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "iPhone 6S (10.0) Device & Simulator\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.5.0.v20160815115302\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 6.0.0-25\r\nXcode 8.0 beta 5 (8S193k)\r\nNode v4.4.7\r\n", "comment": { "comments": [ { "id": "393216", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The app will now log {{[ERROR] The provided value for the Ti.UI.BlurView.effect property is not available in this iOS version.}} if the provided effect is not available.\r\n\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/8233\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8232\r\nPR (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8231\r\n\r\nPlease use the demo-code above.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-15T21:30:11.000+0000", "updated": "2016-08-15T21:30:11.000+0000" }, { "id": "393318", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, the following warning is returned when calling an iOS10 visual effect for Ti.UI.iOS.BlurView on < iOS10:\r\n{code:java}\r\n[ERROR] : The provided value for the Ti.UI.iOS.BlurView.effect property is not available in this iOS version.\r\n{code}\r\n\r\nTested On:\r\niPhone 6S (10.0, 9.3.4, 8.2) Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.5.0.v20160816120242\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 6.0.0-25\r\nXcode 8.0 beta 6 (8S193k)\r\nNode v4.4.7\r\n\r\n*Closing ticket.*\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-16T20:24:06.000+0000", "updated": "2016-08-16T20:24:06.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }