Yah*_*hoo 5 cordova xcode6 ios8 ios8-extension
最近,我一直在研究iOS 8共享扩展,以了解系统如何工作并找出这些功能的限制.我意识到目前的文档https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html只是一个初步文件.我有一些关于iOS8 app扩展的一般限制/可能性的问题:
对于您的第二个问题,我们不能 100% 确定只有您的应用程序可以在完全由用户控制的指定应用程序扩展上启动,但我们可以控制您想要在哪些文档上显示您的应用程序扩展,遵循声明 共享支持的数据类型或动作延伸
要为关键 NSExtensionActivationRule 下的写入谓词自定义文档类型,例如:对于 pdf、图像和 excel 文档,我做了以下谓词,最大文档量为 1。
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (
extensionItems,
$extensionItem,
SUBQUERY (
$extensionItem.attachments,
$attachment,
(
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.adobe.pdf"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.png"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.jpeg-2000"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.excel.xls"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "org.openxmlformats.spreadsheetml.sheet"
)
).@count == $extensionItem.attachments.@count
).@count == 1</string>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
753 次 |
| 最近记录: |