ajith-ab / react-native-receive-sharing-intent

A React Native plugin that enables React Native apps to receive sharing photos, videos, text, urls or any other file types from another app
MIT License
297 stars 108 forks source link

[iOS] App doesn't open when tapped from share menu #95

Closed davidsalib closed 3 years ago

davidsalib commented 3 years ago

My app is showing on the list of Shareable apps. However, after tapping the app to share, it doesn't redirect to the app. I am trying to accept .xml/.opml files or text.

Share/info.plist

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Share</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
  <key>NSExtension</key>
   <dict>
     <key>NSExtensionAttributes</key>
         <dict>
             <key>NSExtensionActivationRule</key>
             <dict>
                 <key>NSExtensionActivationSupportsText</key>
                 <true/>
               <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
               <integer>1</integer>
                 <key>NSExtensionActivationSupportsFileWithMaxCount</key>
                 <integer>1</integer>
             </dict>
         </dict>
     <key>NSExtensionMainStoryboard</key>
     <string>MainInterface</string>
     <key>NSExtensionPointIdentifier</key>
     <string>com.apple.share-services</string>
   </dict>
</dict>
</plist>

Please let me know which additional details would be helpful here.

davidsalib commented 3 years ago

SOLVED: Found that the issue was with 'handleFiles()' not being triggered by the OPML/XML files I was sharing to the app.

ghost commented 2 years ago

@davidsalib please let me know what did you do to fix this as I'm also trying to share an .opml file. Thanks