Is there a way to set the referer in the initial request made by SFSafariViewController?

There is no API for that, unfortunately.

You can check SFSafariViewControllerDelegate page - all of the delegate methods is post-load handlers.

WKWebView and WKNavigationDelegate is one of possible replacements (iOS 8.0+).


The only way I could think to do this would be to bounce the request off of a web service that you control.

Sadly you can't use anything other than http or https URLs, so a local file URL won't work (short of listening on a socket on the device).