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
2
votes
1 answer

XCTest: Tap "Done" button in SFSafariViewController

I'm opening a SFSafariViewController and can't find the "Done" Button to leave Safari again. Also if I try to solve it with a swipeRight XCode creates code that it can't use in a test afterwards let element = app.children(matching:…
netshark1000
  • 7,245
  • 9
  • 59
  • 116
2
votes
1 answer

Is there a way to determined what element is at a point in a WKWebView or SFSafariViewController view?

I would like to know what element is "under" a particular point in a web view. For example, in the screenshot below, I would like to know what element is at point 550x, 275y. I'm hoping to get the result: ​"Typhoon
Tjalsma
  • 187
  • 10
2
votes
1 answer

How to print SFSafariViewController full web page?

I am opening a pdf file in SFSafariViewController. Now I want to print this PDF from SFSafariViewController. But Share button of safari view controller does not have print option. Please tell me how to add print functionality to…
user2559369
  • 131
  • 1
  • 1
  • 6
2
votes
0 answers

SFSafariViewController: open file protected with OAuth

I need to display a PDF file stored on the server and protected with the OAuth scheme (i.e. the client should sent the token with each request). I'd also would like to have the share button available, which comes by default with…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
2
votes
0 answers

Automatic login for new app download after OAuth through a different app (iOS 11)

I have a website that allows sign-ins via OAuth, where a user may use a 3rd party iPhone app to log in. Later, if the same user on the same device downloads the official 1st party app through the App Store, I'd like to automatically log them in on…
Erich
  • 2,509
  • 2
  • 21
  • 24
2
votes
0 answers

How to get Bookmarks from iphone safari

I want to list out bookmarks from my iphone safari in my iOS application.But I couldn't find any tutorial related to this.Please help me to get some idea.
Madhumitha
  • 3,794
  • 8
  • 30
  • 45
2
votes
0 answers

Url loads via SafariViewController but not via WKWebView in iOS

I am running a demo project on iOS 11 device. There is a certain url which i am loading in SafariViewController using below code, which works fine. NSURL *url = [NSURL URLWithString:@"https://myCustomUrlHere"]; SFSafariViewController *svc =…
iPhoneDeveloper
  • 958
  • 1
  • 14
  • 23
2
votes
0 answers

SFSafariViewController's navigation bar color is not solid

I have a view controller and I am opening SFSafariViewController from one view controller to open a link. I have given a tink color to SFSafariViewController. But tint color which I am giving is not the same color which I have given to it. I have…
Akruti
  • 183
  • 1
  • 12
2
votes
1 answer

Sync with Safari - extension for SFSafariViewController

I know that SFSafariViewController has private cookie storage and other implementations. However, I know that we may write an extension for every (every native system) Swift class. I need either to share cookies with native Safari, or to open…
2
votes
0 answers

SFSafariViewController takes tint color few seconds after presenting

After i present SFSafariViewController for first time its "done" and other buttons are blue for one second, maybe even less and than it becomes my color. Second time i present SFSafariViewController it tint color is mine from start. let safariVc =…
Markicevic
  • 1,025
  • 9
  • 20
2
votes
1 answer

SFSafariViewController not dismissing properly (iOS 10.3)

In my app I have a SFSafariViewController that I am displaying modally. Upon dismissal, the presenting ViewController does not have its dismiss method called. Code for my subclass of UIViewController: override func present(_ viewControllerToPresent:…
BallpointBen
  • 9,406
  • 1
  • 32
  • 62
2
votes
0 answers

Handling failure requests in SFSafariViewController

How to handle failure requests in SFSafariViewController? After lot's of research, I came to know that no customization is possible with SFSafariViewController. I'm wondering how to handle failure requests in SFSafariViewController? Want to show an…
Sivajee Battina
  • 4,124
  • 2
  • 22
  • 45
2
votes
1 answer

Which one is better for OAuth process? SFSafariViewController? WKWebview?

I'm using SFSfariViewController for OAuth process. Using this I'm getting a quite well response. Whenever redirecting happens, it's opening my app. But when the request fails, I'm not able to show any alert to the user to indicate authentication…
Sivajee Battina
  • 4,124
  • 2
  • 22
  • 45
2
votes
1 answer

How to enable the developer features in safariviewcontroller?

How to enable the developer features in safariviewcontroller? I've attempted to do it via chrome://flags but It doesn't seem to be present, are there any third party APIs to accomplish this?
2
votes
0 answers

SFSafariViewController doesn't work in portrait mode

I am trying out the new SFSafariViewController on an iPad Pro in a simulator. It works in landscape but not portrait. Here's my code: NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"https://forums.greenrobot.com"]]; if…
Andy
  • 1,815
  • 2
  • 22
  • 49