WKWebView + ReactJS + HTTP Request issues

Hi there,

I am currently working on a small MacOS status bar app that involves running a local ReactJS app within a WKWebView.

For the most part communication between Swift and React is accomplished via evaluateJavaScript / userContentController handler/listeners, but in some instances, I am using fetch GET/POST requests within the React app to retrieve data from an API I am serving elsewhere. The problem I am running into is when I make an HTTP GET request within the React app to retrieve some data from my server, I can see it reaching the endpoint, however the response in React is never fulfilled. When testing this in React alone in a web browser it works fine, which leads me to believe this is a security issue with WKWebView or a greater extent the app. I've tried numerous NSAppTransport settings to no avail. Any thoughts on this issue would be greatly appreciated.

WKWebView + ReactJS + HTTP Request issues
 
 
Q