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
0
votes
0 answers

iOS15: How to add a custom activity button to an SFSafariViewController?

In iOS15, there is a new API to SFSafariViewController.Configuration that suggest one can add a custom button on the SafariViewController UI. This blogpost explains this in greater detail, under "Running custom extension". I've been trying to…
gardenofwine
  • 1,344
  • 2
  • 15
  • 24
0
votes
0 answers

How to get URL in SFSafariViewWrapper if change

I have following code, that display SafariView in sheet. Button(action: {self.showLogin = true}) { Text("OpenURL") } .sheet(isPresented: self.$showLogin) { SFSafariViewWrapper(url: URL(string: "https://google.com")!) } How can i get URL,…
0
votes
1 answer

SFSafariViewController breaks when debugger is not attached

I'm encountering a very strange issue while trying to migrate from my custom web view controller which was using WKWebView to SFSafariViewController. With a debugger attached, on a simulator or device, when I present an SFSafariViewController,…
Logan Shire
  • 5,013
  • 4
  • 29
  • 37
0
votes
0 answers

iOS: make website only embeddable inside my application

I'm building an iOS app for a company whose website currently makes use of an embedded webpage for login/account creation. This embedded webpage handles some cryptographic logic that is complex to replicate. On the web, they restrict what external…
Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56
0
votes
1 answer

iOS SwiftUI App Clip WKWebView and SFSafariViewController do not work

I have a SwiftUI app that launches WKWebView for Twitter, Facebook, etc. The same view in an App Clip won't launch the WKWebView. I tried SFSafariViewController too. These are not listed as frameworks that provide limited to no functionality at…
Jim Peters
  • 281
  • 3
  • 8
0
votes
1 answer

How to selectively open other apps on iOS using UIApplication.shared.open

I have an app that allows users to open URLs. These can be handled via a SafariView, but if an app has registered to handle the URL, I'd like to use: if UIApplication.shared.canOpenURL(url) { UIApplication.shared.open(url, options: [:],…
0
votes
1 answer

Is it possible to edit the animation when dismissing SFSafariViewController using Swift?

I have some custom animation in my project that I'd rather keep, but when navigating back from another view the animation occurs before my own animations causing a clunky delay. I have a solution for my custom views like…
0
votes
1 answer

Opening universal links in embedded SFSafariViewController

Im currently working on an integration of a secure login provider and their SDK uses a modal SFSafariView to open a login page. The Requirements differ from what they offer as standard, where we need to have a guest button that closes the modal and…
0
votes
2 answers

Conflict using List/ScrollView with SFSafariViewController fullscreen sheet

I am trying to make a list of items each item should open a sheet with SFSafariViewController in full screen. To show SFSafariViewController in full screen, I used the code available in this link:…
Abdullah
  • 624
  • 6
  • 15
0
votes
2 answers

Web on mobile - Open URLs in full browser apps when navigating from Chrome Custom Tabs or Safari ViewController

I have a web page that is often launched from inside an Android/iOS app in their respective "tab system", Chrome Custom Tabs / SFSafariViewController. The requirement I have is to have some urls redirect and open in the full browser app instead of…
MadDim
  • 543
  • 6
  • 22
0
votes
2 answers

Handle completion if no success when opening url with SafariViewController

Is there a way to handle the case if SafariViewController fails to open a url like you can with UIApplication.shared.open? This is my function: if ["http", "https"].contains(url.scheme?.lowercased() ?? "") { // Can open with…
Chris
  • 1,828
  • 6
  • 40
  • 108
0
votes
1 answer

Safari Web Extension - injecting script only when extension button is clicked

To keep it simple, I am taking reference for SeaCreator extension example from Apple. You can take it from here: https://drive.google.com/file/d/1loBDgkJAEtyh0QehOUlgOSyUnW9ZZDk6/view?usp=sharing In this example as mentioned, we are replacing fish…
0
votes
2 answers

flutter: SFSafariViewController doesn't open like a native iOS modal

In order to use SFSafariViewController in my Flutter app, I am using this package: flutter_inappwebview: ^3.3.0+3 While this works, there is a bug in the animation through which the SFSafariViewController appears. Notice this: Actual…
Ayush Shekhar
  • 1,483
  • 4
  • 16
  • 32
0
votes
1 answer

Safari view in swiftui displaying empty view

Hi everyone I am trying to display safari view as full screen modal using ZStack ZStack { HStack { VStack { Safari(url: url) } } …
0
votes
1 answer

How to disable javaScript in SFSafariViewController?

We can disable javaScript in WKWebKit using preference. let preferences = WKPreferences() preferences.javaScriptEnabled = false let configuration = WKWebViewConfiguration() configuration.preferences = preferences let WebViewKit = …
Manikandan
  • 1,195
  • 8
  • 26