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

How can I logout in my SFSafariViewController

I made app which login in SFSafariViewController. It works well when login. but after I logout if I try to login it again, I'm already logged in. This is because my automatic login information is stored in SFSafariViewController. I tried to delete…
PArk
  • 51
  • 1
4
votes
0 answers

Flutter iOS close SFSafariViewController after stripe payment is complete

I've integrated stipe payment into a Flutter (using this plugin https://pub.dev/packages/stripe_payment) app and it all works fine except for the fact that stripe's 3d secure safari view controller is never closed after the payment is complete so…
4
votes
0 answers

IOS SFSafariView clear session

I'm encountering an issue with SFSafariVewController that when I logout and login without restarting the app, the login happens automatically by session/cookie data. If I restart the app after logout, this does not happen, meaning that it's session…
4
votes
2 answers

SafariViewControllerDidFinish does not fire when swiping down to dismiss

I have a delegate on a SFSafariViewController that does clean up tasks in the safariViewControllerDidFinish event. In iOS 13+, the user is able to swipe down to dismiss, but this event is not fired in that case. I do not want to disable this gesture…
TruMan1
  • 33,665
  • 59
  • 184
  • 335
4
votes
1 answer

Using SFSafariViewController instead of ASWebAuthenticationSession/SFAuthenticationSession for OAuth

Our user experience team does not like the consent popup every time login page is opened. Also, we are looking to customize the look of the browser window presented when OAuth is implemented using…
4
votes
1 answer

Caching websites for offline use with SFSafariViewController

I am using the following code to display a website in my app. let webVC = SFSafariViewController(url: myUrl) present(webVC, animated: true) Now, I want to add offline reading. I know that iOS has a reading list, which apparently caches articles…
NikxDa
  • 4,137
  • 1
  • 26
  • 48
4
votes
1 answer

How to auto close a Safari View Controller or Chrome Custom Tab and return to the mobile app?

My mobile app (React Native) uses a Web View (Chrome Custom Tabs on Android and Safari View Controller on iOS) for a small user flow within the app. At the end of the process the web view should close and return to the app. I've managed to make it…
4
votes
1 answer

SFSafariViewController missing top bit on iphoneX

I made tint colour black to better demonstrate this, but for SFSafariViewController is missing top bit on iphoneX. I checked twitter and theirs is present. If I scroll down I can see website contents where the missing bit is
Ilja
  • 44,142
  • 92
  • 275
  • 498
4
votes
1 answer

How to change SFSafariviewController's Title in swift?

I am Opening web page in Application using SFSafariViewController. I used below code to open SafariViewController: let url = URL.init(string: myURL) let safari = SFSafariViewController(url: url!) self.presentVC(vc: safari) It is working fine.…
user8719510
  • 133
  • 2
  • 12
4
votes
0 answers

iOS 11 webview audioplayer in background

Since update on iOS 11 my audioplayer in a webview stops when the app is in background. On iOS 10 the player keeps playing. Anyone else having the same problem and a fix for this?
simon
  • 111
  • 1
  • 4
4
votes
0 answers

Universal link fails when OAuth2 login page redirects immediately

I'm trying to implement an OAuth2 authorization code flow as part of my iOS app. I open the third party's OAuth2 login page in an SFSafariViewController, and the url that I pass to the Safari controller includes an https redirect uri that is a…
4
votes
0 answers

Inspecting contents from SFSafariViewController on iPhone

We have an Ionic app and are trying to make use of "embedded Safari" version for displaying web contents - SFSafariViewController. We use cordova-plugin-browsertab plugin. The problem is - how to debug/inspect anything from inside that embedded…
Adam Szmyd
  • 2,765
  • 2
  • 24
  • 32
4
votes
2 answers

SFSafariViewController loses state when returning to app

My app has a web-based online payment flow — using Adyen Hosted Payment Page (HPP) — in SFSafariViewController (as recommended by Adyen). When a payment flow happens entirely inside Safari, this works very well. But some banks use their native iOS…
villapossu
  • 2,737
  • 4
  • 18
  • 19
4
votes
0 answers

Is there a way to detect from Javascript if webpage is open in SFSafariViewController or mobile-safari?

Usually it is easier to detect UIWebViews because their user agent is often different from safari's, but SFSafariViewController use exact same user agent. On newly released iOS 10, I am running into certain HTML5 video issue which is only occurring…
codneto
  • 2,319
  • 3
  • 24
  • 36
4
votes
2 answers

loadHTMLString: analoge in SFSafariViewController

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?
daleijn
  • 718
  • 13
  • 22