IOS8 app extension

Recently, I was doing simple research on expanding the iOS 8 site to understand how the system works and find out the limitations of these features. I understand that this documentation https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html is only a preliminary document. I have a few questions about the general limitations / expansion options of iOS8 applications:

  • : apple indicates size limit for shared data?
  • Can I be 100% sure that only my application can run the specified application extension?
  • Will application extension support be disabled?
+5
source share
1 answer

for your second question, we can’t be 100% sure that only the application can run on the specified application extension, which is completely controlled by the user, but we can control on which documents you want to show the extension of your application by following the Declaration of supported data types for the Share extension or Action

To configure the document type for NSExtensionActivationRule turn-key recording predicates, for example: for PDF documents, images, and Excel, I made the following predicates with a maximum document size of up to 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> 
0
source

Source: https://habr.com/ru/post/1204156/


All Articles