As far as I know, currently it is not possible to disable cross-origin resource sharing restrictions in mobile safari. It would be great if this could be implemented or if someone knows how to do this. This would be an incredibly useful feature for automated testing of web applications on mobile Safari.
Yes I know that we can do it with Chrome:
Disable same origin policy in Chrome
And there are options to do it with desktop Safari:
And to do it manually on Mac for mobile Safari:
But I need to do it within Appium/Selenium code and I do not find any equivalent to Chrome option “-diasble-web-security”, because there is no such one for Safari: https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/safari/SafariOptions.html
The last info I have found, was a request on Mac Developers page about this: https://developer.apple.com/forums/thread/80927
Does anyone has a solution for this nowadays?