How to refactor an iPhone App to run natively on the iPad - iphone

I have an iPhone application and I want to run it on the iPad in normal mode (not in the mini small emulation mode)
How do I compile my program to show up in full screen mode?
Any easy tutorial?

You want to refactor you current iPhone only app in to a Universal app.
iPhone SDK 3.2 [and later] supports the
development of Universal applications.
A Universal app is optimized to run on
all iPhone OS devices—itʼs essentially
an iPhone app and an iPad app built as
a single binary.
More details can be found in the Introducing Universal Applications for iPhone OS documentation.
In order to achieve your design goals
for a Universal application, you will
need to use conditional coding to
determine the availability of features
when your app is running. Conditional
coding allows you to make sure youʼre
loading the right resources, using
functionality thatʼs supported by the
device and properly leveraging
hardware thatʼs available.
In Xcode 4 you can set the device type, be sure to create iPad specific UI for you app.
Once you select Universal xcode will try and help you out by creating some interface-bilder files.

The iPhone views are created with the size 480×320px in case of pre-iphone 4, and the iphone 4 has 960x480px. The iPad has 1024x768, so you need to change the views for that size. There's no automatic way of doing it. In Xcode 4 you have some sort of "change this view to ipad", but the position of the elements in the view, but you will have to do some tunning on the final views, because the ipad UI of an App should give a different UX than the iPhone.

Related

Developing iPad / iPhone application in same project or in 2 separate (Monotouch)?

We know that in monotouch we have 2 solution for developing a project for both iPhone and iPads.
First is using Montouch iPad Application projects for iPad, and Monotouch iPhone Application projects for iPhone and create two separate project for each of them.
Another solution is using one Universal Projects for both o them.
The question is: what solution is better and with witch one the result has more quality?
Pros and cons of Universal app.
Pros:
One place to fix bugs in app's business logic;
Convenient to users (after install on one device it could be automatically installed on other device);
Marketing costs could be half as much;
Cons:
It could be too many if -blocks, which are checks for UIDevice.CurrentDevice.UserInterfaceIdiom;
Bigger app size;
Some of the features (mostly in games) do not fit well on iPhone's display.
If you used XIB-based interfaces, you must make separated XIB for iPad OR update XIB content layout in UIViewController's ViewWillAppear event (in which iOS updates View frame according to display size);
If your app is not free, you couldn't release "HD version" with bigger price.
Basically, universal app is better for users, but harder for developers and designers.
I think, you are asking about iPhone and iPad. Because, universal app includes iPhone and iPad (not iPhone and iPod).
So considering this:
You should go with Universal app because of below reason:
1) There will be one source file of the app which will work in both iPhone and iPad.
2) If user has both devices (iPhone and iPad), then they get a single copy of the app and can install in both devices.
3) Your app supports both devices, so users will be highly attract and download your app quickly.
4) If your app will more downloaded (because of Universal app) then there are chances that, your app comes into "New and WhatWorthy" section and even "Feature" section of the apple.
There can be main reason why we should go for Universal app instead of separate app for iPhone and iPad.
Hope, you got an idea.
Cheers!

Force universal app to run iPhone version on iPad

I've had an iPhone product on iTunes for a while and have superseded it with a universal app which has been met with approval except from one customer who wants to run the iPhone version on his iPad as he preferred the larger inputs and working of the iPhone.
Is there any way to configure the app to run either as native iPad app or iPhone app on iPad at runtime? Seems an odd request but customer is quite insistant.
Thanks
/Fitto.
No way to do that, except making separates versions for iPhone and iPad.
Theoretically, you could have some setting that would load the iPhone storyboard on the iPad, but it would still display full screen, and not in compatibility mode, which is probably the way this particular user wants it
Assuming you are running some sort of source control, you could change the project to be "iPhone Only" and then test on the iPad, then later revert the changes made to make it a Universal app again

Confusing about create an app which has version for both iphone and iPad

