0

I have created a universal application using xcode 4.2 and iOS 5 SDK. Application runs fine when i run it for iPad but i am facing issue while running it for iPhone . Code is in place to detect device idiom but still when i run application for iphone it loads up xib for iPad and iarge screen appears on iphone . Is this a bug for xcode 4.2 or am i missing some setting .Have tried setting all configuration from my side but to no help . This is the code i have in my app delegate

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {

        LoginViewController *masterViewController = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPhone" bundle:nil] autorelease];
        self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];



    } 
    else {

        LoginViewController *masterViewController = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPad" bundle:nil] autorelease];

       self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];

    }

I asked if this is a bug because it works perfectly fine on xcode 4.3 .

  • definitely, you did something wrong. – holex Sep 04 '12 at 17:34
  • @holex wrong..what could be the possbile options so that i can debug and check . – Amit Nalawade Sep 05 '12 at 05:12
  • @Pheel Yes since it is a universal app i have iphone and ipad xib's created for a view . – Amit Nalawade Sep 05 '12 at 05:13
  • @AmitNalawade, I've said it because we've have been developing many universal application for years and there was no problem when we did everything as the documentation says. if you problem is a common bug, many programmers would complain, your case seems an isolated issue, therefore you did something wrong, and it is independent of the Xcode. can you share your code to review it? – holex Sep 05 '12 at 07:11
  • i have edited question with code..does this help ? – Amit Nalawade Sep 06 '12 at 04:09
  • are there any settings one has do in plist file specific for an universal application ? – Amit Nalawade Sep 06 '12 at 05:08

0 Answers0