{ "id": "102310", "key": "TIMOB-11197", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "14161", "description": "Release 3.0.1", "name": "Release 3.0.1", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14700", "description": "2012 Sprint 25", "name": "2012 Sprint 25", "archived": true, "released": true, "releaseDate": "2012-12-17" }, { "id": "14784", "description": "2012 Sprint 25 API", "name": "2012 Sprint 25 API", "archived": true, "released": true, "releaseDate": "2012-12-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-12-13T00:48:40.000+0000", "created": "2012-09-27T17:53:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "iphoneAssets", "qe-review" ], "versions": [ { "id": "14137", "description": "Release 2.1.3", "name": "Release 2.1.3", "archived": true, "released": true, "releaseDate": "2012-10-03" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-02-25T18:24:26.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": "As of now, with 2.1.3RC, only default splash screen with -568h suffix are identified as iPhon5 specific by Titanium build process.\r\n\r\nIt would be useful to have Titanium identify other images ( placed in resources ) with -568h suffix as iphone 5 specific , the way @2X images are included for retina devices.\r\n\r\nCurrently the workaround is to use if/else logic and include iphone5 specific assets like below.\r\n\r\n{code}\r\nvar iPhone5 = (Ti.Platform.displayCaps.platformHeight===568);\r\nvar img = Ti.UI.createImageView();\r\nimg.image = (iPhone5) ? '/img/splash-blank-568h.png' : '/img/splash-blank.png';\r\n{code}", "attachment": [ { "id": "34006", "filename": "timob11197.zip", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T18:33:03.000+0000", "size": 2171506, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS: Request to support iPhone5 specific images (-568h suffix) in the resources other than the splash screen", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS6 and Ti SDK 2.1.3RC", "comment": { "comments": [ { "id": "221525", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I would recommend that we follow the standard for determining device-specific assets... even though Apple didn't implement it for \"iphone5\":\r\n\r\nFrom https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/Introduction/Introduction.html#//apple_ref/doc/uid/10000051i-CH1-SW2 :\r\n.\r\nmyImage~ipad.png / myImage~ipad@2x.png\r\n\r\nI propose we add a \"iphone5\" device designation.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-09-30T15:59:12.000+0000", "updated": "2012-09-30T15:59:12.000+0000" }, { "id": "230396", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I have a requirement to add to this feature... We will need a tiapp.xml property to control this feature. I support the feature being either on OR off by default.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-12-07T17:53:27.000+0000", "updated": "2012-12-07T17:53:27.000+0000" }, { "id": "230400", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Shannon\nWhat is the use case to control this feature through a tiapp.xml property?", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T18:18:16.000+0000", "updated": "2012-12-07T18:18:16.000+0000" }, { "id": "230401", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "The use case would be that I already implemented some custom code to handle this with 2.1.3+, and don't want this new feature.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-12-07T18:20:29.000+0000", "updated": "2012-12-07T18:20:29.000+0000" }, { "id": "230403", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Well your custom code will not break. The iphone5 specific identifier we are planning to support is -568h@2x (to match the default image identifier). \nThe solution shall be thus. Say you specify an image resource as test1.jpg. Here are the filenames we will test\n\nOn iPhone idiom\nif (retina)\n{\n if(iphone5) check test1-568h@2x.jpg\n check test1@2x~iphone.jpg\n check test1@2x.jpg\n}\ncheck test1~iphone.jpg\ncheck test1.jpg\n\nOn iPad idiom\nif (retina)\n{\n check test1@2x~ipad.jpg\n check test1@2x.jpg\n}\ncheck test1~ipad.jpg\ncheck test1.jpg\n\n\nSo if you specify a resource explicitly as test1-568h@2x.jpg (which is what I think you are doing to get the correct scale factor) the check loop will be\nif (retina)\n{\n if(iphone5) check test1-568h@2x-568h@2x.jpg (fail)\n check test1-568h@2x@2x~iphone.jpg (fail)\n check test1-568h@2x@2x.jpg (fail)\n}\ncheck test1-568h@2x~iphone.jpg (fail)\ncheck test1-568h@2x.jpg (pass)\n", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T18:29:47.000+0000", "updated": "2012-12-07T18:29:47.000+0000" }, { "id": "230404", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Project", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T18:33:03.000+0000", "updated": "2012-12-07T18:33:03.000+0000" }, { "id": "230406", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3555", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T18:36:04.000+0000", "updated": "2012-12-07T18:36:04.000+0000" }, { "id": "230407", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "Ok, I agree with that part. Let me propose an edge case that I don't personally care about, but others might:\r\n\r\nWhat if I'm refactoring an app to support the iPhone 5, but haven't finished yet. My app doesn't yet include a Default-568h@2x.png file, but I have some myImage-568h@2x.png assets. Does if(iphone5) evaulate as true under this scenario, or will it always be false if you don't have a Default-568h@2x.png file?", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-12-07T18:37:17.000+0000", "updated": "2012-12-07T18:37:17.000+0000" }, { "id": "230413", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Should evaluate to false because if you do not have the default image the app does not run in full screen so the iPhone5 test will fail", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-07T19:05:40.000+0000", "updated": "2012-12-07T19:05:40.000+0000" }, { "id": "231163", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "will need backport once 3.0.0 becomes GA\n", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-13T00:49:05.000+0000", "updated": "2012-12-13T00:49:05.000+0000" }, { "id": "232566", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport PR to 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3641", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-27T17:34:27.000+0000", "updated": "2012-12-27T17:34:27.000+0000" }, { "id": "236394", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Images with (-568h) suffix are getting displayed on iphone5.\r\n\r\nVerified on:\r\nIphone5\r\nSDK version: 3.0.2.v20130126230207\r\nCLI version : 3.0.24\r\nOS : MAC OSX 10.7.5\r\nXCode : 4.5.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-01-29T07:46:27.000+0000", "updated": "2013-01-29T07:46:27.000+0000" }, { "id": "236954", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix with:\nTitanium Studio, build: 3.0.2.201301281948\nTitanium SDK, build: 3.0.2.v20130129171611\nXcode 4.6\nDevices:\niPhone 3GS iOS 4.3\niPhone4S iOS 5.0.1\niPhone5 iOS 6.1", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-01T22:03:39.000+0000", "updated": "2013-02-01T22:03:39.000+0000" }, { "id": "239408", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "I couldn't get this to work with a backgroundImage on a Window. Did support only get added for ImageViews, or did I do something wrong?\r\n\r\nTried with 3.0.2GA.\r\n\r\nThis didn't work:\r\n{code}win.backgroundImage = 'images/backgrounds/login.png';{code}\r\n\r\nThis does work (isiPhone5 checks for 4\" retina height):\r\n{code}win.backgroundImage = isiPhone5 ? 'images/backgrounds/login-568@2x.png':'images/backgrounds/login.png';{code}", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-22T17:17:35.000+0000", "updated": "2013-02-22T17:17:35.000+0000" }, { "id": "239678", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Shannon. We went back through our test code as well as used the naming and structure you are using. We definitely have something going on. While simulator was working as expected, it seems like the resources are not always copying over the the app during device builds. We could not reliably reproduce the problem. We did at least see it occur. We will focus on the build process as some things happen asynchronously and that is the current thinking. In addition, iOS tends not to let go of the resources from a previous install of the same app ID. This has clouded the results. I will probably open a new bug and relate it to this \"feature\" ticket.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-25T18:24:26.000+0000", "updated": "2013-02-25T18:24:26.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }