iPhone Build SDK 4.0 With 3.2 Target Won't Install on iPad OS 3.2 - iphone

I'm building an app for iPhone/iTouch that I also want to run on iPads (not a universal app, but one that just runs on on iPad with the 1x/2x button in the lower right hand corner).
I'm using iPhone SDK 4.0 and setting the following:
Base SDK: 4.0
iPhone OS Deployment Target: 3.2
When I do this, I can build an app just fine and run it on an iPhone/iTouch, but when I try to install it on my iPad I get the following error: The Info.plist for application specifies a minimum OS version of 4.0
In addition, if I package up the binary and submit it to Apple and it becomes available on the iTunes store, it shows that it's only available for iPhone (not the iPad). When I go to the App Store icon on my iPad, it doesn't even list the app as available (because Apple thinks it won't run on iPad, I assume).
Now I'm really confused, because I thought I understood the difference between the Base SDK and the Deployment Target, but Xcode is telling me I don't.
Can anyone help explain this to me?
As an aside but related question, if I build with Base SDK = "iPhone Device 3.2" it works fine on my iPad, but by doing so would I lose the Base SDK 4.0 built-in multi-tasking feature?

Check the 'Targeted Device Family' setting in your target's build settings. It needs to be set to iPhone/iPad if you want to be able to deploy to both devices.
This build setting automatically sets the UIDeviceFamily entry in the app's Info.plist (You shouldn't update this yourself, though—use the build setting instead.)
UIDeviceFamily

Related

Why does XCode say that my iPhone app is only able to run on iPad?

I have a project in XCode with two targets. One target is for the iPhone only and the other is for iPad only.
The iPad target works as expected, but the iPhone target does not.
If I try to run it in the simulator, it starts the iPad simulator every time, but in iPhone compatibility mode with the 2x button.
If I try to run in on my iPhone 4 device, I get this message:
Can’t install application. The application at /Users/jacob/Documents/code/Projects/TVGuide/build/Debug-iphoneos/TVGuidePlus.app can only be installed on iPads.
This is XCode 3.2.6 and the iOS 4.3 SDK.
I have TARGETED_DEVICE_FAMILY defined at the target level and it looks like it is set correctly. The problem is the same for debug/release/...
have you selected the simulator as iphone?
most iphone apps are supposed to work on ipad too.
otherwise you may need to go to the project tab and go to project settings. there are some setting involving the choice of ios. i have not tried this since i havent recieved the error but i hope that it works.
Actually it turned out that I had Armv7 selected as architecture for my iPhone build. After changing that to armv6, I can now install and run the build on my device.

Submitting iPhone app with 2x on Ipad

How should i submit my iPhone app so that it is also available for downloads on iPad but with 2x thing on it.
I need some configuration settings...
Architectures: Standard/Optimized?
Valid Architectures: armv6 armv7....?
Targeted Device Family: ?
iOS Deployment Target: ?
Please also mention any other settings i've missed here.
Thanks a Lot
Use iPhone/iPad for targeted device family, Standard (armv6/armv7) as architectures. Deployment target depends on the oldest iOS version you intend to support. I'd set it to 4.0 or 4.2 for new projects, but you could also use 3.2 (or even 3.0) if you're careful to use newer APIs only when they're available.
You don't need to do anything to do this, just submit the App as iPhone App and Apple will do the rest. Make you sure that in your build settings you have selected "iPhone" for "Target Device family".
If you have an iPhone app and you want it to be presented in the iPhone size when run on the iPad where the iPad presents the user with a 2x option to make the iPhone app take up the full size of the iPad screen then you need to set your "Targeted Device Family" to iPhone in Xcode 4.2 under your project - build settings screen. -rrh

Can I install an ad hoc build on iPad for an iPhone targeted app?

I'm creating an app targeted at iPhone/iTouch devices. They build on that just fine. Can I install an ad hoc build onto an iPad while having the 'Targeted Device Family' set to iPhone and not iPhone/iPad? I'm expecting of course because it isn't a universal app that it will run in the small window on the iPad. I don't have an iPad, client does and would just like to test on it.
Yes, as long as the target OS matches the version of the iPad it should work.
Sure; you just need to set "iOS Deployment Target" (IPHONEOS_DEPLOYMENT_TARGET) correctly (i.e. 3.2 if your client has not updated to 4.2 yet).
Note that Apple has rejected iPhone-only apps with IPHONEOS_DEPLOYMENT_TARGET=3.2 (and SDKROOT=iphoneos4.0). The only thing you could do was set iOS Deployment Target to 3.1.3 and below (and be forced to support iPhone/3.1.3), which was a bit of a pain since 3.2 has a lot of improvements on 3.1.
I'm not sure if they've fixed it. You have three options:
IPHONEOS_DEPLOYMENT_TARGET=3.1.3 (or below) and support old phones as well. (Don't support OS versions you can't test on!)
IPHONEOS_DEPLOYMENT_TARGET=3.2 and face possible rejection.
IPHONEOS_DEPLOYMENT_TARGET=4.0 (or above) and force users to upgrade.

How to build an iOS4 app that will also run on the iPad?

I'm trying to build an iOS4 app (not universal) that will also run in compatibility mode on the iPad. So I set the Deployment Target to 3.2 and the Device Family to iPhone.
This works fine in adhoc builds, but when I try to upload it the the store, Application Loader complains: “This bundle is invalid. An application targeting the iPhone device family may not require a iOS Deployment Target 3.2, which is an iPad-only OS”.
What? Are my only choices to set the Deployment Target to 4.0 and not run at all on the iPad, or set it to 3.1.x and build/test the app for a platform I don't want to support, that Apple doesn't even ship an SDK for any more? Am I missing something?
Set the "Targeted Device Family" to iPhone/iPad
New firmwares support compatibility on older ones. For example: 3.1.x apps are compatible with 3.1, 3.0, 2.2, etc.
My guess is set it up as an iOS4 app. Also remember there are some functions on iPad that do not work on iPhone and viceversa. So your app could still crash.

iPhone/iPad universal build problem with firmware version

I was doing a project as Universal binary for iPhone/iPad. I created the iPhone app side
and I was doing to complete the iPad too. I noticed one thing, on iPad classes I use the UIPopoverController class, means that when I build now for 3.2 in the Simulator, it runs te iPad one and it works fine, BUT if I want to see the iPhone version app, means 3.1.3, It give me an error of framework missing in the iPad classes.
I have no idea how to solve this problem because I cannot anymore see the iPhone version of the app and make changes. I can only remove all the iPad classes and after reimport again.
thanks guys!
With the 3.2 SDK the Simulator will only run as an iPad.
If you want to test your iPhone side, you will have to wrap the 3.2 specific code in preprocessor conditions to make it compile with 3.1.3.
If you have a device, you should be able to compile both the iPad and the iPhone version using the 3.2 SDK by setting the "Deployment Target" setting in your target's build settings.
Set it to the lowest version of iPhone OS you're willing to support, for example, 3.1.3 and compile using 3.2. You will also need to "weak link" against any new 3.2 frameworks, such as Core Text.
Finally, if you're not already, you should be using runtime checks to make sure your iPhone version doesn't try to make use of any 3.2 features, such as popovers.
This way, you won't have to remove your popover references and you should be able to compile. However, as I said, this will only be useful if you have a physical device to test with.
If you want to use the simulator, you'll have to follow the preprocessor conditions method.
You can only build with 3.2 Base SDK and iPhone OS Deployment Target 3.1.3 (or earlier). When you do this, the simulator will only run as 3.2/iPad. That's just how it is.
You will therefore need to debug on an actual device for iPhone testing.