{ "id": "136709", "key": "TIMOB-17718", "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": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-07T16:23:43.000+0000", "created": "2014-09-17T07:24:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "3.4.0-beta", "TCSupport", "ios", "module_platform" ], "versions": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [ { "id": "41380", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "136844", "key": "TIMOB-17726", "fields": { "summary": "iOS: Support Ti.Platform.displayCaps.logicalDensityFactor", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "50542", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "154800", "key": "ALOY-1352", "fields": { "summary": "Alloy: add support for xhigh on iOS in measurement builtin", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-02-08T20:34:35.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": "When running the latest Ti SDK 3.4 16th Sep the app now starts up and correctly reports the display caps.\r\n\r\nThe density value is \"high\" for the @2x devices; iPhone 4, iPhone 4s, iPhone 5, iPhone 5s & iPhone 6 - which is correct. However the iPhone 6+ which is a @3x should gain a new value for the density property to help distinguish it from the other devices.\r\n\r\nThe dpi does change, but as that could be different for different families of iDevices it cannot be used without also checking other values to confirm - which will get ever more complicated.\r\n\r\nAndroid devices report back a different value for all of their densities, I think @3x on an iDevice should also be distinct from @1x & @2x devices.\r\n\r\nAll other values appear correct, quick tests from the top three devices;\r\n\r\niPhone 6+\r\n\r\nTi.Platform.displayCaps.density: high\r\nTi.Platform.displayCaps.dpi: 480\r\nTi.Platform.displayCaps.platformHeight: 736\r\nTi.Platform.displayCaps.platformWidth: 414\r\nTi.Platform.model: Simulator\r\nTi.Platform.name: iPhone OS\r\nTi.Platform.osname: iphone\r\nTi.Platform.ostype: 32bit\r\n\r\niPhone 6\r\n\r\nTi.Platform.displayCaps.density: high\r\nTi.Platform.displayCaps.dpi: 320\r\nTi.Platform.displayCaps.platformHeight: 667\r\nTi.Platform.displayCaps.platformWidth: 375\r\nTi.Platform.model: Simulator\r\nTi.Platform.name: iPhone OS\r\nTi.Platform.osname: iphone\r\nTi.Platform.ostype: 32bit\r\n\r\niPhone 5\r\n\r\nTi.Platform.displayCaps.density: high\r\nTi.Platform.displayCaps.dpi: 320\r\nTi.Platform.displayCaps.platformHeight: 568\r\nTi.Platform.displayCaps.platformWidth: 320\r\nTi.Platform.model: Simulator\r\nTi.Platform.name: iPhone OS\r\nTi.Platform.osname: iphone\r\nTi.Platform.ostype: 32bit", "attachment": [], "flagged": false, "summary": "iOS8: Ti.Platform.displayCaps.density - requires new value for iPhone 6+ specifically", "creator": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "environment": "Any Apple OSX based", "closedSprints": [ { "id": 220, "state": "closed", "name": "2014 Sprint 20 SDK", "startDate": "2014-09-29T22:32:25.224Z", "endDate": "2014-10-13T18:25:00.000Z", "completeDate": "2014-10-13T18:25:45.560Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "324205", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Why not just deprecate this and make {{Ti.Platform.displayCaps.logicalDensityFactor}} available under iOS as well and just return {{\\[UIScreen mainScreen\\].scale;}}?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-09-17T08:51:57.000+0000", "updated": "2014-09-17T08:51:57.000+0000" }, { "id": "324440", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Having reviewed some Ti code related to choosing the correct versions of things I have noted the occasional use of explicit statements noting actual device models.\r\n\r\nGiven this I feel my own subject should be changed to all iOS @3x devices - not just the iPhone 6+ which is the only current one available today.\r\n\r\nI agree with Fokke that {code}Ti.Platform.displayCaps.logicalDensityFactor{code} should be enabled and used correctly to reflect the @1x - @3x densities. However I do suggest that {code}Ti.Platform.displayCaps.density{code} is updated as it is used by many, does no harm, is not an anti-pattern and is complementary to the Android values.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-18T07:52:19.000+0000", "updated": "2014-09-18T07:52:19.000+0000" }, { "id": "324539", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We do agree that logicalDensityFactor is a fine addition for iOS. However, in the meantime, why couldn't you use the DPI values?\r\n\r\nRelated, what would we use after \"high\"? \"higher\"?\r\n", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-18T17:52:54.000+0000", "updated": "2014-09-18T17:52:54.000+0000" }, { "id": "324663", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yes, using the dpi is a good - temporary - workaround.\r\n\r\nI would *not* add a new value to {{Ti.Platform.displayCaps}}. That would only keep people from switching to using {{Ti.Platform.displayCaps.logicalDensityFactor}} which is more future proof. Just deprecate it and leave it returning {{high}} for iPhone 6+.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-09-19T06:22:45.000+0000", "updated": "2014-09-19T06:22:45.000+0000" }, { "id": "324697", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Vehemently against the removal of {code}Ti.Platform.displayCaps.density{code} I would have spent time writing a ticket about the importance of updating property in line with new ratios this without thinking this through.\r\n\r\nThere are many things that offer more than one to achieve your goals and often like this one it is one way to determine things in combination with others.\r\n\r\nUnless this can be shown to be an anti-pattern removal is just stupid. The suggestion that {code}Ti.Platform.displayCaps.logicalDensityFactor{code} was a good one. But in doing so you are suggesting that iOS comes in line with Android and removing density takes away the universal nature of being able to call either property.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-19T13:16:10.000+0000", "updated": "2014-09-19T13:16:10.000+0000" }, { "id": "324713", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~core13] If we do decide to add a new value, I'm not sure what to call it. And I can't imagine this is the last time the DPI changes.\r\n\r\nSince 480 matches the android value, we could use xhigh: http://developer.android.com/reference/android/util/DisplayMetrics.html#DENSITY_XHIGH", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T14:55:52.000+0000", "updated": "2014-09-19T14:55:52.000+0000" }, { "id": "324776", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Ingo If we are trying to match the iOS version against the Android examples then the existing 320 dpi is matched incorrectly right now it should be xhdpi, where as it appears to match the hdpi.\r\n\r\nIt is also worth noting that Androids information on 480dpi appears to contradict the link you provided.\r\nhttp://developer.android.com/guide/practices/screens_support.html#range\r\n\r\n- The original iPhone is @1x (Android mdpi) the medium density value matches\r\n- Retina iPhone is @2x (Android xxhpi) the high density value does not match\r\n- iPhone 6+ is @3x (Android xxhdpi) this is the problem - we would need either correct the @2x or go with it.\r\n\r\nI would recommend going with the existing density name for @2x as correcting this now is simply wrong, then use *xhigh* as the @3x value.\r\n\r\nWhilst this agrees with your choice it comes at it from another angle. In the future simply add another *x* as a prefix until the standard or logic changes down the road. This would give iOS its own sequence; medium, high, xhigh.\r\n\r\nThis plus the use of *logicalDensityFactor* for @1x, @2x & @3x as; 1, 2 & 3 as Fokke suggested will really improve this section of the API.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-19T18:53:32.000+0000", "updated": "2014-09-19T18:53:32.000+0000" }, { "id": "327130", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR master: https://github.com/appcelerator/titanium_mobile/pull/6202\r\nPR 3_4_X: https://github.com/appcelerator/titanium_mobile/pull/6203", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-07T15:37:44.000+0000", "updated": "2014-10-07T15:37:44.000+0000" }, { "id": "327149", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR's merged.\r\n@3x scale factor now returns density \"xhigh\"", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-07T16:23:43.000+0000", "updated": "2014-10-07T16:23:43.000+0000" }, { "id": "327158", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.9.5\r\nAppcelerator Studio, build: 3.4.0.201409261245\r\nTitanium SDK build: 3.4.1.v20141007092513, 3.5.0.v20141007092513\r\nTitanium CLI, build: 3.5.0-dev\r\nAlloy: 1.5.1\r\nXcode: 6.1 GM Seed\r\niPhone 6 Plus (8.0.2), iPhone 6 (8.0.2)\r\n\r\nBuilt to an iPhone 6 Plus and queried Ti.Platform.displayCaps.density in an alert, the value returned is 'xhigh' as expected and on an iPhone 6 the value returned is 'high' as expected.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-10-07T17:23:53.000+0000", "updated": "2014-10-07T17:27:31.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }