10

I have developed an iOS app which now I'm trying to update giving it iPad and iPhone support. I want to make the difference Launch File(made in xib file)for iPad and iPhone.

I know there are lots of posts talking about how to handle initial view of different device,but the Launch xib can't initial programmatically. So how can I set up project setting for difference device choosing difference Launch file(not image)

XCode setting place

thanks a lot

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Gary nil
  • 181
  • 1
  • 5
  • I think what you may need to do, is go to the plist file of your project, also accessible from the Info section of the project settings. There, you will be able to add new properties to the file as "Main nib file base name (iPad)" or "Main nib file base name (iPhone)" where you can define the name of the different initial xib files (without extension if I remember correctly) depending on the device. Is that right? – dadederk Sep 14 '14 at 11:00
  • I think it may be this way, but i don't know how to do it actually. In the info.plist I only find UILaunchStoryboardName and it only can assign to one xib , so how to different it? thanks~ – Gary nil Sep 14 '14 at 16:18
  • 1
    Are you opening the plist as source code? Then you could any or open it as property list or use the keys NSMainNibFile~iphone and NSMainNibFile~ipad. – dadederk Sep 14 '14 at 22:46
  • Yes!!! is the way UILaunchStoryboardName UILaunchStoryboardName~ipad and add in info.plist Thank you so much! – Gary nil Sep 15 '14 at 04:59

1 Answers1

8

Yes!!! is the way dadederk said:

add in info.plist

UILaunchStoryboardName UILaunchStoryboardName~ipad

Community
  • 1
  • 1
Gary nil
  • 181
  • 1
  • 5