iphone app only showing in little window on ipad - iphone

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.

Related

View doesn't take up full screen on iPad

Simply that. I'm working on an iPhone (iOS) game that loads without using .xib files. Window and view is created programmatically. It automatically detects resolution and retina display and adjusts accordingly.
However when run on and iPad (only have the simulator for iPad), it shows up in a mini window that same size as the iPhone resolution, with a little 2x button in the bottom-right corner. I want it to load fullscreen with full resolution (larger res than the phone). Everything will scale accordingly so it would look the same as on the phone, and look just as crisp.
Why does this happen? Why doesn't the window automatically take up the fullscreen like it does on iPhone?
After much searching, I've found this template: https://github.com/ryanscott/rcloudlib/blob/master/Samples/clean_universal_app_template.zip
which loads properly for me on both iPhone and iPad.
Looking at the code, however, it does nothing differant than what I am doing. All it does is check which device is being used, and loads the appropriate app delegate, which in this case contain the exact same code, albeit for background color. This is clearly aimed towards those who want to have a different view load on iPhone vs. iPad, while avoiding using nibs. I want the SAME view across all devices, so I have no need to use multiple delegates or the like.
How can I force the app delegate to use the fullscreen regardless of device?
In your Xcode project file, find your target, go to the Summary tab and make sure that Devices is set to Universal under iOS Application Target
Yup! In Xcode 6 the "Devices" option is now called "Deployment Target" and is located here:

convert an ipad app to iphone app with custom views

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).

How to make my iphone app work on an iPad?

It is my understanding (i have seen it) that some apps can be opened and viewed in an iPad. Although, the iPad keeps the screen small, or pixelated if doubled the screen size.
I am attempting to do the same thing with my app, however when I attempt to run it on an iPad it crashes with the error
'Could not find a storyboard named 'MainStoryboard_iPad'
This is obvious, as I do no have a storyboard for the iPad, but currently I don't want one. I just want the iPad to run the app as an iPhone app in a smaller version. So my question is, how do I stop it from looking for the iPad storyboard? Its my understanding I must adjust something in the plist.info but I don't know how to access that in xcode. its my understanding you select the project in the navigator then select 'info' but I don't see any information that people say should be in the plist.info.
Thanks
You seem to have made your application universal. You want to set your "devices" to iPhone. This can be done on the target summary page (No need to interact with your .plist directly).
Only target iPhone platform, and do not call any iPad interface objects in your code. You should look in your Main xib file to make sure there are no references to an iPad interface object.
iPhone only apps should natively run in double-pixel mode. In order to resolve the pixelated / grainy issue you see, use #2x (for iPhone) size images. This will reduce the pixelation you see, but will still contain some.
Ok, I found the final issue. After editing the summary to 'iPhone' I also had to go into the Info tab and change the line that says
'Main storyboard file base name (iPad) to MainStoryboard_iPhone. It was currently set to MainStoryboard_iPad. That second step fixed the issue.
Thanks guys!

Convert simple iPhone app to Universal app

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!

Convert iPhone App to iPad App (Just The Easy Part)

I make a basic View-Based application for iPhone in XCode 3.2, but when I switch the emulator to the iPad, the application gets "framed" (not sure what the right term is):
iPhone App, Framed http://dl.dropbox.com/u/2652228/iphone-app-framed.png
If I adjust the width of the View(s), it has no effect. I cannot adjust the width of the "Window" in Interface Builder (it's greyed out, and adding another Window to replace it gives me another Window instance in which the size is still grayed out). How should I proceed?
In Xcode, choose Project -> Upgrade Current Target for iPad... And read the documentation for details. It's all described in there step by step.
If you are using Xcode 4 then:
Go to your Project Target Summary (Go to Project Navigator, Click on first horizontal project named row tab, then click on Targets and choose 'Summary' tab)
In Devices drop down choose iPad (take a look at other options in settings below if you are interested)
Now you can just run and see how you app will look on iPad.
Steps mentioned above are just a way to just scale your app to iPad resolution. But for a great app you might want to render app differently wrt device. You might want to code different ViewControllers for different devices.
You can read more on this here: iOS Developer Library - Creating a Universal App