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

Detect URL change in SFSafariViewController

I have a SFSafariViewController which opens when a user taps on a link in my app. I need to detect when the URL is changed, such that when it changes, the app displays an alert. How do we detect URL changes in SFSafariViewController?
user2181948
  • 1,646
  • 3
  • 33
  • 60
8
votes
2 answers

What is the main advantage of using SFSafariViewController?

I am not getting proper understanding of what is the main adavantage of using SFSafariViewController, if we are using [[UIApplication sharedApplication] openUrl: strUrl]; What are the difference between both?
Gourav Joshi
  • 2,419
  • 2
  • 27
  • 45
8
votes
0 answers

Get url SFSafariViewController once it's fully loaded

I'm using a SFSafariViewController. The initial url that loads redirects to another url. I need to get the current url bar that SFSafariViewController has. It's successfully redirecting because I can see it in the url bar but I got no access not…
JoseMartinFit
  • 335
  • 4
  • 13
8
votes
4 answers

Login doesn't work/stuck with Latest Facebook SDK

I am running with an issue with using Facebook SDK(4.9.1) which opens in app browser for login if no system account present. Login from system Facebook account works well. I am using the following code FBSDKLoginManager *manager =…
iphonic
  • 12,615
  • 7
  • 60
  • 107
8
votes
1 answer

embedding Javascript in SFSafariViewController

I'm not sure if it's possible. I'm currently developing an app the stores password (like a password manager). One of its features is to allow user to make an auto login to a web browser of that device. I was able to make it work using UIWebView and…
mCube
  • 334
  • 3
  • 8
7
votes
1 answer

Recognize return url inside Chrome Custom Tabs and SFSafariViewController in Flutter

I have a project where customers are redirected to complete a payment request on their bank's url opened in in-app browser (Chrome Custom Tabs on Android or SFSafariViewController on iOS). App is written in Flutter and we uses flutter_inappwebview…
7
votes
4 answers

iOS10 SFSafariViewController not working when alpha is set to 0

I'm using SFSafariViewController to grab user's cookie in my app. Here's is my code: SFSafariViewController *safari = [[SFSafariViewController alloc]initWithURL:[NSURL URLWithString:referrerUrl] entersReaderIfAvailable:NO]; safari.delegate =…
oriharel
  • 10,418
  • 14
  • 48
  • 57
7
votes
2 answers

SFSafariViewControllerDelegate methods not called when assigning delegate to something other than view controller

I have a simple view controller that presents a SFSafariViewController when a link button is tapped. #import "ViewController.h" #import "SafariDelegate.h" @interface ViewController () @property(nonatomic, strong) NSString…
Reginald Meow
  • 73
  • 1
  • 3
7
votes
2 answers

Differentiate requests from MobileSafari vs. SafariViewController

For a web application, is there a way (either client- or server-side) to differentiate requests coming from MobileSafari vs. SafariViewController (embedded in any 3rd party app)? I need this because SafariViewController doesn't support universal…
Ortwin Gentz
  • 52,648
  • 24
  • 135
  • 213
7
votes
1 answer

SFSafariViewController done button not working

I have a test ViewController which is embedded in a NavigationController. In test ViewController I have a WebView button. When I click on that button it navigates to SafariViewController and it's loading given URL. In that WebView when I click on…
vishnu
  • 715
  • 9
  • 20
7
votes
1 answer

How to clear SFSafariViewController credentials?

I'm using SFSafariViewController in Swift 2 to display web pages on an iPad Air 2 with ios 9.1 (13B143). Each of the web pages requires credentials from the user. However, when the user presses a logout button, I need to clear those credentials. …
astidham2003
  • 966
  • 1
  • 11
  • 33
6
votes
0 answers

Solve issue with non blocking functions on a cordova app for IOS 13 (alert / confirm)

I have a cordova app that runs on iPads and I recently got a very strange behavior with the new IPadOS 13+. Some javascript native functions that should block the code flow and waits for user inputs ( like window.alert or window.confirm ) are no…
6
votes
3 answers

Closes SFSafariViewController on a certain url

I am trying to close SFSafariViewController when I reach a certain page. But I am unable to do it until the "Done" button is pressed explicitly by the user. What I want is to get the URL as soon as it reached a certain page and then dismiss the…
Moaz Khan
  • 1,272
  • 1
  • 13
  • 28
6
votes
3 answers

Facebook Login doesn't doesn't dismiss Login Dialog after login

Using LoginManager from the Facebook iOS SDK to login like so: let loginManager = LoginManager() loginManager.logIn([.publicProfile, .email], viewController: self) { (loginResult) in The Login Dialog opens facebook.com through Safari, which has a…
6
votes
0 answers

Peek & pop link and show it on Safari View Controller

My app has a textView which detects links, when I peek on a link it shows the web page preview but when it pops it opens the Safari app instead of the Safari View Controller. I have implemented the 'shouldInteractWith url' method from the…
Daniel Illescas
  • 5,346
  • 3
  • 17
  • 23
1 2
3
20 21