Reputation: 2593
Is the only way to clear the cache of SFSafariViewController
by clearing Safari's cache in the Settings app?
Upvotes: 3
Views: 2125
Reputation: 11
From iOS 16 and above there is an option to clear SafariViewController caching
via SFSafariViewController.DataStore.default.clearWebsiteData()
.
But yeah it's recommended to use WKWebView for more complex web based actions (as it gets hard to maintain/customise SFSafariViewController).
Also refer https://stackoverflow.com/a/35709357/18340745
Upvotes: 0
Reputation: 1750
According to the documentation yes. SFSafariViewController is meant to be secure with very limited developer interaction. Anything more complicated or custom you'd have to use a custom WKWebView. Would be nice if SFSafariViewController were a little more flexible though.
Upvotes: 3