For development purposes, I need to disable the Cross-Origin Restrictions in Safari in XCODE's IOS SIMULATOR (iPad) on my iMac.
In Safari on my iMac, this can be done simply by checking 'Disable Cross-Origin Restrictions' in Menu>Develop. how can i do the same in Safari in XCODE's IOS SIMULATOR (iPad)?
Thanks!
I have tested this solution on macOS v12.6.3 and xCode Simulator v13.1. (Only tested for dev env where site is hosted at localhost)
Prerequisites,
Develop menu on safari by Safari->Preference->Advanced and tick Show features for web developers 
You can follow below steps to disable CORS on xcode's IOS simulator,
Navigate to safari on your IOS simulator.
Open safari on your iMac and go to Develop menu and you should be able to see your simulator device. Navigate to that device menu and you should see a menu with list of all the open tabs on your safari browser in simulator device. In here I have only opened google.com. In case if you can't see any tabs opened, try following,

Click on any of menu items in above, in my case it's www.google.com. This will open up a new window, in which you should be able to see logs for your safari browser running in IOS simulator.
In Web inspector click on the small mobile icon and then check `Disable cross-origin restrictions.
This should disable CORS for localhost sites.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With