-
Notifications
You must be signed in to change notification settings - Fork 390
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
Failed to load resource: unsupported URL only on iOS #266
Comments
Problem is the UseScheme. When it is set to false, the url will be file:///var/mobile.... to load those files on both iOS 10 and 11. When set to true, the url I mentioned works on iOS 10 but not on iOS 11 as it replaced file:// with ionic-asset:// and it is seen as unsecure. Maybe whitelisting it is the solution? |
Noticed that ionic-asset:// was missing but even when adding
it didnt solve it yet. |
Did you find a solution to this |
No, so I had to change UseScheme to false so it would use the old webserver. (Although security advice is not to do this). The advantage of changing it back is that you get the same behavior on iOS 10 and iOS 11 while if you set UseScheme to true, you get different link on both iOS versions. But it can help till someone solves the ionic-asset issue. |
Yea I didn't find any solution to this either so just waiting |
I also got the problem when UseScheme is set to true ( cordova-plugin-ionic-webview v2.3.1) with a custom port. I've tried everything to whitelist but i always got this on IOS11: |
Worked for me |
@Bramzor Actually u r right. UseScheme=true is not working for iOS. Finally fixed the issue by setting preferences to the iOS specifically set theses preference for iOS. Thanks everyone! |
@RameshkrishnanV why are you closing since Ionic explicitly told to use UseSheme = true and a different port for security ? |
@geshub Hey ionic web view by default it takes useScheme as false. so its ok to use it in preferences |
@RameshkrishnanV yes but did you see the security notice ? https://ionic.zendesk.com/hc/en-us/articles/360015176994-2019-01-03-Security-Alert-for-cordova-plugin-ionic-webview |
UseScheme = false is indeed a BAD idea but its the only way to work around the issue today. But we need to keep this issue open to track as it still requires a fix. Usescheme = false is a security risk today. |
this solved to me |
Where are you setting that? |
you need to set up a custom pipe for this importing dom sanitizer from angular platform browser |
I encountered the same error and I solved it with
Thanks to @prescindivel
|
Can you show your html ? |
Here is my HTML code
And my code to take a picture
|
Tanks :3 |
What is your error? |
he is don´t load image in ios ´-´ |
Can you send your HTML5 and TS code This is my code for getPicture
You can see that I am changing image path and after I use |
Thanks, you , you helped me much |
hey this work for me!
|
If anyone from ionic 1 wants the solution to this issue, please use this stackoverflow post to fix it. Just place these two line of code in angular.config: |
100% working solution
|
ionic 3, webview 4.2.1 , still error. |
Hi, i'm using this plugin version 2.3.1
and i getting this error
Failed to load resource: unsupported URL
unsafe:ionic-asset:///var/mobile/Containers/Data/Application/4554564-564554-5646545/tmp/cdv_photo_014.jpg
only on iOS platform. please help me to fix this
config.xml
"name="WKPort" value="8080""
name="UseScheme" value="true"
allow-intent href="itms:"
allow-intent href="itms-apps:"
The text was updated successfully, but these errors were encountered: