Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Blank screen after using plugin-wkwebview-engine #143

Closed
3 tasks done
BraydenGirard opened this issue Apr 9, 2020 · 59 comments
Closed
3 tasks done

Blank screen after using plugin-wkwebview-engine #143

BraydenGirard opened this issue Apr 9, 2020 · 59 comments
Labels

Comments

@BraydenGirard
Copy link

BraydenGirard commented Apr 9, 2020

Bug Report

White screen after plugin install

Problem

I have bumped my cordova-ios version from 5.0.0 to 5.1.1 in order to use this plugin and remove uiwebview from project. When I add this plugin I now get a white screen with no errors. Any help would be greatly appreciated.

What is expected to happen?

App launch like normal but without uiwebview

What does actually happen?

App launches with white screen.

Information

Screen Shot 2020-04-09 at 10 37 07 AM

Screen Shot 2020-04-09 at 10 59 58 AM

Screen Shot 2020-04-09 at 11 00 07 AM

Command or Code

Environment, Platform, Device

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@breautek
Copy link
Contributor

breautek commented Apr 9, 2020

Can you confirm that the config has been added to your config.xml

<feature name="CDVWKWebViewEngine">
  <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

https://github.com/apache/cordova-plugin-wkwebview-engine#configxml

@BraydenGirard
Copy link
Author

I have updated my original comment with images of relevant config sections. As you can see I have included the config.

@BradCB
Copy link

BradCB commented Apr 9, 2020

I had the same kinda issue and had to add https://github.com/apache/cordova-plugins/blob/wkwebview-engine-localhost/README.md and the other requirements detailed on the git readme to work.

@BraydenGirard
Copy link
Author

Hmm, do you know what your config.xml looks like now, specifically the plugin tags? I am having issues using cordova plugin add since this project has a complicated build chain using a Grunt file. To test this I was hoping to just add the localhost plugin you referenced into my config.xml and then run my grunt task.

@BraydenGirard
Copy link
Author

I have removed all my plugins and test my app without this plugin, everything works fine on cordova-ios 5.0.0. I can confirm that this plugin is causing the white screen issue.

@breautek
Copy link
Contributor

Are there any reported javascript errors in the safari web inspector? Do note that you'll need to refresh the webview once the inspector is opened to see any startup errors because I don't think safari shows any logging before the inspector is connected. You should able to do this by pressing cmd+r in while the web inspector is focused.

I would think javascript errors to show in the xcode log, but someone I think on slack was having problems with this, so best to double check safari web inspector to be sure.

@BraydenGirard
Copy link
Author

Yes! I have found the error, was not using safari inspector at first. Here is the error I am getting, I am not sure why though or how to fix. Any help would be greatly appreciated.

Screen Shot 2020-04-22 at 8 57 55 AM

@breautek
Copy link
Contributor

With WKWebView, you have to obey CORS.

Normally, you have to modify your webserver to add the appropriate CORS headers, but since you're using XHR requests on local files, there is obviously no webserver at play here, so adding those appropriate headers becomes difficult.

The solution is to either use cordova-plugin-file to load those files using the filesystem APIs instead

OR

Use the third-party cordova-plugin-wkwebview-file-xhr plugin which intercepts the XHR requests and excluding the origin header.

For your case, since it looks like angular is the one making those requests, you're probably best off on using the wkwebview-file-xhr plugin. Be sure to read their known issues to determine if you'll be affected by it.

Let me know if this helps.

@elmartino
Copy link

elmartino commented Apr 22, 2020

I had the same problem with my Angular8+ app. I ended up using hash routing for mobile devices:
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, useHash: true }),

and the following line in index.html
<script>document.write('<base href="' + document.location + '" />');</script>
(instead of <base href='/'>)

@BraydenGirard
Copy link
Author

BraydenGirard commented Apr 22, 2020

This app was written in AngularJS. Below is the code that is being used to load the views. Any suggestions how I would implement either @breautek or @elmartino solutions with this code? From the examples that I have seen I was not able to see how these solutions could be applied. May just be me not knowing the details of this area. I appreciate the support, thank you very much.

$stateProvider
            .state('dashboard', {
                url: "/dashboard",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/dashboards/dashboard.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('calendar', {
                url: "/calendar",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/calendar.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('admin', {
                url: "/admin",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/admin.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            }).state('assessment', {
                url: "/assessment",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/assessment.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('todayworkout', {
                url: "/todayworkout",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/todayWorkout.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('create', {
                url: "/create",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/create.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('wait', {
                url: "/wait",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/wait.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                    $rootScope.hideMenu = true;
                }
            })
            .state('profile', {
                url: "/profile",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/pages/profile.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = true;
                }
            })
            .state('tasks', {
                url: "/tasks",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve,
                    loadStatus: loadStatus
                },
                templateUrl: "app/views/tasks/tasks.html"
            })
            .state("login", {
                url: "/login",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve
                },
                templateUrl: "app/views/pages/login.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = false;
                }
            }).
        state("reset", {
                url: "/reset/:resetToken",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve
                },
                templateUrl: "app/views/pages/login.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = false;
                }
            })
            .state("register", {
                url: "/register?plan&title&value",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve
                },
                templateUrl: "app/views/pages/register.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = false;
                }
            })
            .state("information", {
                url: "/information",
                resolve: {
                    xmlFirstLoad: xmlFirstResolve
                },
                templateUrl: "app/views/pages/information.view.template.html",
                controller: function ($rootScope) {
                    $rootScope.isHomePage = false;
                }
            });
    })```

@breautek
Copy link
Contributor

I'm not overly familiar with angular (i used angular a very long time ago...) but based on the callstack, it looks like angular is the one that is making the XHR request.

This is why I said installing the https://github.com/oracle/cordova-plugin-wkwebview-file-xhr will likely be the easiest solution. I don't think you need to do any code changes. This works because the plugin overrides the implementation of XMLHttpRequest

@elmartino
Copy link

I'm only familiar with Angular2+ but i think you could try only the 2nd part of my solution.

@BraydenGirard
Copy link
Author

@breautek so you think that just by installing that plugin it could solve the problem?

@BraydenGirard
Copy link
Author

Update: Still getting the same error.

@elmartino
Copy link

Try:
<script>document.write('<base href="' + document.location + '" />');</script>
Inside your <head></head>

@BraydenGirard
Copy link
Author

Like this I'm assuming? Still didn't fix the white screen :(

Thank you for all the help!

Screen Shot 2020-04-22 at 11 32 29 AM

@BraydenGirard
Copy link
Author

Is there any possibility that cordova-plugin-wkwebview-engine-localhost could work? As @BradCB mentioned it solved his problem. I have however tried replacing cordova-plugin-wkwebview-engine with cordova-plugin-wkwebview-engine-localhost and I get dependency errors with my version of cordova-file-plugin. It says I need to use ^5.0.0 but when I use that it still gives the same error.

@BradCB
Copy link

BradCB commented Apr 22, 2020

@BraydenGirard I think you need cordova-plugin-wkwebview-engine plugin AND
cordova-labs-local-webserver plugin AND cordova-plugin-wkwebview-engine-localhost. I could be mistaken but that's how I got it working....

@elmartino
Copy link

elmartino commented Apr 22, 2020 via email

@BraydenGirard
Copy link
Author

@BradCB ok, I will try that.

@elmartino Which base element are you suggesting I remove? The one in my screenshot looks like it is being inserted dynamically. Would that not be what the script tag you suggested I add do? The screenshot is after the page has been loaded in the browser. If I look at the html file in my editor that base element does not exist.

@lmw4051
Copy link

lmw4051 commented Apr 24, 2020

@BraydenGirard I think you need cordova-plugin-wkwebview-engine plugin AND
cordova-labs-local-webserver plugin AND cordova-plugin-wkwebview-engine-localhost. I could be mistaken but that's how I got it working....

It works on iOS 12.0/12.1 but not 12.2, does anybody has solution for that?

@BraydenGirard
Copy link
Author

Yeah, when I add both I get a dependency error with corodova-file-plugin saying it needs to be version 5.0.0 even though I have that version...

@kzimny
Copy link

kzimny commented Apr 24, 2020

@elmartino: do you use the ChangeDetectionStrategy.OnPush in your project? After adding cordova-plugin-wkwebview-file-xhr the view does not refresh but data are loaded correctly from api.

@elmartino
Copy link

elmartino commented Apr 24, 2020

I just use default ChangeDetectionStrategy. I didn't used any other cordova wkwebview plugins than the cordova-plugin-wkwebview-engine

I just added the useHash part in my case only if environment === mobile (i have seperate environment files)
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, useHash: environment.mobile }),

and the line
<script>document.write('<base href="' + document.location + '" />');</script> instead of the default <base> tag.

@kzimny
Copy link

kzimny commented Apr 24, 2020

@elmartino: do you use web api requests in your project? Without cordova-plugin-wkwebview-file-xhr I cannot get data from api because of "XMLHttpRequest cannot load https://www.myapi.org/endpoint due to access control checks." error.

@elmartino
Copy link

elmartino commented Apr 24, 2020

Yes i do, but you have to fix them on server side not in client side. You should make sure your server accepts CORS requests (or use a proxy)

@kzimny
Copy link

kzimny commented Apr 24, 2020

My server accept CORS, the configuration is as follow c#:

context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" });
context.OwinContext.Response.Headers.Add("Access-Control-Allow-Credentials", new[] { "true" });
context.OwinContext.Response.Headers.Add("Access-Control-Allow-Headers", new[] { "authorization", "content-type", "set-cookie" });

What I'm missing?

@elmartino
Copy link

Maybe access-control-allow-methods? Maybe test it using https://www.test-cors.org/

@kzimny
Copy link

kzimny commented Apr 24, 2020

@elmartino: the cordova-plugin-wkwebview-engine works as long as HttpCookies are not needed. There is a PR to fixes http cookies. I wonder if and how do you handle http cookies?

@srinidhirao
Copy link

I had an Angular app integrated with Cordova and had trouble getting the app to load using Cordova's WebView Plugin. Since none of the solutions worked for me, I ended up using Ionic's WKWebView plugin (https://github.com/ionic-team/cordova-plugin-ionic-webview).
Even though, this plugin was built primarily for ionic, as the doc suggests, it can potentially be used for any Cordova app.

These are the steps I followed:

  1. Integrate the plugin:
    cordova plugin add cordova-plugin-ionic-webview

  2. Add an entry to config.xml:
    <preference name="WKWebViewOnly" value="true" />

  3. Prepare the project
    cordova prepare ios

I even uploaded the app to TestFlight and Apple did not complain of UIWebView, which sort of validates the fix.

@kzimny
Copy link

kzimny commented Apr 27, 2020

@srinidhirao: do you know whether cordova-plugin-ionic-webview accept cookies?

@srinidhirao
Copy link

@kzimny I don't know specifically. But a quick search on their GitHub page lists various issues with the Cookies. Some even claiming that WKWebView itself has issues with cookies:

One such post:
ionic-team/cordova-plugin-ionic-webview#300

@BraydenGirard
Copy link
Author

BraydenGirard commented May 1, 2020

I had an Angular app integrated with Cordova and had trouble getting the app to load using Cordova's WebView Plugin. Since none of the solutions worked for me, I ended up using Ionic's WKWebView plugin (https://github.com/ionic-team/cordova-plugin-ionic-webview).
Even though, this plugin was built primarily for ionic, as the doc suggests, it can potentially be used for any Cordova app.

These are the steps I followed:

  1. Integrate the plugin:
    cordova plugin add cordova-plugin-ionic-webview
  2. Add an entry to config.xml:
    <preference name="WKWebViewOnly" value="true" />
  3. Prepare the project
    cordova prepare ios

I even uploaded the app to TestFlight and Apple did not complain of UIWebView, which sort of validates the fix.

This solution worked for me. The only issue I am having now is that my app viewport does not fill the entire phone screen (black bars on top and bottom). Anyone else experience this?

@kzimny
Copy link

kzimny commented May 1, 2020

Yes, I solved the margin problem with meta viewport setting:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>My page</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
    <link rel="icon" type="image/x-icon" href="assets/favicon/favicon.ico">
    <script type="text/javascript" src="cordova.js"></script>
</head>
    <body>
        <root></root>
    </body>
</html>

@BraydenGirard
Copy link
Author

I actually got it working by doing the following:

ionic-team/ionic-v1#341 (comment)

@hazalozturk
Copy link

I have been dealing with the same issue. It's a react app. I followed the cordova documentation. Added this config in my config.xml:

<feature name="CDVWKWebViewEngine">
     <param name="ios-package" value="CDVWKWebViewEngine" /> 
</feature> 
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

cordova-plugin-ionic-webview plugin is not installed in the project. But still getting the white blank screen.
I also tried adding the WKWebViewOnly preference flag as <preference name="WKWebViewOnly" value="true" /> but no luck.
If I remove the plugin it just works fine. But then TestFlight rejects it.
Any help would be greatly appreciated!

@rahulchaube
Copy link

rahulchaube commented May 12, 2020

@srinidhirao
@BraydenGirard
My project specification
Angular JS Ionic Application
cordova-ios 4.3
cordova-android 6.0

Following your suggestion I did the following
cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest
ionic build ios
ionic build android

After doing this i uploaded the ios build to app store for dummy testing. And I still got the warning from apple development community. Looking forward to some inspiration.

@breautek
Copy link
Contributor

cordova-ios 4.3

This version of cordova-ios is old and won't satisfy Apple's UIWebView deprecation. I would advise you to upgrade to [email protected].

Maybe this has got to do with cordova-adndroid version of my app(6.0)

This plugin has nothing to do with android. The WKWebView is an iOS concept.

Also cordova-android@6 is no longer supported because it doesn't support API level 28, which is required by Google Play store.

@rahulchaube
Copy link

rahulchaube commented May 12, 2020

@breautek
Thanks for the quick reply, Actually i tried a dummy build in ios after following the steps mentioned in my above comment and I am still getting the warning message.
And I cannot upgrade to a higher version of cordova-ios due to other dependencies(migrating to 5.1 means I will have to migrate to latest version of ionic, which inturn means migrating to Angular 2+ which is not possible in case of my project)
Any words of wisdom.

@breautek
Copy link
Contributor

Don't know what to tell you. It sounds like you're going to need to refactor your app.

Cordova generally don't support older major releases because they, generally speaking, are not accepted by Apple or Google for one reason or another. If you can't update to [email protected], then respectfully you're on your own.

You can try forking cordova-ios, branch off the 4.5.x branch and then implementing the WKWebViewOnly flag yourself. The PR that implements this flag can be found at apache/cordova-ios#715 ... but I can almost guarantee you will run into other compatibility issues, so this is definitely will not be a long-term solution, and something I would personally avoid.

@rahulchaube
Copy link

Don't know what to tell you. It sounds like you're going to need to refactor your app.

Cordova generally don't support older major releases because they, generally speaking, are not accepted by Apple or Google for one reason or another. If you can't update to [email protected], then respectfully you're on your own.

You can try forking cordova-ios, branch off the 4.5.x branch and then implementing the WKWebViewOnly flag yourself. The PR that implements this flag can be found at apache/cordova-ios#715 ... but I can almost guarantee you will run into other compatibility issues, so this is definitely will not be a long-term solution, and something I would personally avoid.

Hey, I know, there is very little I can do here. But the option that you gave is worth a try given the limited options available for me. Although I am using svn as a repository and I am wondering how would i branch off the 4.5x and get the commit 715 on my local. Thanks in advance

@breautek
Copy link
Contributor

I'm not sure, its been ages since I last used SVN. But this is no longer the place for this kind of discussion, sorry.

@rahulchaube
Copy link

I'm not sure, its been ages since I last used SVN. But this is no longer the place for this kind of discussion, sorry.

Thanks. No worries.

@rahulchaube

This comment has been minimized.

@breautek
Copy link
Contributor

As I said before, Cordova's stance is to upgrade your app to use the latest supported platform versions, which has the code necessary to be apple compliant. So if you're taking an unsupported direction I have to ask you to please stop posting on our github. Github is for us tracking issues.

A more appropriate place for questions like this would be our slack. I cannot really answer your question because I'm not well knowledgeable in the native iOS code. But someone in our cordova-ios channel might be able to provide some general pointers.

Thank you for your cooperation.

@jcesarmobile
Copy link
Member

this is a known WKWebView issue, you can use https://github.com/oracle/cordova-plugin-wkwebview-file-xhr to fix the problem, or move to cordova-ios 6 and use a custom scheme

@Suhas-ap
Copy link

how to solve this issue? I have added the plugins but still their issue.

how can I get this solve?

@katzenjunge
Copy link

I had the same problem with my Angular8+ app. I ended up using hash routing for mobile devices:
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules, useHash: true }),

and the following line in index.html
<script>document.write('<base href="' + document.location + '" />');</script>
(instead of <base href='/'>)

Thank you so much! I did not have the useHash: true before, adding it solved the issue for me.

@Pei116
Copy link

Pei116 commented Jan 20, 2021

I had to add following two lines to config.xml according to Cordova 10 Documentation

@rohanawa
Copy link

Hi All, What is the fix for this issue ?does it requires plist changes or configuration XML changes . I am seeing a white screen with no errors being shown on Safari inspector?

@srinidhirao
Copy link

srinidhirao commented Sep 23, 2021 via email

@varshavsr
Copy link

varshavsr commented Dec 2, 2021

My app is Cordova based angular app and I am having issues of white screen after app launch on the device only. Simulator doesnt have any issues.
I followed the cordova documentation.
Using "cordova-ios": "^6.2.0"

Added this config in my config.xml:
<platform name="ios"><preference name="WKWebViewOnly" value="true" /></platform>

cordova-plugin-wkwebview-engine plugin is not installed in the project.
Tried with and without installing cordova-plugin-wkwebviewxhrfix plugin also.

But still getting the white blank screen.

If I remove the line <preference name="WKWebViewOnly" value="true" /> from config.xml file, it just works fine without white screen. But then Apple/TestFlight rejects it with reason ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more

@srinidhirao
Copy link

When Cordova-ios 6.0.0 was released, the default UIWebView got updated with WKWebView. So, you don't have to install this plugin to get the WkWebview support which was required in older Cordova projects.

Please check the docs:
https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html#:~:text=Moved%20WKWebView%20support,plugin%2Dwkwebview%2Dengine.

@varshavsr
Copy link

varshavsr commented Dec 2, 2021

@srinidhirao From the documentation, I understand that cordova-ios 6.0.2 should work flawless without external plugins like cordova-plugin-wkwebview-engine and cordova-plugin-wkwebviewxhrfix. Also the line <preference name="WKWebViewOnly" value="true" /> in config.xml becomes obsolete with cordova-ios 6.0.2 version.

Then why does apple/testflight rejects app without the line <preference name="WKWebViewOnly" value="true" /> in config.xml ?

Adding 'WKWebViewOnly' preference launches app with white screen indefinitely on the device but works well on simulator.

If we try to fix white screen issue by removing 'WKWebViewOnly' preference in config.xml file, app loads the screen without issues in device and simulator. But this resolution will reject app from Testflight/Appstore.

Any help to resolve the white screen issue and acceptance by TestFlight/appstore would be appreciated

@srinidhirao
Copy link

To check the white-screen issue, may be you can try debugging the app using the Safari Inspector as documented here:
https://cordova.apache.org/docs/en/10.x/guide/next/#debugging-cordova-apps

@breautek
Copy link
Contributor

breautek commented Dec 2, 2021

WKWebViewOnly preference was added in [email protected] as a stopgap measure when Apple starting rejecting apps with UIWebView reference.

The preference was removed in 6.0 (effectively forcefully enabled) as there is no UIWebView anymore in the core platform to properly handle Apple's new requirements. The fact that changing this setting causes different behaviours tells me that something didn't update properly when you upgraded to @6.2.

I'd also suggest that you check and ensure that you're using the latest version of the cordova cli. You can use cordova -v to check the version, and compare against the latest version published. (v10.0.0 at the time of writing). If the CLI version is update to date, then I'd also suggest nuking all the generated files:

rm -rf platforms
rm -rf plugins
rm -rf node_modules
rm package-lock.json
npm install
cordova platform add ios

If you're upgrading from 5.1 using the wkwebview plugin, ensure the wkwebview plugin has been removed, as this will cause conflicts.

If the issue still persists, white screens are generally JS errors which can be debugged using Safari's inspector as hinted above. Note that Safari does't report on log messages that occurred prior to the debugger being attached. You can work around this by refreshing the webview by pressing cmd + r when the Safari Inspector is focused. This will reload the app's webview while the debugger still being attached so that you can see all logs from the initial load.

If you see no logs in the JavaScript console, then you may have to use XCode to view the native logs to gain more insight.

Last few notes on Apple's deprecation message:

Apache Cordova maintains two packages that may use the UIWebView, which is cordova-ios platform itself & the cordova-plugin-inappbrowser. So if you use the inappbrowser plugin, you'll also need to ensure that plugin is fully up to date. There are a number of third-party plugins that may use UIWebView as well. Some known ones are:

  • google maps plugin
  • pretty much any social media plugin
  • firebase plugins

If you use any of these plugins, be sure they are up to date.

@varshavsr
Copy link

varshavsr commented Dec 3, 2021

@breautek Thank you for your helpful advice!

Now issue of white screen and rejection from apple is resolved.

Changes I have done in the app are as below, but I really don't know which one of them really did work.

  • Removed unused plugins:
    cordova-plugin-email-composer
    cordova-plugin-mauron85-background-geolocation
  • Removed wkwebview plugin and WKWebViewOnly preference
  • Added below preference in config.xml
<platform name="ios">
        <preference name="scheme" value="app" />
        <preference name="hostname" value="localhost" />
</platform>
  • Ran the commands suggested by you
rm -rf platforms
rm -rf plugins
rm -rf node_modules
rm package-lock.json
npm install
cordova platform add ios
  • Earlier Azure pipeline was building app with Cordova CLI version 9.0.0 . Now I have updated it to Cordova CLI version 10.0.0

@iva9
Copy link

iva9 commented Feb 6, 2022

@breautek Thank you for your helpful advice!

Now issue of white screen and rejection from apple is resolved.

Changes I have done in the app are as below, but I really don't know which one of them really did work.

  • Removed unused plugins:
    cordova-plugin-email-composer
    cordova-plugin-mauron85-background-geolocation
  • Removed wkwebview plugin and WKWebViewOnly preference
  • Added below preference in config.xml
<platform name="ios">
        <preference name="scheme" value="app" />
        <preference name="hostname" value="localhost" />
</platform>
  • Ran the commands suggested by you
rm -rf platforms
rm -rf plugins
rm -rf node_modules
rm package-lock.json
npm install
cordova platform add ios
  • Earlier Azure pipeline was building app with Cordova CLI version 9.0.0 . Now I have updated it to Cordova CLI version 10.0.0

tanks a lot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests