I have just finished developing an iPhone app and now I wish to make it a Universal App. I'm having issues incorporating a UISplitView into my current code to accommodate multiple detail views. I have looked at Apple's MultipleDetailViews sample code and have tried to insert into my project but it's becoming more of a headache than it should.
I'll copy all the project files from Apple's MultipleDetailViews sample code into my project, adjust my app delegate to check to see if an iPad's running, set the window to add a subView of splitViewController.view, but all I get is blank white screen when I build and run.
So my question is, do I develop the iPad version from a new project and then add my iPhone project files when I'm done?
OR
Do I make a separate iPad app and forget the whole Universal App?
Thoughts and suggestions would be much appreciated.
I would start with a Universal Project and generate content for the iPad, I've found downsampling easier than upscaling :). Try and make everything generic (based off the view height and width). This will make conversion to the iPhone/iPod easier.
I think there is more to creating a Universal build from the outset than just checking for iPad view.
You need to set the project up as a universal build in the build settings. I know default projects that are universal create a group of folders with a main view for iPhone and iPad. You will need to create separate views for iPhone and iPad.
I would create a dummy project that is universal and compare settings and default values. Try adding these to your project and see if you have better results.
But I wouldn't think you should put one before the other. Build the one you think you will have the most success with first, then if you still need it, build out for the other. Good luck.
Related
This might be a repeat question.But i have a problem. I have an iPad app functional. The app is built in iOS 6. When i started building it i chose iPad as targeted device NOT universal. Now my client has asked for an iPhone version of it.In my iPad app i keep adding custom views as the client clicks "Add More".I add a custom view which is bunch of textfields, buttons etc.So i copied my iPad app and changed the Targeted device family to iPhone once and also Universal next time and tested it. So when i launch the app in iPhone configuration (keeping the targeted device family as Universal) my view controller stays like that on iPad. I cannot scroll the app also(not up/down..nor sideways). Is this the correct way to convert iPad app to iPhone app . Also everything is still with scale to iPad. Should i start a new project and start everything from scratch.Set the storyboard to fit according to iPhone configuration? In my research people said just change the targeted device family to Universal. But it doesn't work. Please let me know if you need more information. Thanks.
It is possible to convert the current project you have to an app that can be used universally, but it would take more time than simply just creating a new project that allows universal usage, and adding in the files of which you used for your iPad project.
Hint: You can use more than one storyboard when the project was created universally. It will automatically set this up for you.
I would also advise that you separate your files into what works universally, and what is specific for the iPhone or the iPad.
Happy Coding!
After many search i found that it possible to have an application for both Iphone and ipad devices.but in your code you should define unique ui for each device(two xib file).
I was recently developed a big project on iPhone in Xcode version 4.1.
Now i need to convert this app for iPad.
I have verified so many links but all are regardig Xcode 3 ond it's extensions.
How to upgrade, how to resize the view etc etc
Please help me. Thanks in advance
Your best bet would be to create two new projects, one for iPhone, and the other universal and see what differences are in place there, especially the app delegates.
Quite a lot of the things won't be needed, however the app initialisation need some consideration, and most views tend to happily scale up to ipad resolutions without much or any additional work.
That was how I added iPad support into one of my apps I was writing anyway.
Depends how your app is build. If you are using Builder in XCode you can simply create new xib for each controller/view you have in app and name it with suffix ~ipad.
So if you for example have MyController.xib you will create MyController~ipad.xib and your controller will be loaded from this file automatically when run on iPad.
Changing the project preferences to universal gives you the possibility to specify a second MainWindow.xib in the info.plist file (Main Nib file base name (iPad)) which is the starting point for your iPad Interface. At this point running the app on an iphone would load your original interface and running on an iPad gives you the blank window once you created the corresponding blank MainWindow file.
Edit: You need also a second AppDelegate that holds the reference to your new window.
I have very simple iPhone app, which uses just UIButtons, UIlabels, UITableView. without any custom controllers and graphics. How can I convert app to universal with that UI?
First update the application target device to Universal.
Update the application target device to Universal.
Check the Info.plist for NSMainNibFile & NSMainNibFile~ipad keys.
For all other views, have two different NIB. For example FirstView.xib & FirstView~ipad.xib. iOS runtime will load the proper view based on the device.
Here is a screenshot of a sample project:
I needed to convert my iPhone App to iPad yesterday and found the easiest way to do it as long as your app is pretty simple. Mine was literally just some tableViews that were set to auto-size. In Targets / Devices just change it from 'iPhone' to 'Universal' and then build your application. This worked very nicely for me. All tableViews were perfectly formatted for the iPad and that is really all I needed.
Note that if you had any other XIB files that were not just tableViews, such as a window with text fields, all you have to do is set them each to resize properly so they stretch and stay at the top and your simple app should be pretty much all set for the iPad.
Obviously you'll need to test it and tweak anything needed but for the most part the above worked magically for me and took literally one second to convert my iPhone app to an iPad app!
I have an iPhone app that I want to change into an iPad app. I do not want to make it universal. The result should be an iPad only app. The main problem I see is converting all of my .xib files. I realize that I will have to change some things around manually, but I would like as much as possible (including all of the painstakingly made connections in IB) to carry over. Also, if there are unlikely places where I need to change settings, please give me a hint to that as well. Thanks!
Xcode has a convert option. It gives you the choice between a new app or a universal one.
This will convert all your NIBs, but quite how useful that is will depend on how thorough you've been with the sizing options in Interface Builder. For me is mostly worked. A couple of minor tweaks for a couple of views and a complete rewrite for some others.
Of course you'll also have to work with view controllers that "manually" build the view.
The gotchas I found were around orientations (iPad apps should work in all four orientations) and with the screen size. There are also some oddities with the keyboard and modal views if you have any of those (there are a few kinds of modal view, and the keyboard does not always dismiss). As ever when you're making automated changes, testing is key.
The full process took me a lot longer than I was expecting.
Few thoughts for changing iPhone app to iPad app.
Xcode has the provision to change the current iPhone app to iPad app by using "Upgrade current target for iPad" menu command.
http://www.enscand.com/roller/enscand/entry/ready_for_ipad
resize all current view to the ipad size 768*1024(portrait) and then resize all the subviews respectively. the connections doesn't get lost by doing this.
I have developped an iPhone app and I now need it to work on iPad. On the simulator the app only show in a little window (the x2 zoom enable the app to work in full screen) but is there a way to have the app directly showing in full screen ?
Thanks a lot,
Luc
go to project settings and set Targeted Device Family to iPhone/iPad
As Max said, go to project setting and set Target Device Family to iPhone/iPad. But this is not enough. With this change the application type will be universal application. This is good, because the app will start in full screen, but if you hard coded the dimensions of the views in the application then the look and feel on the iPad will be bad. So do the first step what Max suggested for you and then check if the app looks like you want, because it will not arrange the views automatically. You should do the changes from code or from nibs.
There is a little help if you set properly the autoresizing masks.
Edit:
Project menu -> Edit Project settings -> Targeted device family
You will need to do at least the following:
Change the Targeted Device Family to include the iPad.
Create or convert all needed .xibs for the iPad (using the Interface Builder Menu).
Reference the top level iPad .xib from your app's info.plist (using the NSMainNibFile~ipad key).
Handle the iPad paradigm wherever the controller or view source code needs to differ.