Run a universal app as a 'legacy' iPhone app on an iPad - iphone

I do most development testing on my iPad. When I test an iPhone app, it runs in 'compatibility' mode where the little iPhone app runs in a small window or x2 magnification. Now that I've created a universal app it runs as a native iPad app. For testing I'd like to use the simulated iPhone when I don't have an iPhone handy for testing.
How can I build the project so that the iPad will run the app in compatibility mode?

Turns out it was really simple
Get Info for the project target
Change Targeted Device Family to iPhone

You can't. If the target is 3.2 SDK, then it will always run the simulator as an iPad. So your options are to debug on a device, or configure your app to be build under 3.1.3 so that the simulator will be an iPhone (too much trouble and unreliable).
Or hope for a later release with the option.

Related

XCode 4.5.2 why can I run apps built for iPhone on an iPad?

I've recently upgraded to xCode 4.5.2 and attempted to resubmit an app to the app store. The apple minion has run my app on an iPad and it does not work. So the app got rejected.
I tried it again and again, and the only way I can make it fail is if I run it on an iPad. My question is: Why can I run the app that is intended for an iPhone on an iPad if I use xCode?
There's not storyboard file for iPad
The targetted device family is iPhone
There isn't even an icon file for iPad, so it just shows trimmed
launch image on the iPad's home screen
I cannot see the app that I published if I search for it on the app
store if I use iPad
The bug that I'm running into involves treading and core data. Is my data model compiled for iPhone only, and not for iPad?

Deploy in an iPad as iPhone

I am developing one application for iPad and iPhone. The problem is that I only have one iPad. I need to develop in a physical device cause I have some libraries inside the project that only works in device.
Are there any way to deploy in my iPad as an iPhone to check if the application code is working fine?
I have a jailbroken device.
Thanks!!
In Xcode select your target and then the Summary tab. Change the Devices value from Universal to iPhone. Now build and run your app on your iPad. It will run in iPhone compatibility mode on the iPad.
Don't forget to put that option back to Universal before shipping the app to Apple.
One limitation is you can't test to see if your app works on the 4" devices. The iPhone compatibility mode only works in 3.5" mode.

Xcode 4.2.1: universal app runs on iPad but not on iPhone

I am working on a universal application where I am stuck at one point. I was able to successfully launch my application both on iPhone and iPad but since 2-3 days, I am not able to launch my application on neither iPhone nor iPhone simulator but it runs smoothly on iPad/iPad simulator.
Also when I run my app choosing iPhone device it shows message like Running the App on iPhone simulator but I am not able to see any effect on my simulator. I am using Xcode 4.2.1 and I guess the issue is pertains to the same.
I don't know whether it is a solution or not but got a way out by reinstalling the iOS Simulator.
I have faced same problem. This probably happens when you replace the application with the newScheme/EditScheme by mistake.
Just carefully check when you run your application is there your application name appear. This will be immediate left at where you choose iPhone simulator or iPad simulator version.

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.

How do I use the iPhone Simulator in 3.2 (not iPad Simulator)

I'm fixing my app to be a universal binary. Testing on the simulator seems to default to the iPad. For small corrections like checking orientations and small UI updates, the only way I can find to get the iPhone version is to plug in my iPhone and build and run on device.
Loading the debugger takes valuable time, when running on simulator is so much faster for this kind of work. Can I set the simulator to default to iPhone for this? Setting it to 3.1.3 doesn't work because of the 3.2 code I have in the binary for the iPad.
EDIT:
The Hardware -> Device, and ->Version menu choices in the simulator quits my app. When I relaunch, it goes back to the iPad. The app is not installed in the simulator
If you don't have the latest xcode, get it.
Set the project info to build for 3.2, but in the build drop down pick iPhone Simulator 4.0 and it will open in the iPhone simulator instead of the iPad simulator.
That is the dilemma: if you want to use OS 4 on the iPhone, you have to use iPhone SDK 4, which comes with XCode 3.2.3.
Previously I used iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a, where the simulator was fine, but now after I update the iPhone to OS 4 (which is by iTunes), I cannot use the SDK 3.1.3 any more, and the simulator 3.2 which comes with SDK 4 actually does not work for iPhone at all!
Even when you specify the "iPhone OS Deployment Target" to "OS 3.1.3", and an iPhone-frame shows up in the iPad simulator, many functions are not responding at all.
Does Apple have an official answer to this dilemma?
I finally solved this problem myself.
First, install new version of xCode, which is xCode 4.
Then set project scheme to iphone simulator and run app in xCode several times.
And re-install xCode 3 and the problem will be gone away!