我应该在 info-plist 中需要短信功能吗?
我对 info.plist 文件中的“所需设备功能”项有疑问。
在我的应用程序中,用户可以使用 MFMessageComposeViewController 发送短信。所以我想知道我应该在 plist 中设置短信功能键。
我知道配备 iOS 5 的 iPod Touch 可以发送 iMessages。不过,我不知道带有iMessage的iPod Touch是否可以被视为具有“短信”功能的设备。
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的应用程序运行需要编写短信,请设置为必需。但是,我猜想您的应用程序可以在没有短信功能的情况下正常工作。在这种情况下,不要要求短信,但在运行应用程序时检查可用性。如果设备可以发送消息,请允许该选项这样做,否则向用户传达该功能不可用。
这是一个例子:
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:
这取决于。
如果用户无法在不支持短信的设备上使用您的应用程序,您应该将该功能添加到 info.plit。这样,您的应用就不会安装在无法发送短信的设备上。
但是,如果用户可以使用您的应用程序,即使他们的设备无法发送短信(他们可以使用其他功能),您不应该向 info.plist 添加短信功能。这样,用户就可以在无法发送短信的设备上安装您的应用。但在尝试使用它之前,请确保在运行时验证您是否确实可以发送短信。
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.