Origin null is not allowed by Access-Control-Allow-Origin

I used to build my apps on Phonegap Builder that is not working anymore.
I am using https://volt.build/ to build and generate .ipa (Apple) and .apk (Android).
My webserver is GlassFish 3.2.
My .apk (Android) is working fine. The problem is .ipa. I have tried a lot of things… really… but after I build .ipa (Apple) and try to login, it is showing the message below:

Origin null is not allowed by Access-Control-Allow-Origin.
XMLHttpRequest cannot load http://exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/pacientews/postnovocadastro due to access control checks.
exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/pacientews/postnovocadastro:1
POST http://exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/pacientews/postnovocadastro Origin null is not allowed by Access-Control-Allow-Origin.

Origin null is not allowed by Access-Control-Allow-Origin.
XMLHttpRequest cannot load http://exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/acessows/getinformacoesacesso due to access control checks.
exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/acessows/getinformacoesacesso:1
POST http://exames.ceus.med.br:8082/CEUSServerv0-0-1/rest/acessows/getinformacoesacesso Origin null is not allowed by Access-Control-Allow-Origin.

Apple has new security requirements since your PhoneGap days. Apps now have to follow access control rules.

Did you try the suggestions in Tips for PhoneGap Users about iOS?

Yes, I have tried all the suggestions.

I also tried to use this plugin “cordova-plugin-wkwebviewxhrfix” but I get this error on processing: UserError: fatal error: ‘CDVWKWebViewEngine.h’ file not found.

Hi,
I also got the same error CORS with IOS and fixed it successfully
I use nginx as proxy reserve in front of the backend and add CORS header

if ($request_method ~* "(GET|POST)") {
		  add_header "Access-Control-Allow-Origin"  *;
		}

		# Preflighted requests
		if ($request_method = OPTIONS ) {
		  add_header "Access-Control-Allow-Origin"  *;
		  add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
		  add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
		  return 200;
		}

The other CORS header will fail

Hope this helps you

Hi, this plugin solve my problem:

This: @ahovakimyan/cordova-plugin-wkwebviewxhrfix