question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

While click on the share it not opening the share modal in ios

See original GitHub issue

@jgcmarins I am using react-native share and RN FetchBlob to share the remote image. But the share modal is not get opened after click on the share and the error is there is no file in that path

{ [Error: No such file '/Users/xxxxxxxx/Library/Developer/CoreSimulator/Devices/357BD908-5069-43F2-9BBF-9DB29E2B381E/data/Containers/Data/Application/HDBWUYDUYEDUYD_DEHBDEUDBEUDB/Documents/RNFetchBlob_tmp/RNFetchBlobTmp_vso6su3qnpfvefvefwvwefvwefvewfvefv

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nihpcommented, Feb 19, 2019

@jgcmarins

From my answer we can able to share the remote url (image) by downloading it using RNFS and save in local file.

I can able to share image in iOS via following apps

  1. Instagram
  2. WhatsApp
  3. Tumblr
  4. Facebook
  5. Flickr
  6. Pinterest
  7. SnapChat
  8. WeChat
  9. Skype
  10. Viber

Note: These are the apps which I can able to share the image

Thanks

1reaction
nihpcommented, Feb 18, 2019

@jgcmarins I have fixed the above issue

If we use like this we can able to share image.

downloadImageAndShareImage(fileUrl, type) {
   let filePath = uri;
    const name = shorthash.unique(filePath);
     const extension = (Platform.OS === 'android')? 'file://': ''
     const path = `${extension}${RNFS.CachesDirectoryPath}/${name}.png`;

     RNFS.downloadFile({fromUrl:filePath, toFile: path}).promise.then (resp => {
              let options = {
          type: type,
          url: filePath // (Platform.OS === 'android' ? 'file://' + filePath)
        };
        return Share.open(options);
      }).catch(error => {
       console.warn(error);
    });
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

While click on the share it not opening the share modal in ios
From my answer we can able to share the remote url (image) by downloading it using RNFS and save in local file. I...
Read more >
Recreate iOS 13' share sheet modal in swift ... - Stack Overflow
Here's what I've tried. I've created a new ViewController class extending UIActivityViewController. And in the viewDidLoad function, ...
Read more >
iOS 14 (SwiftUI) Sheet Modals not … | Apple Developer Forums
I tried closing the modals in two different ways: either by using the Binding<Bool> method, or by using the Environment presentationMode method, and...
Read more >
Share content during an Adobe Connect meeting
In the upper-right corner of the Share pod, click the menu options , select Share, and choose My Screen, Document, or Whiteboard. You...
Read more >
iOS - Sharing - Documentation - Meta for Developers - Facebook
iOS Simulator and Testing ... If you are using Simulator to test sharing in your application, you will see errors if you try...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found