breautek commented on issue #835: URL: https://github.com/apache/cordova-ios/issues/835#issuecomment-665359984
> What was the resolution for closing the bug? It's not a Cordova bug. I'll elaborate, and provide some potential workarounds. The OP didn't provide any information that provide the actual cause of this particular issue, so to properly debug this, you would have to look at the safari web inspector to see what JS errors are occurring. Do note that safari doesn't capture log events until only after the inspector is opened/connected to the app. This means you'll need to refresh the webview after you connected the web inspector. You can do this by pressing cmd + r while having the safari web inspector focused. If you're getting an error that suggest that template file cannot be found, then what I said back in [May](https://github.com/apache/cordova-ios/issues/835#issuecomment-626246151) applies. Additionally, another common issue with angular apps specifically is the fact that they make heavy use of `XMLHttpRequest` for loading template files and other assets. On cordova 5.x with using WKWebView, this isn't supported out of the box due to the browser enforcing CORs. So if you're receiving a CORs issue you have 2 options. 1. Upgrade to cordova-ios@6 and use schemes as [documented here](https://cordova.apache.org/howto/2020/07/18/uiwebview-warning.html). Do note that using schemes will change your origin, so if you're updating an existing app that is released, your clients will lose access to their existing web storage data (indexed DB, cookies, local storage, etc). 2. If you cannot afford to lose access to the web storage, then staying on [email protected] is probably your best bet. You'll need to use a plugin such as [cordova-plugin-wkwebview-file-xhr](https://github.com/oracle/cordova-plugin-wkwebview-file-xhr) to workaround the CORS enforcement on the file protocol. Do note that the plugin doesn't currently support 6.x yet, tracking issue can be found at https://github.com/oracle/cordova-plugin-wkwebview-file-xhr/issues/55 ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
