Hello Experts,
We are facing an issue while opening pdf in iOS using react-native. Same code is working for android.
Are we missing something here for ios configuration?
We have developed this app using Mendix.
Hello Experts,
We are facing an issue while opening pdf in iOS using react-native. Same code is working for android.
Are we missing something here for ios configuration?
We have developed this app using Mendix.
Hi - the error is indicating that you aren’t providing a valid URL. We support http, https and file schemes, ie strings that start with “http://”, “https://” and “file://”.
What is the exact string that you providing?
James
Hi James,
I am passing this string: “http://HOST_IP:8080/rest/prsworkpackageservice/v1/downloadworkpackagedocument/gelFgU$4JJDXIB/Test PDF” and its rest service url. This is not working.
But tried with this URL : “https://pdftron.s3.amazonaws.com/downloads/pl/PDFTRON_mobile_about.pdf” and its working.
The issue is that the URL contains a space which is not being interpreted correctly by iOS’ URL handling.
The space needs to be ‘percent-encoded’, i.e. replace the space character with %20
:
http://HOST_IP:8080/rest/prsworkpackageservice/v1/downloadworkpackagedocument/gelFgU$4JJDXIB/Test%20PDF
Does that work for you?