I have built an application using Xcode 6 for iOS 8.
I have also installed the additional iOS 7.1 simulator to allow me to test for previous operating systems.
The issue I'm having is, when I run the application on an iOS 7.1 iPhone 5 or 5s, it appears to think the phone is an iPhone 4s.
I have implemented the following code to allow me to identify the issue.
if (width == 320 && height == 480) {
device = @"iPhone4";
} else if (width == 320 && height == 568) {
device = @"iPhone5";
} else if (width == 375 && height == 667) {
device = @"iPhone6";
} else if (width == 414 && height == 736) {
device = @"iPhone6plus";
} else if (width == 768 && height == 1024) {
device = @"iPad";
}
if ([device isEqual: @"iPhone4"]) {
NSLog(@"This is an iPhone 4 or 4s");
} else if ([device isEqual: @"iPhone5"]) {
NSLog(@"This is an iPhone 5, 5c or 5s");
} else if ([device isEqual: @"iPhone6"]) {
NSLog(@"This is an iPhone 6");
} else if ([device isEqual: @"iPhone6plus"]) {
NSLog(@"This is an iPhone 6 Plus");
} else if ([device isEqual: @"iPad"]) {
NSLog(@"This is an iPad, iPad 2 or iPad Air");
}
The log output is:
2014-10-10 13:22:04.558 GE Careers UK[4110:60b] This is an iPhone 4 or 4s
I really don't understand what the issue is, but it's preventing my application from working on iOS 7 iPhone 5 and 5s. It does not affect other iOS devices such as an iPad Air running iOS 7, however when I simulate an iPhone 4s with iOS 7 some of my elements from one particular view controller do not appear.