Skip to content

Conversation

@MrSpark2591
Copy link

@MrSpark2591 MrSpark2591 commented May 7, 2025

Platforms affected

IOS

Motivation and Context

It addresses the reload issue resulting in a white screen on IOS (Meteor framework )

Description

#1235
This is a fork with conflict resolved on existing PR

Testing

I used the changes with my Meteor/Cordova app on different iOS devices and I could not detect any white screen.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.28%. Comparing base (0ab311f) to head (6aad603).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1533   +/-   ##
=======================================
  Coverage   81.28%   81.28%           
=======================================
  Files          16       16           
  Lines        1875     1875           
=======================================
  Hits         1524     1524           
  Misses        351      351           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dpogue
Copy link
Member

dpogue commented May 17, 2025

If we look at the bigger scope beyond the Meteor bug, it seems to me like the current behaviour is what most apps would want in most cases. If you switch away from a Cordova app, and the webview gets killed in the background, when you resume it you would expect to be on the same page you were previously, and not have the app reload from the start.

Whether that actually works in practice or not is a good question. We know that it seemingly doesn't work in the case of Meteor, but I'm interested to know if other apps are seeing similar problems. I'd prefer to keep the best possible user experience for the widest set of apps, rather than changing the experience for everyone just to work around a Meteor bug.

@breautek
Copy link
Contributor

If you switch away from a Cordova app, and the webview gets killed in the background, when you resume it you would expect to be on the same page you were previously, and not have the app reload from the start.

I'm not sure if this works in practice, cause when this occurs in my apps, it effectively restarts to the main entry point. If the webview gets killed you lose all JS runtime state, unless if you explicitly store the state somewheres semi-persistent.

But in all likeliness, in my case it's probably something within my own framework that puts the app to the "main screen" on reload/refresh.

If the webview gets killed you lose all JS runtime state, unless if you explicitly store the state somewheres semi-persistent.

This is likely a common issue in apps though, depending on the app complexity, and maybe is the root cause of meteor (have 0 experience with MeteorJS)

@MrSpark2591
Copy link
Author

For all those coming for the meteor solution, we are trying to override this at the Meteor build level until this gets merged.

cordova-build-override/platforms/ios/CordovaLib/include/Cordova/CDVViewController.h

cordova-build-override/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m

You need to copy and paste these two files into your current project using these paths.

@wreiske
Copy link

wreiske commented Jul 3, 2025

#import <Cordova/CDVSettingsDictionary.h>
Screenshot 2025-07-03 at 7 42 34 AM

This line is failing as of today. @abroa01 is working on root causing how to get this build working with Meteor 3.3.

@abroa01
Copy link

abroa01 commented Jul 28, 2025

The issue of building is resolved in this PR - # Fix Cordova iOS white screen of death on app resume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants