-2

I have an ionic 6 app built with angular and cordova. I can build the app just fine for iOS and it runs on an iPhone with no issues.

But for some reason, when running the same build on an iPad I get CORS error accessing developers.google.com (I assume this is from firebase, which is in my app)

Most of the other questions I've found involve Capacitor, which I am NOT using. Similar, but I'm not making http requests directly. I'm using AngularFire: https://forum.ionicframework.com/t/cors-issue-when-sending-request-from-ionic-to-firebase-cloud-function/185239

I've been able to repeat this scenario. If I remove the app from the iPad simulator and run it again, it works. However, if I refresh using Safari dev tools, or just re-run the app, the issue occurs. (maybe it's a timing issue?)

erorrs.screenshot of errors

Some more information around the erorrs expanded errors

Wayne F. Kaskie
  • 3,257
  • 5
  • 33
  • 43

1 Answers1

0

The way I managed to address this was to switch from the Cordova build to the Capacitor build following the instructions here: https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor

Essentially, once I started using the newly create ios folder instead of the old platform/ios that was generated by Cordova, the error stopped.

I don't know why, but maybe this will help someone else.

Wayne F. Kaskie
  • 3,257
  • 5
  • 33
  • 43