@MrWhite wrote:
Hi, I already post a question on stackoverflow but no answer so I take a chance on ionic forum… https://stackoverflow.com/questions/54667997/ionic-3-custom-svg-icon-cors-issue
I’m currently trying to build my Ionic 3 app on IOS 12.1.
My custom svg icon added with the following code :ion-icon { &[class*="std-icon"] { mask-size: contain; mask-position: 50% 50%; mask-repeat: no-repeat; background: currentColor; width: 1em; height: 1em; } // custom icons &[class*="std-icon-medal"] { mask-image: url(../assets/icon/medal.svg); } }
is not displayed on IOS 12.1 because of the following error:
file:///Users/…/Studay.app/www/assets/icon/medal.svg
[Error] Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin (medal.svg, 0)
[Error] Origin null is not allowed by Access-Control-Allow-Origin.
I know that WKWebView as enforced CORS, but in my case it is just about load internal resources, in www/assets folder …
Even the svg link start by file:/// so I don’t really understand what’s happens here.My Info:
Ionic:
ionic (Ionic CLI) : 4.6.0
(/Users/hugo/.config/yarn/global/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.2Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 22 other plugins)System:
NodeJS : v11.5.0 (/usr/local/Cellar/node/11.5.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61 ionic (Ionic CLI) : 4.6.0 (/Users/hugo/.config/yarn/global/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.2
Posts: 1
Participants: 1