iOS 9 如何用分享扩展分享笔记数据?
How to share notes data with share extension in iOS 9?
我的应用程序在 iOS 8 之前工作正常但是在 iOS 9 Beta 中我无法共享笔记 text/image 所以你能给我建议我认为我需要实现的东西吗为了这?
Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file.
查看此图片以供参考。
如果我将 NSPredicate 用于 NSExtensionActivationRule,应该使用什么?
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY
(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count == 1
).@count > 0
OR
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY
(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
|| 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 "public.tiff"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp"
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count < 6
).@count > 0
</string>
</dict>
我的应用程序在 iOS 8 之前工作正常但是在 iOS 9 Beta 中我无法共享笔记 text/image 所以你能给我建议我认为我需要实现的东西吗为了这?
Add **NSExtensionActivationDictionaryVersion** Attributes in your plist file.
查看此图片以供参考。
如果我将 NSPredicate 用于 NSExtensionActivationRule,应该使用什么?
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY
(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie"
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count == 1
).@count > 0
OR
SUBQUERY(
extensionItems,
$extensionItem,
SUBQUERY
(
$extensionItem.attachments,
$attachment,
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image"
|| 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 "public.tiff"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.microsoft.bmp"
).@count == $extensionItem.attachments.@count AND $extensionItem.attachments.@count < 6
).@count > 0
</string>
</dict>