Questions tagged [safariservices]
13 questions
16
votes
1 answer
Crash in UIKitCore [UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] iOS 12 only
I am getting decent number of crashes that are reported to Crashlytics. This only happens on iOS 12 and I do not know how to reproduce this. Perhaps the user is on WKWebView and trying to enter a password from the hint in 31 SafariServices …

Genki
- 3,055
- 2
- 29
- 42
4
votes
1 answer
Safari Web Extension Fails to Send Native Message
I'm trying to create a Safari Web Extension to my native app. I want to have a popup with a button which when clicked will communicate with my native app:
browser.runtime.sendNativeMessage({message: "Open Main App"}, function(response) {
…

RRN
- 1,127
- 1
- 12
- 37
4
votes
1 answer
NSExtensionRequestHandling not handling native messages
I'm trying to create a Safari Web Extension to my native app. I want to have a popup with a button which when clicked will communicate with my native app. Before I get to this part I have a problem sending a native message and handling it in…

mikro098
- 2,173
- 2
- 32
- 48
3
votes
1 answer
Using Safariservices swift how to code around the small black box
Using SFSafariViewController, works well but for some reason when I go to this webpage [knowitall.ch], it starts up by opening a zoomed view? with a small black box that I need to press to get the full webpage.
My code couldn't be simpler.
if let…

user3069232
- 8,587
- 7
- 46
- 87
2
votes
0 answers
Swift YouTube video in Full Screen & Auto Play with SFSafariViewController
Problem:
I would like SFSafariViewController to autoplay a YouTube video in full screen.
Code:
import SafariServices
@objc func handleYTTap(_ sender: UIGestureRecognizer) {
let youtubeVideoURL = "https://youtu.be/d9MyW72ELq0"
…

adalovelacy
- 95
- 6
2
votes
0 answers
How to redirect back to the app from SFSafariViewController
I want to redirect back to the app after an event (redirect to a universal link) happens on the SafarViewController. The only delegate function suitable is
func safariViewController(_ controller: SFSafariViewController, initialLoadDidRedirectTo URL:…

Tal Zion
- 6,308
- 3
- 50
- 73
1
vote
1 answer
Allow a self signed certificate in the SFSafariViewController
Is it possible to programmatically validate a self signed certificate in SFSafariViewController like in WKWebView with the delegate method ?
webView(_:didReceiveAuthenticationChallenge:completionHandler:)

Blazej SLEBODA
- 8,936
- 7
- 53
- 93
0
votes
0 answers
Do iOS Safari ServiceWorkers get shut down due to thermal state?
I'm working on an iOS Safari extension that has a ServiceWorker. Lately we've noticed that this ServiceWorker seems to get killed seemingly at random, and there are no logs or crash reports to tell us what happened.
I'm hypothesizing that iOS might…

Yuna
- 1
- 1
0
votes
0 answers
Passwordless single sign on using SFSafariViewController in swift
I integrate with safariService (SFSafariViewController) to log in through a single sign-on password, the problem was the first time I log in using SFSafariViewController the authentication does not complete the first time so the Safari browser still…

Eslam Abotaleb
- 21
- 3
0
votes
0 answers
How do I get rid of the bar above?
import SwiftUI
import SafariServices
struct ContentView: View {
@State var urlString = "http://pistore.info"
var body: some View {
VStack {
SafariView(url: URL(string: urlString)!)
}
…

DEUK_YEONG
- 51
- 4
0
votes
1 answer
How to execute code after pressing done in Safari?
I start Safari in an application and want to execute my code after I press Done. But the function func safariViewControllerDidFinish won't go into.
import SafariServices
class QRScannerController: UIViewController, WKNavigationDelegate,…

Anci
- 84
- 8
0
votes
1 answer
How do I create a Safari View in SwiftUI that uses a custom user agent?
I’m trying to create a SwiftUI app that uses a Safari view using the SafariServices framework and assign a custom user agent to that view so that websites believe that the web browser is Safari for macOS, when I’m really using Safari for iOS on…
user12537745
0
votes
2 answers
how do I use SFAuthenticationSession from nativescript?
I'm working on some SSO behavour in a nativescript application. I have the following Swift code that works correctly:
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
var…

Carl Ranson
- 1
- 1