Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: previewDocument or openDocument only works at the first download, not at next downloads #108

Closed
afilp opened this issue Feb 1, 2022 · 2 comments

Comments

@afilp
Copy link

afilp commented Feb 1, 2022

  • please provide the version of installed library and RN project.
      "react-native": "0.66.2",
    "react-native-blob-util": "^0.13.18",

In iOS, after I download a PDF, I use either the previewDocument or the openDocument, like that:

if (Platform.OS === 'ios') {
            ReactNativeBlobUtil.ios.previewDocument(res.path());
          }

However, it only works the first time during the entire app's session.

It does not appear the next time I download a document, whether it is the same document or other documents. Is this a bug I assume? Have you noticed this behavior? I do not know why this happens.

@afilp
Copy link
Author

afilp commented Feb 6, 2022

I had to use react-native-share, which somewhat "solved" the problem, but it would be nice to be able to open the pdf directly.

@RonRadtke
Copy link
Owner

I know, but first I have to find the cause for the issue.
So if you can help find it, it would be great.
Everything is helpful, error messages, if the code is fully executed, where the code breaks exactly, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants