5

Recently, I've been making a simple research about iOS 8 share extension to understand how the system works and find out restrictions of this features. I realize that present documentation https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html is only a preliminary document. I've got a few questions about general limits / possibilities of iOS8 app extansions:

  • is apple specifies some size limit for shared data?
  • can I be 100% sure that only my app can launch specified app extension?
  • will phonegap support app extensions?
Yahoo
  • 51
  • 2

1 Answers1

0

for your second question we can't 100% sure that only your app can launch on specified app extension that is totally controlled by user but we can control on which documents you want to show your app extension follow Declaring Supported Data Types for a Share or Action Extension

to make customize document type for write predicates under key NSExtensionActivationRule for example:for pdf,image and excel documents i made following predicates with maximum amount of document 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>
Rudra
  • 241
  • 1
  • 3
  • 9