I've converted my app for the ipad and it works great.
Now I want to create a single instance of the app that runs on the iphone and ipad.
From within my cocos2D app how can I determine which platform the app is running on? Is there a variable I can test?
iphone / ipad apps
(8 posts) (5 voices)-
Posted 1 year ago #
-
You can use the UIDevice class
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:@"iPhone"]) {
}
Not sure what the ipad kicks back. I found this on Stack Overflow.
Posted 1 year ago # -
THANKS, I'LL TRY THIS
Posted 1 year ago # -
Instead of coding to a specific device model why not code to specific features? So for instance you look at the screensize and if its 480x320 you use small sprites and if its 1024x768 you use bigger graphics.
Posted 1 year ago # -
Thanks, this is a much better idea.
Posted 1 year ago # -
How can you build an application for ipod and ipad at once?
File | New project and you can choose iphone or ipad
If you choose ipad you can not build/test for iphone and if you choose iphone you can't build/test for ipad
What is the solution?
Posted 1 year ago # -
Try starting off with an iPhone app and then transition it to an iPad app, picking universal binary.
Posted 1 year ago #
Reply
You must log in to post.