I am building a universal app. I ran it in the simulator and have put in specific code to scale the app in my code. In the simulator
system.getinfo("model") -- returns "iPhone4" for the iPhone4 device simulator
On an actual iPhone4 device system.getinfo("model") -- returns "iPhone". As a workaround I have put an extra option in my if statement that checks if it is "iPhone" and display.contentWidth == 640 then I assume the device is an iPhone 4. This works.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
system.getInfo("model") == "iPhone4" works on simulator but not on device
Nice, thanks!
1 2 3 4 5 6 7 | -- iPhone 4 Specific isiPhone4 = false if(system.getInfo("model") == "iPhone" and display.contentWidth == 640)then isiPhone4 = true end |
Something else others should be aware of, the Simulator WINDOW menu for "View As" lists "NexusOne" with no space, but the API call returns "Nexus One". "Galaxy Tab" is consistent though. Just a heads-up when using system.getInfo("model")
That looks like a bug on the Mac Simulator. iPhone4 skin should return the same string as on an actual device, "iPhone". I'll file a bug to have it fixed. Thanks.
views:1451 update:2011/10/11 22:13:38
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
gameCredits -- what kind of payouts do you get?
Why are there so many 14 year olds? And a question about some code..
Audio Files in Documents Directory?
Corona SDK in Apple's top 10 development tools!
trying to mimic a controllable dot matrix grid
Add a display.newMetaball()
Epic Biking now available
Please change to a better Bulletin Board software
Video in android
Can I stop the network.request() listener ?
Why are there so many 14 year olds? And a question about some code..
Audio Files in Documents Directory?
Corona SDK in Apple's top 10 development tools!
trying to mimic a controllable dot matrix grid
Add a display.newMetaball()
Epic Biking now available
Please change to a better Bulletin Board software
Video in android
Can I stop the network.request() listener ?
corona forums © 2003-2011