{ "id": "170283", "key": "TIMOB-25504", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-13T20:59:18.000+0000", "created": "2017-11-13T07:59:27.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "images", "iphone", "iphoneX" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-11-13T21:33:15.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 using image-2436h@3x.jpg images are not picked up when running on iPhone X if\r\nan image-736h@3x.jpg exists.\r\nIt works fine with splash screens but not on other images.\r\n\r\nThe code below should be checking if running on iPhone X or iPhone 6/7 Plus and choose file accordingly.\r\n\r\n{code:title=TiUtils.m}\r\n\tif ([TiUtils isRetinaHDDisplay]) {\r\n\t\t// first try -736h@3x iPhone 6 Plus specific\r\n\t\tNSString *testpath = [NSString stringWithFormat:@\"%@-736h@3x.%@\",partial,ext];\r\n\t\tif ([fm fileExistsAtPath:testpath]) {\r\n\t\t\treturn [NSURL fileURLWithPath:testpath];\r\n\t\t}\r\n \r\n \t\t// second try -2436h@3x iPhone X specific\r\n \t\ttestpath = [NSString stringWithFormat:@\"%@-2436h@3x.%@\", partial, ext];\r\n \t\tif ([fm fileExistsAtPath:testpath]) {\r\n \t\t\treturn [NSURL fileURLWithPath:testpath];\r\n \t\t}\r\n\r\n \t\t// third try plain @3x\r\n\t\ttestpath = [NSString stringWithFormat:@\"%@@3x.%@\",partial,ext];\r\n\t\tif ([fm fileExistsAtPath:testpath]) {\r\n\t\t\treturn [NSURL fileURLWithPath:testpath];\r\n\t\t}\r\n\t}\r\n{code}", "attachment": [ { "id": "63580", "filename": "iPhoneXTest.zip", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2017-11-13T08:46:33.000+0000", "size": 8337414, "mimeType": "application/zip" } ], "flagged": false, "summary": "-2436h@3x Images on iPhone X are not used when -736h@3x exists", "creator": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "subtasks": [], "reporter": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "environment": null, "comment": { "comments": [ { "id": "430502", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~thomas.neerup@eg.dk],\r\n\r\nThanks for sharing with us. We are not clear about your issue. Are you using Appcerelerator Titanium or objective C? It would be better if you can share the complete test code and test case so that we can reproduce the issue on our end.\r\n\r\nBest", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-13T08:22:49.000+0000", "updated": "2017-11-13T08:25:10.000+0000" }, { "id": "430503", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Hi Mostafizur\r\n\r\nI'm using Appcelerator studio.. \r\nThe code included is from Github titanium_mobile/iphone/Classes/TiUtils.m and illustrates where I think the problem is.\r\nI'm just setting creating a Window with a backgroundImage and the wrong image is picked up by titanium..\r\n", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2017-11-13T08:26:46.000+0000", "updated": "2017-11-13T08:27:23.000+0000" }, { "id": "430505", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Test case added..\r\nWhen running on iPhone X I would expect the background image without the top border to be picked up... But the image with the border is picked up.\r\n\r\nI'm not using app thinning.\r\n false", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2017-11-13T08:49:55.000+0000", "updated": "2017-11-13T08:52:40.000+0000" }, { "id": "430512", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is a valid issue! And sorry for not seeing that earlier. We'll provide a patch today and it will be part of the next release (7.0.0).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-13T11:33:19.000+0000", "updated": "2017-11-13T11:33:19.000+0000" }, { "id": "430513", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9592\r\n\r\nTest-case: See the original tests in TIMOB-25269.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-13T11:45:49.000+0000", "updated": "2017-11-13T11:45:49.000+0000" }, { "id": "430546", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified in SDK build 7.0.0.v20171113113154", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-11-13T21:33:15.000+0000", "updated": "2017-11-13T21:33:15.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }