Issue
When i try to deploy my ionic app to web, i get this error:
cordova.js:866 [Browser][cordova.js][xhrStatusChangeHandler] Could not SplashScreenProxy.js:131
[Browser][cordova.js][xhrStatusChangeHandler] Could not XHR config.xml: Not Found SplashScreenProxy.js:131
Solution
The Splash Screen component is available only as Ionic Native component, so we can't use it inside browser, until ionic 4. Now, you can test in the terminal like this:
$ ionic cordova build browser
$ ionic serve --cordova --platform browser
After that config.xml is still not found, so I just copy to this folder:
$ cp config.xml platforms/browser/platform_www
Or just copy manually the file config.xml from your app folder and paste in the directory platforms/browser/platform_www
There will be another error on the browser console:
GET http://localhost:8100/screen 404 (Not Found)
This error is because on the config.xml file the value for SplashScreen is "screen" (or splash in older ionics)
<preference name="SplashScreen" value="screen" />
If you change value for an image name, like "logo.png"
<preference name="SplashScreen" value="logo.png" />
and put that file in the same directory (/platforms/browser/platform_www) then you will get a splash image on the browser (I used chrome for this test and it worked)
Answered By - Adolfo Gonzalez
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.