iPhone Target Certain Devices - iphone

I'm want to target the iPhone 4, iPhone 4S, iPod Touch (4th generation). I do not want to target the iPhone 3G and iPhone 3GS. I've seen some post that said this is not possible. However, I notice in the App Store that some apps do this such as the picture below.
How would I accomplish this?

Those requirements show up because the developers have put armv7 as an entry in the UIRequiredDeviceCapabilities Info.plist key. There's no key specifically to target the iPhone 4 and up, although you can probably eliminate the 3GS using one of the other keys.
Why are you trying to stop people from installing your app on older devices?

I believe you want to set UIRequiredDeviceCapabilities to specify exactly which features your app needs. For example, the camera-flash key is only going to be true for iPhone4 and later, if that's what you need.
There's also a Q&A article on it.

In addition to setting the features the device needs with UIRequiredDeviceCapabilities, you can also specify the minimum iOS version that needs to be installed.
See this Apple Technical Note, TN2250.

Related

Allowing univeral iOS build to run on iPad1 but not iPod touch 3G

As far as I can tell, there aren't any "performance" criteria that you can specify to exclude specific iOS devices via info.plist.
Is it possible, via info.plist, to allow a universal app to run on iPad1, but not on iPhone 3GS/3G? Right now I use the gyroscope requirement (which my app does make use of), as a crutch to support only iPhone 4+ and iPad 2+.
To be absolutely clear, I want to make the app AVAILABLE FOR DOWNLOAD in the App Store on iPad1, but not on iPhone 3GS. This question is not about runtime query of the device from code.
Is my best/only option to create multiple binaries, and remove the gyroscope build from the iPad build (typically called the "HD" build) but leave it there for iPhone/iPod touch?
Look at this question:
Determine device (iPhone, iPod Touch) with iPhone SDK
It goes over determination of different iOS devices. So, you can explicitly support (or not support) some specific model.
Requiring armv7 will drop out everything <3gs, but still includes ipad1. That's the closest I see.
The short answer seems to be "no".
On the up-side, iPad1 only has 256Mb memory, so you need to make your app fit in 256Mb anyway, so it should work on the 3GS. The difference in CPU speed is significant though.

Remove iphone 3G and ipod touch 3 from the target

How does one remove the iphone 3G and the ipod touch 3 from the target?
I have an app that uses libraries that need armv6, so cannot remove that from the architectures. Is it possible to still exclude the iphone 3G and the ipod touch 3?
Thanks
NB: I've assumed you also don't wish to include devices lower than those that you've specified, i.e. ipod2.
It's not possible to remove devices individually from your application, but it is possible to restrict what your application requires in an attempt to restrict devices.
I can't think of anything that works exactly if you need to maintain armv6, but if you can think of something that the devices you want to include have that the devices you want to exclude haven't, you can add those items to the Required Device Capabilities in your Info.plist.
Open-GLES 2.0 might be a good starter think to require as the iPhone 3G has Open-GLES 1.1.
If you tell us a little more about why you want to exclude these devices, I might be able to provide a more elaborate answer.

Can you require the iPhone 3Gs (or newer) with build settings?

My app doesn't run on the slower hardware, but I want to support iOS 4.0, which iPhone 3G (and equivalent 2nd gen iPod touch) can run. Is there a way to prevent it from being installed via the build settings? (I'd prefer not to have to enforce it in code when the app launches.)
I thought that the VALID_ARCHS build setting might do it by removing arm6 (leaving only arm7), but I was able to install directly to a 2nd gen. iPod touch.
(I found the answer as I was posting this question, but the question "Iphone 3Gs And Iphone 3" isn't very searchable, so I posted this and answered it to help others in the future.)
iPhone 1, iPhone 3G are armv6. iPhone 3Gs, iPhone 4 are armv7. (iPad is armv7.)
You should set the UIRequiredDeviceCapabilities setting in the Info.plist to the desired architecture (in this case armv7). You should also remove armv6 from the target build settings to reduce your compile time.)
Original answer found here.
edit: Apple wouldn't accept a submission with this key there. I will try this possible duplicate and then update my answer here.
edit 2: Looks like that answer worked.
FYI: I ultimately had to support the older models because my app had once been (erroneously) released. Apple's system makes you support all hardware models you have ever supported. (Which makes sense from the consumer side, which is that apps you download or buy shouldn't stop working, but stinks for me.)

How to declare an iPhone app which has to run in the background?

Hey,
I wrote an iPhone app which needs to run in the background. I did set up the properties in my info plist according to running in the background. The problem is that the app store lists iPhone 3G as well as "compatible device".
Is it possible to set up my info plist to get rid of the iPhone 3G in the app store?
I found one solution by adding 'opengles-2' to UIRequiredDeviceCapabilities - but it doesnt seem like the best way to do it?!
Thanks!
You can't discriminate directly on actual device types (3G versus iPhone 4 etc.), but as you note things in UIRequiredDeviceCapabilities may imply certain devices. However, there's a more direct route, read on...
If you require multitasking compatible devices, that would be any device running iOS4 or higher. There's a setting in your XCode project's build settings that allows you to set the minimum required iOS for your app to run -- "iOS Deployment Target". Set this to "iOS4" and your app will only be available to multitasking enabled iDevices (which includes iPad with iOS4 or higher, btw). -- no, not enough, see comments below and Jules' link.

Can I restrict my iPhone app from being used by iPhone3G's?

My iphone app doesn't run well on the iPhone 3G. Can I make it so users with these models can't download the app? If so, what does a 3G user see when they search for my app in the app store?
Does it appear in the store at all for them? If it does, when are they notified that they can't download the app?
I recommend you use the UIRequiredDeviceCapabilities key in your info.plist. This lets you tell the App Store exactly which capabilities you require instead of which device you require.
If your app "doesn't run well" on a 3G I'll guess it is because of performance and therefore you'd want to require a newer processor. Look into setting arm7 as one of your required device capabilities.
For more info look here:
http://developer.apple.com/iphone/library/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
Make it run better. Or if it's not completely unusable, just let them use it anyway. People with old devices expect them to be a bit slow.
According to the iTunes Connect Developer Guide (which links to the iOS Application Programming Guide), you can't prohibit certain devices. You can, however, require certain features which are only present on new devices:
armv7 is what I'd recommend (older devices are armv6)
magnetometer, because older devices don't have one. Apple might look at you funny if your app doesn't actually use the compass though.
opengles-2, because older devices only support 1.1. Apple might look at you funny too.
auto-focus-camera, except the iPad and all the iPod Touches don't have one. Probably not what you want.
iPhone 3GS uses iOS 6.1.x so if your app support iOS 7+ it will not be able to install on iPhone 3GS, this is the best possible way to avoid download on that device.