Can you please help me in the matter of supporting apple news sharing ,
My Share Extension info.plist contains :
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
<integer>10</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
How can i see my share extension while share some thing from apple news ?
OK I sorted this out. You need to configure your Extension to allow content for both
public.plain-text
andpublic.url
types. Apple News sends an ItemProvider with two attachments, first a plain-text piece with the article summary, and second a Web URL to the article itself. You must accept and process both.Try these extension attributes. They use a predicate to find the required URL type attachment (assuming that's what you want):
And code along these lines to find the proper URL attachment, again, assuming that's the bit you want: