I want to know what kind of iPhone is running my app, so I use Titanium.Platform.model to get it.
As API documentation, Appcelerator said that Ti.Platform.model will return the model name of current device. But when I try on real iPhone (both 2G, 3G or 4), I see the returned model name is 'iPhone'. But my expected result is 'iPhone 2G' or 'iPhone 4'.
Is the API document wrong? Do we have other solution to determine i开发者_JAVA技巧f current device is iPhone 2G or not?
It does not look like you will ever get 2G back, but you should be getting iPhone 4. take a look at the source code here
精彩评论