1

I have a question about the "Required device capabilities" item in the info.plist file.

In my app, user can send sms using the MFMessageComposeViewController. So I am wondering should I set the sms capability key in the plist.

I know the iPod Touch have iOS 5 could send iMessages. However, I don't know whether the iPod Touch with iMessage can be seen as the device capable of "sms".

Thanks!

Jing
  • 1,935
  • 3
  • 17
  • 26

2 Answers2

3

If composing SMS is required for your app to run, then set make it required. However, I would guess that you app can work fine without the SMS functionality. In that case, don't make SMS required, but check for availability when runnning your app. If the device can send messages, allow the option to do so, otherwise convey to the user that the feature isn't available to them.

Here is an example:

if ([MFMessageComposeViewController canSendText]) {
   //present the controller
}
else {
   //display an alert explaining that SMS isn't available on this device
}
sosborn
  • 14,676
  • 2
  • 42
  • 46
  • I do have a check before showing the MFMessageComposeViewController. But thanks for your advice. – Jing Feb 15 '12 at 02:04
  • Then my advice is to not require SMS, especially if you app can be used in other ways. – sosborn Feb 15 '12 at 02:10
1

It depends.

If users can't use your app on devices that don't support sms, you should add that capability to info.plit. This way, your app won't be installed on devices that can't send sms.

However, if users can use your app even though their device can't send sms (there is other functionality that they can use) you should not add sms capability to info.plist. This way, users can install your app on devices that can't send sms. But make sure to verify at runtime that you can actually send sms before trying to use it.

sch
  • 27,436
  • 3
  • 68
  • 83