It seems that with the latest builds I cannot verify if I’m running on an iPhone4 anymore…why is that?
It also have been removed from the documentation…
system.getInfo(“model”) == “iPhone”
[import]uid: 89239 topic_id: 18210 reply_id: 318210[/import]
It seems that with the latest builds I cannot verify if I’m running on an iPhone4 anymore…why is that?
It also have been removed from the documentation…
system.getInfo(“model”) == “iPhone”
[import]uid: 89239 topic_id: 18210 reply_id: 318210[/import]
This is crashing the Simulator on mine.
– Due to newRetinaText bug this workaround is required –
if (system.getInfo(“model”) == “iPhone” and display.contentWidth == 640) then [import]uid: 10389 topic_id: 18210 reply_id: 69703[/import]
Bug 9902 raised [import]uid: 10389 topic_id: 18210 reply_id: 69708[/import]
This is not a bug. The getInfo for iPhone4 was “fixed” so it returns “iPhone” on the Simulator, which matches what the actual device returns. The simulator incorrectly returned “iPhone4”. Apple doesn’t want you to know if the device is an iPhone or iPhone4.
You can tell if the device is an iPhone4 by either looking at display.contentWidth, if you don’t have dynamic scaling enabled or display.contentScaleX if dynamic scaling is enabled. ScaleX will return 0.5 for iPhone4 and 1.0 for iPhone.
The documentation has not changed for this API. It has never mentioned “iPhone4” as a model. [import]uid: 7559 topic_id: 18210 reply_id: 69743[/import]
Thanks for responding to this problem.
I will change the verification then.
[import]uid: 89239 topic_id: 18210 reply_id: 69747[/import]
To be precise, that line causes an error in Director. [import]uid: 10389 topic_id: 18210 reply_id: 69827[/import]