Questions tagged [sfsafariviewcontroller]

Controller which allow you to present web content within the app.

The new SFSafariViewController class enables you to deliver interactive web content in your app just like Safari, including the key Safari UI elements already familiar to your users. See how to easily bring Safari features like Reader and AutoFill into your app, and provide a great web viewing experience with fewer lines of code.

309 questions
4
votes
1 answer

Is it possible to load local pdf file on SFSafariViewController?

I tried with WKWebViewController, but still not working. url = [[NSBundle mainBundle] URLForResource:@"manual_eos_1d_x" withExtension:@"pdf"]; WKWebViewController * controllerweb = (WKWebViewController *)[segue…
4
votes
0 answers

Preload web-page request in SFSafariViewController, before presenting

Hi I'm using SFSafariViewController in my app. I want to preload / pre cache Webpage URL request in SFSafariViewController. So that web page is already loaded and rendered before presenting it. I get on an average 5 seconds before user triggers…
Amit Tandel
  • 883
  • 7
  • 16
4
votes
0 answers

Does SFSafariViewController and Safari web browser share cookies and Web-storage completely?

Hi i'm having issues with using SFSafariViewController. What i'm trying to achieve is get in app browsing experience as close as Safari browsing. So that user don't feel any difference weather he is in Safari or inside the app. This works well with…
Amit Tandel
  • 883
  • 7
  • 16
4
votes
1 answer

SFSafariViewController - Interacting with the parent app from a web-page

I'm trying to research a way to load a web view controller into an iOS app, such that the web page can communicate data back up to the parent. Is this possible with SFSafariViewController? Is there some mechanism like post-messaging, which will let…
bluepnume
  • 16,460
  • 8
  • 38
  • 48
4
votes
2 answers

Set Done Button Colour on SFSafariViewController

I am using the SFSafariViewController to access a website called from a UITableViewController. Because my app has a very light feel attached to it, I have added the following line of code in the AppDelegate: self.window.tintColor = [UIColor…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
3
votes
0 answers

Disable pull down dismissal of SFSafariViewController

Is it possible to disable the pull down dismissal gesture of SFSafariViewController? It seems like the SFSafariViewController runs in its own window, hence, setting isModalInPresentation or even setting the presentationControllerShouldDismiss(_:)…
Martin Dinh
  • 213
  • 1
  • 8
3
votes
1 answer

Can I get cookies from Safari in a SFSafariViewController?

tl;dr; see the question below In my app, I have a login that uses SFSafariViewController and ASWebAuthenticationSession that follows the OAuth 2.0 flow (Using the AppAuth library). The login works and the cookies are shared with Safari as expected.…
Adriano
  • 482
  • 5
  • 18
3
votes
0 answers

Unable to open MS Word and PDF docs with SFSafariViewController in latest iOS 13.0

We are trying to use SFSafariViewController to browse a Word document from our iOS Mobile app using Swift as it gives ReaderView and Font Increase/Decrease within the App. Everything works as expected on the Simulator with 12.2 ios version, however…
kriskk
  • 53
  • 3
3
votes
0 answers

indexDB is not persisting in SFSafariViewController

Given the script: function test() { let req = window.indexedDB.open("testingdb", 1); req.onupgradeneeded = evt => { let db = evt.target.result; if (!db.objectStoreNames.contains("keys")) { db.createObjectStore("keys", { keyPath:…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
3
votes
0 answers

Target _blank links not opening in SFSafariViewController

I'm using the following code for opening an URL with SFSafariViewController: import UIKit import SafariServices class ViewController: UIViewController, UITextViewDelegate { override func viewDidLoad() { super.viewDidLoad() …
David
  • 2,898
  • 3
  • 21
  • 57
3
votes
1 answer

What is the default behaviour of 'Done' in SFSafariViewController?

I am using SFSafariViewController to display app-related information (e.g. About, Support, T&C) from websites via the Settings view. In the Settings view, there is a table with static cells. After implementing the following codes in the Settings…
J100
  • 3,896
  • 2
  • 11
  • 18
3
votes
1 answer

Create SSO using SFAuthenticationSession in iOS 11

I'm working on two iOS applications that share the same keychain tokens which they receive when the user logs-in in either of the apps by entering his username and password in a web view. The tokens saved saved in the keychain, are time limited for…
3
votes
2 answers

MKMapView error and SFViewController error

I get an error whenever I try to use a mapview "Use of undeclared type of MKMapView" and "Use of undeclared type MKMapViewDelegate." I also get the error when trying to call an SFSafariViewController. For the first two, the code is class…
Cameron L
  • 111
  • 6
3
votes
2 answers

How to implement SSL Pinning on SFSafariViewController?

In my app, I've set up SSL Pinning on all my REST requests with the help of AFNetworking. This helps prevent MITM attacks. When I test my app using Charles proxy as the "man in the middle", the requests fail as expected. However, this is not the…
3
votes
0 answers

SFSafariViewController embedded in UISplitViewController doesn't refresh after collapsing using displayModeButtonItem

I have a SFSafariViewController embedded in the detail panel of a UISplitViewController which is set to UISplitViewControllerDisplayModeAllVisible. This works perfectly well. What I want to do is to be able to hide the master view. This works by…
MichaelR
  • 1,681
  • 15
  • 28