5

In the APP i'm currently working on, I need to provide user with a way to open HTML file. I'm using SFSafariViewController for that purpose. However, it is also required that user need to be able to view HTML file in incognito mode.

I did some research and find out that user can click on 'safari' icon in SFSafariViewController to open a certain HTML file in Safari APP. Then user can use private browsing mode of Safari as he/she always does.

However, I'm trying to figure out any way for user to use incognito or private browsing mode in SFSafariViewController?

If not, is there any alternative to SFSafariViewController which can achieve that?

Bista
  • 7,869
  • 3
  • 27
  • 55
Todanley
  • 468
  • 3
  • 12

1 Answers1

4

You do not have any control over SFSafariViewController in terms of customization. Read Further for more information regarding the different ways of opening a web-page within an app.

I would suggest you to use UIWebView if you are supporting iOS versions below 8.0 and WKWebView for versions overs 8.0.

Hope this helps.

Md. Ibrahim Hassan
  • 5,359
  • 1
  • 25
  • 45
  • 1
    Thank you! What confused me is exactly that we don't have any control over SFSafariViewController. I was wondering how could we achieve incognito mode in SFSafariViewController without having control over it. And the comment above just solved my question. Incognito mode is already in SFSafariViewController. Thank you again for help. – Todanley Jan 06 '17 at 05:48
  • Actually you cannot force any option onto SFSafariViewController as it is independent safari instance and you have no control over it from within your app. It would be highly appreciated if you could accept my answer. Thanks. – Md. Ibrahim Hassan Jan 06 '17 at 05:50
  • But how to do it in wkwebview/uiwebview ? – Shiva Mar 30 '17 at 19:30