IOS Share Extension: How to Read Notes

I want my application to be able to parse text from notes as well as other messages from text editors, so I created a goal for expanding shares. Everything worked fine until I prepared the application for publication, replacing it TRUEPREDICATEwith NSExtensionActivationRule.

Presumably, in my target share of the extension, I should add the NSExtensionActivationSupportsText key to the NSExtensionActivationRule in info.plist, which I did, but still the extension of my application does not appear in the general sheet.

According to https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html my info.plist should contain the following:

<key>NSExtensionAttributes</key>
<dict>
   <key>NSExtensionActivationRule</key>
   <dict> 
        <key>NSExtensionActivationSupportsText</key>
        <integer>1</integer>
   </dict>
</dict>

, , , -, .

+4
1

, iOS 9

<dict>
    <key>NSExtensionActivationSupportsText</key>
    <true/>
</dict>

, , :

<key>NSExtensionAttributes</key>
<dict>
    <key>NSExtensionActivationUsesStrictMatching</key>
    <integer>2</integer>
    <key>NSExtensionActivationRule</key>
    <dict>
        <key>NSExtensionActivationDictionaryVersion</key>
        <integer>2</integer>
        <key>NSExtensionActivationSupportsText</key>
        <true/>
    </dict>
</dict>
+5

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


All Articles