Is it possible to load content to SFSafariViewController like it was in UIWebView with loadHTMLString:
method? I tried to find anything about it, but it seems that SFSafariViewController can show only Internet data, is it true?
Asked
Active
Viewed 2,515 times
4

daleijn
- 718
- 13
- 22
2 Answers
2
You can only load url in SFSafariViewController
. It's an in-app Safari.

Lumialxk
- 6,239
- 6
- 24
- 47
-
Can I create url to local resource and pass to it? – daleijn Jul 12 '16 at 12:32
-
@daleijn Someone said you can load PDF. http://stackoverflow.com/questions/36608389/is-it-possible-to-load-local-pdf-file-on-sfsafariviewcontroller – Lumialxk Jul 12 '16 at 12:36
1
PFA Screenshot of safariServices framework
SFSafariViewController only support URLS and that of type http:// and https://
SFSafariViewController not support URL that are created from bundle or Document Directory resouces as they are starts with private:// or File://
So What you can do is
- Create local server in iOS app,
- Host that file on local server,
- and pass that url to SFSafariViewController.

Nayantara Jeyaraj
- 2,624
- 7
- 34
- 63

Amit Dhadse
- 31
- 2