skip to Main Content

So I have made a hybrid application using react-native and I had no issues setting up share for android, but in iOS I am not able to make my application appear on the share list.
I need Apple Music or any application that shares a URL to be able to share to my extension.

I have added the following settings to my info.plist for the share extension

enter image description here

If I mention the NSExtensionActivationRule for an Image, I am able to see my application on the list but it is not working for URLs at all. Am I missing something in the setup ?

Update:

I am using MacOS 10.15 and Xcode 12.4
The share extension is working as expected on iOS 14.2 on an iPhone 8 and it is not working as expected in iOS 14.4.2 on an iPhone X

Found more information on Apple Developer forums: https://developer.apple.com/forums/thread/662671?page=2

it seems to be getting fixed if you restart the device, this is an open issue and appeared first in iOS 14.4.1

found another issue with a similar problem
Share extension – App not showing in share menu on first attempt since iOS 14

2

Answers


  1. Chosen as BEST ANSWER

    It seems to be fixed since I upgraded my Mac OS to the latest version BigSur, Share extensions are showing up normally again


  2. To add more apps for share sheet, add external application query schema code in. your info.plist, like below.

    <key>LSApplicationQueriesSchemes</key>
        <array>
            <string>mailto</string>
            <string>twitter</string>
            <string>viber</string>
            <string>whatsapp</string>
            <string>wechat</string>
            <string>line</string>
            <string>instagram</string>
            <string>instagram-stories</string>
            <string>kakaotalk</string>
            <string>mqq</string>
            <string>vk</string>
            <string>comgooglemaps</string>
            <string>googlephotos</string>
            <string>ha</string>
            <string>yammer</string>
        </array>
    

    And use Share from react-native

    try {
      const result = await Share.share(
        {
          message: `My message`,
          url: urlLink,
          title: `My title`,
        },
        {
          subject: `My subject`,
        },
      );
    
      if (result.action === Share.sharedAction) {
        if (result.activityType) {
        } else {
        }
      } else if (result.action === Share.dismissedAction) {
      }
    } catch (error) {
      alert(error.message);
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search