0

So I'm having this app on the app store since 2010, and my initalization code since that time looks like this:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

   self.window.rootViewController = someViewController;
   [self.window makeKeyAndVisible];
}

Now this worked until yesterday, but since I today updated to XCode 7 and iOS9, I'm having some issues. My app still launches in the simulator, but no matter what iPhone device I pick, I will get a window size of {320, 480}.

What is the proper way to do it?

[edit] More details:

  • everything was fine with XCode 6 / iOS 8
  • see screenshot of how it looks now in iPhone 5S simulator. I get the same black back on the bottom of the view (my macbook screen wont fit the whole simulator window for a screenshot)
  • as I see it, I dont have any launch image assigned at the moment. will this be the solution? if so, what size should I provide? do I need launch images for all iPhones? (4S, 5, 6, 6+)

enter image description here

user826955
  • 3,137
  • 2
  • 30
  • 71
  • You need to add support for larger devices: http://stackoverflow.com/questions/25754942/how-to-enable-native-resolution-for-apps-on-iphone-6-and-6-plus – Zev Eisenberg Oct 02 '15 at 20:50
  • It used to work fine with XCode 6 and iOS 8, the linked thread is about Xcode6? – user826955 Oct 02 '15 at 20:55
  • Do you mean that the app used to get a larger window size on larger devices? If so, it’s weird that it would revert. – Zev Eisenberg Oct 02 '15 at 20:59
  • Correct, everything was fine in the simulators. I still have the compiled version on my iPhone 6 and its full screen. – user826955 Oct 02 '15 at 21:00
  • Is the status bar larger than normal when you run it on your iPhone 6? – Zev Eisenberg Oct 02 '15 at 21:06
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/91220/discussion-between-zev-eisenberg-and-user826955). – Zev Eisenberg Oct 03 '15 at 01:10
  • I was able to resolve the issue when rmaddy linked the other thread. I never used launch images, nor a launch storyboard, so this might be the reason why with iOS9 / XCode 7 it stopped working. I still assemble the viewcontrollers programmatically, so it was sufficient to add blank launch images for all sizes. this site helped much to get the sizes right: http://stackoverflow.com/questions/16832459/ios-launch-image-sizes thanks everyone. – user826955 Oct 03 '15 at 10:54

0 Answers0