Check out example codes for "cross origin requests are only supported for http wkwebview". It will help you in understanding the concepts better.
Code Example 1
webView.configuration.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")
Learn ReactJs, React Native from akashmittal.com