Reputation: 356
I'm using cocos2d v2.0.0 with simulator 6.1.
When I compile a project in iPhone5 simulator in xcode, the surface size is
cocos2d: surface size: 1136x640
The application works correctly, fitting to screen borders 1136x640, but when I run application on a iPhone5 Device, I get
cocos2d: surface size: 960x640
The image no longer covers the full screen.
What is the problem?
Upvotes: 0
Views: 1312
Reputation: 247
Most likely the screenshot you provided for iPhone 5 ([email protected]) somehow doesn't copy to the device. Possible reasons:
- Bad png format.
- Bad name ([email protected] vs [email protected]). Simulator is case sensitive.
- Not in the copy files target in the project settings. It might have already copied on the simulator at a certain point but right now it's not copying into the project.
Hope this helps.
Upvotes: 0
Reputation: 966
You need to make sure and have you have a 4 inch launch image defined in your project.
Upvotes: 5
Reputation: 21726
Try to use cocos2d 2.1
and use methods to get screen size:
[[CCDirector sharedDirector] winSize];
[[CCDirector sharedDirector] winSizeInPixels];
Upvotes: 0