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.
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.
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
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
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?
Can this be retested with the latest TiSDK. We are seeing the same issue that Shuo Liang is where it still returns 568.
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.
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
It's an iOS trigger. http://stackoverflow.com/questions/25886703/supporting-iphone-6-and-iphone-6-with-differant-launch-splash-screen-image-for
Perfect! Thanks Ingo!