I am creating an app which has version for both iPhone and iPad, iPad version has different GUI and some more functionality. Currently, I separate them in 2 projects.
After reading this article: Jump from iphone to ipad development...
And see:
"All iPad users who have already downloaded your free or paid App to their iPhone or iPod Touch will be able to download your iPhone App – only if you have updated your binary submission to the App store to make your iPhone App compatible with iPad. If you do not update and create the separate binaries, then you are potentially losing out. Using the new SDK you will be able to create a single binary which will install one version of your app when used on the iPhone or iPod Touch and a different binary when installed on an iPad"
I don't know if my current way is correct when separate them in 2 different apps! and how to create single binary which will install one version of your app when used on the iPhone or iPod Touch and a different binary when installed on an iPad?
Does anyone know about this please help me!
There are two ways to have an app on both iPhone and iPad. One is to build two separate apps that do the same thing. This is what you are doing, but not what you described. It creates two applications, one for iPhone and one for iPad, that do the same thing. As such, purchasing one will not give the user access to the other.
If you want the user to be able to use a single app on both the iPhone and iPad with different interfaces, you need to build a universal app. It will contain code and resources for both the iPhone and iPad. See iOS Application Programming Guide: Build-Time Configuration Details. About two thirds of the way down is a section on universal applications.
Edit: I found another document specifically about universal applications: http://devimages.apple.com/iphone/resources/introductiontouniversalapps.pdf
Whether to have two separate SKUs on the App Store or not is usually more of a business question than a technical one. Separate apps lets you segment your users and charge more for the iPad version. On the other hand a universal app is usually better received by users and can make the most sense if what you have is a premium, 'expensive' niche app.
If you want to go the universal route:
If you have an iPhone application that
you want to upgrade to run on iPad
devices you need to upgrade the target
that builds your iPhone application
into a target that can build both an
iPhone and an iPad application, or add
a target to your project for building
the iPad application.
To upgrade an iPhone target for iPad
development, select the target in the
Groups & Files list and choose Project / Upgrade Current Target for iPad.

Binary of IPhone in iPad?

I am new to iPad,I am having iPhone distribution build, can i upload to apple for iPad Device?Will it run? will it be accepted by Apple?otherwise i have to create new Ipad application for existing iphone application?
Practically all iPhone apps will run unmodified on the iPad. They will simply be scaled up pixel-by-pixel (with a little "2x" button so the user can choose scaled/unscaled mode).
For the best user experience, you should create a universal binary that provides customised behaviour for each platform, but this isn't required.
Any iPhone application, an application that has not been optimized for the iPad, will run on the iPad in 'compatibility mode', which means it will get its own iPhone-sized frame in the center of the iPad screen. The user also has the option to zoom in the application 2 times, so it takes up almost the entire iPad screen.
So if you want your app to run at all on the iPad, you don't have to do anything exciting, just submit it to Apple as usual, and iPad users will be able to download and use it.
If you want to optimize your application for the iPad, which is almost always preferred over 'compatibility mode', you can either make your current application into a Universal one, which is an app which contains both iPhone and iPad versions, in one binary, or you can create two different applications, one for the iPhone and one for the iPad. You can find more information on this on the Apple Developer website.

iTunes Connect: Excluding iPad From Supported Devices

I have just uploaded my first app to iTunes Connect and noticed that my list of supported devices is appearing as follows...
Device Requirements: Compatible with iPhone, iPod touch, and iPad.
I've developed specifically for the iPhone and iPod Touch and have not yet done any testing on the iPad simulator. I therefore don't want the app submission testers to try running my app on an iPad and rejecting it because of some minor issue.
I've looked at setting the required device capabilities in my info.plist, but that doesn't appear to allow me to restrict at a device level.
Is this a by-product of building using the 3.1.3 SDK? Are apps built using this SDK automatically upscaled to work on the iPad?
You can't restrict the app to not work on the iPad. Backwards compatibility with all iPhone apps is a feature of the iPad. Your app will run in a 100% frame or in an optional 2x mode depending on user preference.
iPhone OS apps that link against the 2.x or 3.x framework and test clean on the iPhone and iPod touch should work w/o any trouble on the iPad.
If you tested on the iPod, taking into account the lack of cell radio, camera, etc., you should be totally fine.
I don't see a good reason to exclude iPad since iPhone apps will run in emulated mode in iPad after all. It's the same situation as a 3.x firmware running apps compiled from 2.x SDK.
To restrict at device level, you add the UIDeviceFamily key, but this doesn't support excluding iPad (just excluding iPhone).
The way to indicate that an application should only run on iPhone is to specify your application as an iPhone type application, rather than universal. Open your project (in XCode), click on the project name at the top of the Project Navigator sidebar, select the target, go to the summary tab, and change "Devices" to iPhone.
When you submit it, it will only be run in emulator mode on iPads, thus getting around any issues.