Titanium JIRA Archive
Appcelerator Community (AC)

[AC-392] Ti.Platform.displayCaps differs simulator/device

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-11-14T00:56:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage
ReporterRainer Schleevoigt
AssigneeShak Hossain
Created2015-01-14T13:35:42.000+0000
Updated2015-11-14T00:56:57.000+0000

Description

Retrieving of Ti.Platform.displayCaps differs between devices and simulator: ~~~ Simulator: Ti.Platform.displayCaps.density: high Ti.Platform.displayCaps.dpi: 320 Ti.Platform.displayCaps.platformHeight: 667 Ti.Platform.displayCaps.platformWidth: 375 Ti.Platform.displayCaps.logicalDensityFactor: 2 Device: Ti.Platform.displayCaps.density: high Ti.Platform.displayCaps.dpi: 320 Ti.Platform.displayCaps.platformHeight: 568 Ti.Platform.displayCaps.platformWidth: 320 Ti.Platform.displayCaps.logicalDensityFactor: 2 ~~~ This is output using iPhone6. The similar issue is at iPhone6plus and iPhone5. On device all phones works with virtual width of 320. On simulator it depends on model. Background: in some cases I need absolute positioning in a grid. It runs with same geometry on device, but I cannot debug in simulator, because there are other dimensions.

Comments

  1. Shuo Liang 2015-01-15

    HI, Just tried Ti.Platform.displayCaps all properties on my iphone6Plus, Can't reproduce your problem. Both of them, display the following info.
       [INFO] :   Ti.Platform.displayCaps.density: xhigh
       [INFO] :   Ti.Platform.displayCaps.dpi: 480
       [INFO] :   Ti.Platform.displayCaps.platformHeight: 736
       [INFO] :   Ti.Platform.displayCaps.platformWidth: 414
       [INFO] :   Ti.Platform.displayCaps.logicalDensityFactor: 3
       
  2. Rainer Schleevoigt 2015-01-15

    In my test set the platformWidth differs between simulator and device at iPhone6 and iPhone6plus. On device I can see everywhere 320, on simulator the with is increasing. As I can see from your answer the output differs on devices. Is it depending of parameters in tiapp.xml? I'm using: dip Rainer
  3. Shuo Liang 2015-01-16

    I used the same default unit, still can't reproduce your problem with my 6plus device.
  4. Rainer Schleevoigt 2015-02-04

    I have only a common iPhone6 and in my case I see on simulator the physical size and on device normalized (320) dimension. On my iPhone5c in both cases comes the same dimension. I think it is normal. Background: in my project I have to use absolute positoning (tiles in flipboard) and I have to calculate this.

JSON Source