From 8cb0639f75c574b568b19dfc0a0a37b2ec77ead1 Mon Sep 17 00:00:00 2001 From: Martin Georgiu Date: Fri, 24 Jun 2022 11:45:30 +0200 Subject: [PATCH 1/3] fix share extension targe in Podfile --- share_handler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share_handler/README.md b/share_handler/README.md index 98a13e5..3071af7 100644 --- a/share_handler/README.md +++ b/share_handler/README.md @@ -136,7 +136,7 @@ target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) # share_handler addition start - target 'Share Extension' do + target 'ShareExtension' do inherit! :search_paths pod "share_handler_ios_models", :path => ".symlinks/plugins/share_handler_ios/ios/Models" end From 648108fa38024b7d25d84909bb2a5ea566abbf70 Mon Sep 17 00:00:00 2001 From: Josh Juncker Date: Thu, 30 Jun 2022 09:46:26 -0600 Subject: [PATCH 2/3] Updating readme to style code blocks Also update readme to add another airdrop option. --- share_handler/README.md | 96 ++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/share_handler/README.md b/share_handler/README.md index 3071af7..1c7c00d 100644 --- a/share_handler/README.md +++ b/share_handler/README.md @@ -33,6 +33,8 @@ First, add `share_handler` as a [dependency in your pubspec.yaml file](https://f Photos can be shared to and used in this app +LSSupportsOpeningDocumentsInPlace +No CFBundleDocumentTypes @@ -65,56 +67,54 @@ First, add `share_handler` as a [dependency in your pubspec.yaml file](https://f - - AppGroupId + + AppGroupId $(CUSTOM_GROUP_ID) - - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - NSExtension - - NSExtensionAttributes - - - IntentsSupported - - INSendMessageIntent - - - NSExtensionActivationRule - - - - SUBQUERY ( - extensionItems, - $extensionItem, - SUBQUERY ( - $extensionItem.attachments, - $attachment, - ( - ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" - || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" - ) - ).@count > 0 - ).@count > 0 - - PHSupportedMediaTypes - - - Video - Image - - - NSExtensionMainStoryboard - MainInterface - NSExtensionPointIdentifier - com.apple.share-services - + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + NSExtension + + NSExtensionAttributes + + + IntentsSupported + + INSendMessageIntent + + + NSExtensionActivationRule + + + + SUBQUERY ( + extensionItems, + $extensionItem, + SUBQUERY ( + $extensionItem.attachments, + $attachment, + ( + ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.file-url" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.movie" + || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" + ) + ).@count > 0 + ).@count > 0 + + PHSupportedMediaTypes + + Video + Image + + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.share-services + - + ``` 4. Add a group identifier to both the Runner and ShareExtension Targets From 82d02800cf33921513481c8814c8f36e4851bb77 Mon Sep 17 00:00:00 2001 From: Josh Juncker Date: Thu, 30 Jun 2022 09:56:21 -0600 Subject: [PATCH 3/3] Fix for example code in readme --- share_handler/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share_handler/README.md b/share_handler/README.md index 1c7c00d..903d4d5 100644 --- a/share_handler/README.md +++ b/share_handler/README.md @@ -609,8 +609,8 @@ class _MyAppState extends State { const SizedBox(height: 10), Text("Shared files: ${media?.attachments?.length}"), ...(media?.attachments ?? []).map((attachment) { - final _path = attachment?.path; - if (_path != null && attachment?.type == SharedAttachmentType.image) { + final path = attachment?.path; + if (path != null && attachment?.type == SharedAttachmentType.image) { return Column( children: [ ElevatedButton( @@ -618,14 +618,14 @@ class _MyAppState extends State { ShareHandlerPlatform.instance.recordSentMessage( conversationIdentifier: "custom-conversation-identifier", conversationName: "John Doe", - conversationImage: File(_path), + conversationImageFilePath: path, serviceName: "custom-service-name", ); }, child: const Text("Record message"), ), const SizedBox(height: 10), - Image.file(File(_path)), + Image.file(File(path)), ], ); } else {