I have an app that loads a webpage using SFSafariViewController
and the user listen to some audios.
I want to keep the audio playing even if the user closes SFSafariViewController
.
Is it possible?
I have an app that loads a webpage using SFSafariViewController
and the user listen to some audios.
I want to keep the audio playing even if the user closes SFSafariViewController
.
Is it possible?
Yes. It is possible. For use SFSafariViewController controller as property not local variable. ex.
var safariCtrl:SFSafariViewController!
func openSafariCtrl() {
if safariCtrl == nil {
safariCtrl = SFSafariViewController(url: YOUR_URL)
}
present(safariCtrl, animated: true, completion: nil)
}