0
let sfViewController  = SFSafariViewController(url: url)
sfViewController.delegate = self

self.ViewC!.present(sfViewController, animated: false, completion: nil)

I am opening a SFSafariViewController in my app. But for the security issue I do not want the controls given by this view. This view is giving Actions like- Done, Refresh, Share, Open in Safari.

For My purpose I just want Action- Done. Rest other actions should not be visible to user. I am supporting ios 10.0 + . Atleast that toolbar should not be there. Is it possible to do this?

RateM
  • 241
  • 1
  • 4
  • 15

1 Answers1

1

No, You Can't customize SFSafariViewController .

Apple says:

Important

In accordance with App Store Review Guidelines, this view controller must be used to visibly present information to users; the controller may not be hidden or obscured by other views or layers. Additionally, an app may not use SFSafariViewController to track users without their knowledge and consent.

Lastly, indeed, you may use WKWebView instead for further customisation of your screen.

If your app lets users view websites from anywhere on the Internet, use the SFSafariViewController class. If your app customizes, interacts with, or controls the display of web content, use the WKWebView class.

Read doc: https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller

Mantu
  • 1,017
  • 1
  • 10
  • 21
  • Can you check this questions solution suggested? Can I do what that guy says? https://stackoverflow.com/questions/34146531/ios-9-hide-toolbar-at-bottom-of-web-page-loaded-via-sfsafariviewcontroller – RateM Jul 17 '19 at 11:54
  • it s just a workaround, will not work properly still you can try if you can take risk of rejecting your app – Mantu Jul 17 '19 at 11:58