我绞尽脑汁想确定如何检测设备是否支持空投。我的想法是尝试获取空投的 UIActivity 并在其上调用 canPerformWithActivityItems: 。问题是我不知道如何获得空投的 UIActivity,有人知道该怎么做吗?有人有不同的方法来解决这个问题吗?
谢谢, 暗里
最佳答案
没有公开此信息的 API,因为 UIActivityViewController 不会公开系统的 UIActivity 对象。
不幸的是,获取此信息的唯一方法是检查设备支持。
来自 the Apple support website :
To share content with AirDrop, both users need one of the following devices using iOS 7:
- iPhone 5 or later
- iPad (4th generation)
- iPad mini
- iPod touch (5th generation)
AirDrop transfers information using Wi-Fi and Bluetooth. You need an iCloud account to share with Contacts.
您可以通过多种方式检测到这一点。如果您没有执行此操作的现有代码,请查看 the EPPZDevice class这将为您完成大部分工作。
关于ios - 如何确定 iOS 设备是否支持空投,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20356662/