For some reason this won't work since I updated to the latest xcode with iOS 8. it doesn´t recognize
([[UIScreen mainScreen] scale] == 2.0)
&
([[UIScreen mainScreen] bounds].size.height == 568.0)
// Indicates game is running on iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
CCLOG(@"Running on iPad");
// it doesn´t recognize this any more
if ([[UIScreen mainScreen] scale] == 2.0) {
CCLOG(@"Running on iPad Retina");
} else {
CCLOG(@"Running on iPad 2");
}
} else {
CCLOG(@"Running on iPhone");
// it doesn´t recognize this any more
if ([[UIScreen mainScreen] bounds].size.height == 568.0) {
CCLOG(@"Running on iPhone 5");
} else {
CCLOG(@"Running on iPhone 4/4S");
}
}