None of that makes any sense.
contentWidth/Height should return what you set width/height to in config.lua. Lets call these points not pixels since we are going to scale the pixels to make the points work out.
pixelWidth/Height should return the actual pixel width/height of the device – in pixels not points.
actualContentWidth/Height should return to you the actual content height/width in points.
Normally in config.lua most people define a width/height to be 320x480. This is an aspect ratio of 1.5:1 (or 3:2) which is the shape of the original iPhone 3/4 family and many early Android devices. Today’s phones are typical HDTV shaped (16:9 or 1.77778:1) meaning for portrait app, it’s going to be taller than a 320x480. Your iPads are all a 4:3 aspect ratio meaning they are closer to square than the phones. Again working purely in content points with an iPhone 6, which is physically 750x1334, it becomes a 320x568 when scaled to a config.lua using 320x480. There are 44 pixels above the content area and 44 below (assuming your content area is centered and assuming you’ve chosen letterbox as the scaling method.) For the iPad, the actual content area will end up being 360 x 480 since the extra space on an iPad relative to a 320x480 content area is on the sides.
I did a simple test with this config.lua:
application = { content = { width = 750, height = 1334, scale = "letterbox", fps = 60, }, }
and this main.lua:
print("contentWidth,height", display.contentWidth, display.contentHeight) print("actualContentWidth,height", display.actualContentWidth, display.actualContentHeight) print("pixelWidth,height", display.pixelWidth, display.pixelHeight)
Here are my results:
Corona Simulator iPhone 6 skin:
Oct 12 11:39:32.236 contentWidth,height 750 1334
actualContentWidth,height 751.54931640625 1334
Oct 12 11:39:32.239 pixelWidth,height 640 1136
iPad mini:
Oct 12 11:40:01.736 contentWidth,height 750 1334
actualContentWidth,height 1000.5 1334
pixelWidth,height 768 1024
iPad Air:
Oct 12 11:40:53.716 contentWidth,height 750 1334
actualContentWidth,height 1000.5 1334
Oct 12 11:40:53.716 pixelWidth,height 1536 2048
Actual iPad 4 (Retina)
Oct 12 11:54:42.654 [Device] contentWidth,height 750 1334
Oct 12 11:54:42.654 [Device] actualContentWidth,height 1000.5 1334
Oct 12 11:54:42.655 [Device] pixelWidth,height 1536 2048
My iPhone 6
Oct 12 11:56:35.902 [Device] contentWidth,height 750 1334
Oct 12 11:56:35.948 [Device] actualContentWidth,height 751.54931640625 1334
Oct 12 11:56:35.949 [Device] pixelWidth,height 640 1136
Here the pixelWidth and height don’t match what it should. In fact its reporting an iPhone 5 screen size. This isn’t a bug. It’s the way iOS works. My temp app doesn’t have the appropriate launch images setup in build.settings. Since I’m missing my Default-667h@2x.png file (and build.settings entries), the phone is assuming correctly I want to run in iPhone 5 emulation mode.
So based on this test things seem to behave correctly.