ShoutSocial / share_handler

A plugin to facilitate receiving and handling share intents
41 stars 39 forks source link

IOS on clicking app from share sheet not opening the app just the zoom out animation #62

Closed amalshyjo closed 1 year ago

amalshyjo commented 1 year ago

So the app is showing in the share sheet but on clicking it does not lead to the app this is working perfectly on android. This behaviour is same for text and image.

https://github.com/ShoutSocial/share_handler/assets/56060390/fd1340d0-c9ca-4ee3-a8cc-313f076717d4

My code i have followed the readme and Link Runner > info.plist

...
        <key>CFBundleURLTypes</key>
        <array>
            <dict>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>ShareMedia-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
                </array>
            </dict>
        </array>
....
        <key>NSPhotoLibraryUsageDescription</key>
        <string>This app uses file storage for debug purpose</string>
...

Pubspec.yaml share_handler: ^0.0.17

ShareExtension.entitlements

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.application-groups</key>
    <array>
        <string>group.###</string>
    </array>
</dict>
</plist>

Podfile

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

  # Add this block
  target 'ShareExtension' do
    inherit! :search_paths
    pod "share_handler_ios_models", :path => ".symlinks/plugins/share_handler_ios/ios/Models"
  end
  # End of block

end

ShareExtension > Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>NSExtension</key>
    <dict>
      <key>NSExtensionAttributes</key>
      <dict>
        <key>IntentsSupported</key>
        <array>
          <string>INSendMessageIntent</string>
        </array>
        <key>NSExtensionActivationRule</key>
        <dict>
          <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
          <integer>1</integer>
          <key>NSExtensionActivationSupportsWebPageWithMaxCount</key>
          <integer>1</integer>
          <key>NSExtensionActivationSupportsImageWithMaxCount</key>
          <integer>1</integer>
          <key>NSExtensionActivationSupportsFileWithMaxCount</key>
          <integer>1</integer>
          <key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
          <integer>1</integer>
          <key>NSExtensionActivationSupportsText</key>
          <true />
        </dict>
        <key>PHSupportedMediaTypes</key>
        <array>
          <string>Image</string>
        </array>
      </dict>
      <key>NSExtensionMainStoryboard</key>
      <string>MainInterface</string>
      <key>NSExtensionPointIdentifier</key>
      <string>com.apple.share-services</string>
    </dict>
  </dict>
</plist>

ShareViewController

import share_handler_ios_models

class ShareViewController: ShareHandlerIosViewController {}
philliping commented 6 months ago

@amalshyjo I'm experiencing this issue. What was the resolution? Seems like I might have an improper config, but can't track it down

ukce111 commented 6 months ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

amalshyjo commented 6 months ago

@amalshyjo I'm experiencing this issue. What was the resolution? Seems like I might have an improper config, but can't track it down

Hello! I decided to postpone the implementation of the feature that relies on this functionality since it wasn't working properly. At this moment, it's unclear whether the problem is due to a configuration issue. We plan to revisit and explore this feature at a later date, so I'll have to try resolving it then. As of now, I don't have a solution to offer.