Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17697] iOS8: Ti.Platform - Ti.Platform.displayCaps.platformHeight returning incorrect values for iPhone6 and 6+

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-09-16T15:35:08.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sRelease 3.4.0
ComponentsiOS
LabelsTCSupport, iPhone6, iPhone6+, ios, ios8, qe-automatedtest
ReporterRajitha Dissanayake
AssigneeIngo Muschenetz
Created2014-09-15T13:39:44.000+0000
Updated2015-01-09T17:24:52.000+0000

Description

Problem The method "Ti.Platform.displayCaps.platformHeight" is used in our application to identify the iPhone device the application is being run on to dynamically adjust UI components.

With iPhone6 and 6+ this method still return 568 which is the same value returned for iPhone5/5S making it impossible to distinguish the devices. Is this an issue currently being looked at or will new API methods be made available to identify the iPhone device in Titanium SDK 3.4.

Steps to reproduce

1. Create a new mobile app 2. Paste into app.js this:
alert(Ti.Platform.displayCaps.platformHeight);
3. Run it in simulator iphone 6 / iphone 6 plus.

Extra info

It's failing both iphone6/6plus. If you run the same code it will work fine in an ipad air.

Comments

  1. Ingo Muschenetz 2014-09-16

    Can we confirm this as on 9/11, we made changes to displayCaps (see https://github.com/appcelerator/titanium_mobile/blob/3_4_X/iphone/Classes/TiPlatformDisplayCaps.m). This may have already been addressed.
  2. Rajitha Dissanayake 2014-09-16

    Checked on and confirmed working on the following configuration. Titanium SDK version: mobilesdk-3.4.0.v20140915175720-osx Platform & version: iOS 8.0 Device Details: iOS simulator Host Operating System: OSX 10.9.4 Titanium Studio version: 3.4.0.201409131007
  3. Ewan Harris 2014-09-16

    Verified fix on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409131030 Titanium SDK build: 3.4.0.v20140916151649 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc2 Xcode6 GM Seed iPhone 6 Simulator , iPhone 6 Plus Simulator Using the code below, ran an app on both simulators. The iPhone 6 returned 667 and the iPhone 6 Plus returned 736 Closing ticket
  4. Shuo Liang 2014-09-24

    Why I am still facing this problem, and not just me. some community customers as well. Mac OSX 10.9.5 Appcelerator Studio, build: 3.4.0.201409161931 Titanium SDK build: 3.4.0.v20140919162515 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc3 Xcode6 GM Seed iPhone 6 Simulator , iPhone 6 Plus Simulator Both of them still display 568 Height. Did I do something wrong?
  5. Travis Crist 2014-09-24

    Can this be retested with the latest TiSDK. We are seeing the same issue that Shuo Liang is where it still returns 568.
  6. Ingo Muschenetz 2014-09-24

    We have tested this with the latest SDK. Have you confirmed you've actually added iPhone 6/6+ splash screens and assets? Otherwise you will be running in compatibility mode.
  7. Travis Crist 2014-09-24

    Ingo, Thanks for that tip, with the splash screens added it is confirmed working for us. Can you provide any info as to what triggers "compatibility mode"? Is it an iOS or titanium trigger? Thanks, Travis
  8. Ingo Muschenetz 2014-09-24

    It's an iOS trigger. http://stackoverflow.com/questions/25886703/supporting-iphone-6-and-iphone-6-with-differant-launch-splash-screen-image-for
  9. Travis Crist 2014-09-24

    Perfect! Thanks Ingo!

JSON Source