Skip to content

Conversation

@OS-pedrogustavobilro
Copy link
Collaborator

PR Description

The methods to open local files expect a file:// URI, which is not guaranteed to happen (e.g. File Transfer returns a full file path without file://).

This PR fixes that by adding file:// to the local file path if it does not exist.

Testing

Since there isn't an official release of this native library to test, you may use this capacitor application https://github.com/OS-pedrogustavobilro/issue-cap-file-viewer - and after doing cap sync replace the IONFileViewerLib.xcframework found in ios/App/Pods with the one from obtained from calling scripts/build_framework.sh in this repo. You may test before replacing the xcframework (issue should occur, empty screen trying to open pdf / video), and after replacing xcframework (simple pdf is shown, sample video is played)

@OS-pedrogustavobilro OS-pedrogustavobilro requested a review from a team October 1, 2025 11:41
@OS-pedrogustavobilro OS-pedrogustavobilro self-assigned this Oct 1, 2025
Copy link

@OS-ruimoreiramendes OS-ruimoreiramendes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it the way you suggested. Before updating the xcframework, the issue was there, after updating to the new xcframework with the fix, I’m able to see both the PDF file and the video.

@OS-pedrogustavobilro OS-pedrogustavobilro merged commit 2feef24 into main Oct 7, 2025
1 check passed
@OS-pedrogustavobilro OS-pedrogustavobilro deleted the fix/IONIC-51/local-file-not-uri branch October 7, 2025 08:24
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

Successfully merging this pull request may close these issues.

4 participants