molinet88 opened a new issue #134: Ionic 3 (iOS) - Custom ion-icon CORS issue
URL: https://github.com/apache/cordova-plugin-wkwebview-engine/issues/134
 
 
   # Bug Report
   ## Problem
   Custom svg ionic icons are not displayed on iOS because of a CORS issue.
   
   ### What is expected to happen?
   WKWebview should allow custom icons to be displayed as they are local 
resources.
   
   ### What does actually happen?
   On iOS, when trying to load a custom icon, CORS error is thrown:
   ```
   Failed to load resource: Origin null is not allowed by 
Access-Control-Allow-Origin.
   
file:///private/var/containers/Bundle/Application/.../www/assets/imgs/arrow-down.svg
   ```
   
   ## Information
   ### Command or Code
   Creating custom icon:
   ```
   ion-icon {
     &[class*="custom-"] {
       mask-size: contain;
       mask-position: 50% 50%;
       mask-repeat: no-repeat;
       background: currentColor;
       width: 1em;
       height: 1em;
     }
     &[class*="custom-arrow-down"] {
       mask-image: url(../assets/imgs/arrow-down.svg);
     }
   }
   ```
   
   Using custom icon:
   `<ion-icon name="custom-arrow-down" color="primary"></ion-icon>`
   
   ### Environment, Platform, Device
   iPhone 7 Plus
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Ionic
   ```
   Ionic Framework: ionic-angular 3.9.5
   ionic (Ionic CLI): 3.20.1
   @ionic/cli-utils: 1.19.3
   @ionic/app-scripts: 3.2.3
   ```
   Cordova
   ```
   cordova (Cordova CLI): 9.0.0 ([email protected])
   Cordova Platforms: ios 5.1.1
   ```
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   
   Related:
   https://forum.ionicframework.com/t/ionic-3-custom-svg-icon-cors-issue/156796
   
https://stackoverflow.com/questions/54667997/ionic-3-custom-svg-icon-cors-issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to