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

utils.openFile does not open file in simulators #8410

Open
erkanarslan opened this issue Mar 5, 2020 · 2 comments
Open

utils.openFile does not open file in simulators #8410

erkanarslan opened this issue Mar 5, 2020 · 2 comments

Comments

@erkanarslan
Copy link

@erkanarslan erkanarslan commented Mar 5, 2020

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.2.2
  • Cross-platform modules: 6.0.1
  • Android Runtime: 6.2.0
  • iOS Runtime: 6.2.0
  • Plugin(s): unrelated

Describe the bug
openFile method of utils module does not preview the file in iOS simulator and Android emulator but does it in real devices.

Here is a screenshot:

Simulator Screen Shot - iPhone 8 - 2020-03-05 at 11 26 28

To Reproduce
Save an image to documents folder and try to open its path with utils.openFile

Expected behavior
Show the preview of the file.

Sample project
I can send you my whole project if you need. Give me an email address.

Additional context
Works in real device. But not in simulators.

@NickIliev NickIliev added the os: ios label Mar 9, 2020
@NickIliev
Copy link
Member

@NickIliev NickIliev commented Mar 9, 2020

@erkanarslan that is somehow expected as the simulator path is different for each Mac user (see here). The method openFile is checking for that path that would be on a real device so that said it is a limitation of this implementation.

I wouldn't. say it is a bug as the method works on a real device but still marking this one as good-first-issue.

@tarunama
Copy link
Contributor

@tarunama tarunama commented Mar 16, 2020

@erkanarslan
I want to enhance in simulator DX.
This is my email address. sakaharami@gmai.com
Could you send your project codes of using utils.openFile

@tarunama tarunama mentioned this issue Apr 2, 2020
4 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.