最近,我一直在研究iOS 8共享扩展,以了解系统如何工作并找出这些功能的限制. 我意识到目前的文档 https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html只是一个初
我意识到目前的文档 https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html只是一个初步文件.
我有一些关于iOS8 app扩展的一般限制/可能性的问题:
>是苹果指定共享数据的一些大小限制吗?
>我可以100%确定只有我的应用可以启动指定的应用扩展程序吗?
> phonegap会支持app扩展吗?
但我们可以控制您要在哪些文档中显示您的应用扩展程序,请按照 Declaring Supported Data Types for a Share or Action Extension进行操作
在密钥NSExtensionActivationRule下为write谓词设置自定义文档类型
例如:对于pdf,image和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>