views:

270

answers:

1

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?

A: 

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

Art Gillespie
@ Art: Thanks for your input. That definitely allows me to create the binary and install it on an iPad, but the only problem is that there is no 1x/2x circle-button in the lower left hand corner. Instead, it's just sized for iPad use. I want it to appear as a 1x view, and give the user the opportunity to press the 2x button to super-size it to the iPad screen. Any ideas? Thanks again.
DigitalZombieKid
@DZK - My mistake, I should've read that more carefully.I just created a new from-scratch iPhone project with the Base SDK set to 4.0 and deployment target set to 3.2 and it installed onto my iPad fine—with the 2x button and everything.Grab the Info.plist from your app's bundle. What's the generated value for MinimumOSVersion? This should correspond to your deployment target setting.
Art Gillespie
Ok, I've been working on this for days now. I definitely do not want Deployment>Targeted Device Family>iPhone/iPad as it supersizes a brand new app to iPad (I want the 1x/2x button to appear). When I set Deployment>Targeted Device Family>iPhone on a new app, I get the 1x/2x button just fine on the iPad.However, my current app -- even when I reproduce all the settings (including UIDeviceFamily set to 1 in the info.plist) only displays for iPad (no 1x/2x button). Consequently, 320x480 backgrounds only cover part of the background, etc. Not sure what to do next. Any ideas?
DigitalZombieKid
Got it. Let me figure out what I did and I'll post an update soon.
DigitalZombieKid
Here's the answer. You don't need UIDeviceFamily, nor the info.plis entry of "Application requires iPhone environment". I was editing "Project Settings in Xcode" instead of "Edit Active Target" settings. Ugh. This SO answer explains it: http://stackoverflow.com/questions/1240104/xcode-edit-project-settings-vs-edit-active-target
DigitalZombieKid