9

How can I restrict my app for iPhone's only, excluding iPod touch ?

I don't want my app available on iPod Touch, is there a property in the info.plist I can use to specify this or is this something I will encounter during the setup on itunesconnect ?

Daniel
  • 23,129
  • 12
  • 109
  • 154
  • Can you elaborate on what functionality you need from the iPhone that's not available on the touch? That will dictate the answer. – Conrad Shultz Apr 04 '12 at 15:56
  • I've got a few buttons to use the sms composer, and a button to call, I know I can keep the iPod and alert the user that he can't use this, but my friends don't want the app available for these users :( – Daniel Apr 04 '12 at 16:00
  • 1
    I see that you got a response, which is correct: filter for telephony. After all, if future iPod touches have telephony you don't want to exclude them. – Conrad Shultz Apr 04 '12 at 16:14
  • Then again similar to my sms question (does that exclude iMessage) - does telephony exclude FaceTime ? Interesting, need to make a test app for that... – Daniel Apr 04 '12 at 16:17
  • 1
    Not sure. But one thing to remember is that Apple *really* frowns on arbitrary exclusion of devices, so make sure that whatever you end up doing you have demonstrated technical reasons to do so. Even if your clients want something, Apple might reject (or pull) the app. For example, you are explicitly barred from preventing an iPhone app from working on the iPad. – Conrad Shultz Apr 04 '12 at 16:35

2 Answers2

12

You could add gps as a required device capability simply to exclude devices without the GPS hardware, which would rule out iPod touches.

Edit: Actually, the correct way to do this is to include for the UIRequiredDeviceCapabilities entry (a dictionary), the telephony key with a value of YES, meaning, only devices that support telephony can use the app.

Also, check out the complete reference of what keys are available for use with UIRequiredDeviceCapabilities.

Mark Granoff
  • 16,878
  • 2
  • 59
  • 61
  • Which key in the info.plist is this ? – Daniel Apr 04 '12 at 15:52
  • 1
    "Required Device Capabilities" aka __UIRequiredDeviceCapabilities__ :-) – Mark Granoff Apr 04 '12 at 15:53
  • 2
    Isn't that frowned upon by Apple? If you're not going to need gps, Apple would not like you to require gps. – arin Apr 04 '12 at 15:53
  • Possibly. You could "require" some other hardware capability not found on iPod touches, but that one is certain to rule them all out. I think you can also specify camera requirements, but some (not all) iPod touches do have cameras. – Mark Granoff Apr 04 '12 at 15:54
  • @Daniel Why do you want to exclude iPod touches anyway? – Mark Granoff Apr 04 '12 at 15:54
  • Why ? For the simple reason the client wants that... silly I know, I've added telephony and sms to that. I have a few buttons to use sms composer and some buttons for telephoning. Could use alerts to disable these features but... Question: would sms still allow iMessage devices in ? – Daniel Apr 04 '12 at 16:02
  • @Daniel Ah, yes... the client wants it. :-) Of course. :-) Not sure about what __sms__ allows, but I would _assume_ it means _real_ SMS, not "fake" SMS via the Messages app. – Mark Granoff Apr 04 '12 at 16:05
  • you would think so but that's something interesting to investigate ! ;) Thanks for the tips sir ;) – Daniel Apr 04 '12 at 16:06
  • Will settings these requirements prevent iTunes from claiming compatibility with iPod touch in the application listing too, or will it simply prevent installation? I need to actually change the listing as functionality within my application is severely restricted without GPS (it is designed for outdoor use) and at least one person has deliberately bought an iPod just to run that app! – Martin Robins Nov 10 '14 at 11:36
  • @MartinRobins Part of the reason for adding capabilities like 'gps' to the required device capabilities is to prevent users with the wrong device from downloading the app and being disappointed, especially if they paid for it. So, if you need gps support, then you shouldn't be targeting the iPod touch anyway, since it has no gps support, right? – Mark Granoff Nov 10 '14 at 11:59
-1

The above solutions are not the way Apple has recommended it should be done one their website. There are two ways that I am currently aware of.

When creating, the project in the latest version of Xcode, it allows you to choose the device family. Don't select universal or ipod. Just select iPhone.

An alterntive is in the application's Build Settings change the Targeted Device Family to iPhone, instead of iPhone/iPad.

Buneme Kyakilika
  • 1,202
  • 3
  • 13
  • 34
  • 1
    I don't believe any of those Xcode settings affect the devices that will run the app. They affect the icons required, etc., but the iPad, for example, will still run so called iPhone-only apps. – Jeff Jun 16 '14 at 21:06
  • In addition, the device family is iPhone/iPod Touch. Thus, by selecting, iPhone, you aren't excluding iPod Touch as the question requests. – Michael Reiland Jul 21 '15 at 14:40
  • Just one addition, apple now checks if your app is also working in iPad without any modifications, it will be rejected if it doesn't work – Bryan P Jan 06 '16 at 05:32