sfsafariviewcontroller

When can I use a SFSafariViewController, WKWebView, or UIWebView with universal links?

我的未来我决定 提交于 2019-12-02 22:19:21
In the Universal Links section of the iOS App Search Programming Guide , Apple says: If you instantiate a SFSafariViewController, WKWebView, or UIWebView object to handle a universal link, iOS opens your website in Safari instead of opening your app. However, if the user taps a universal link from within an embedded SFSafariViewController, WKWebView, or UIWebView object, iOS opens your app. What does "handle a universal link" mean? Can I not ever open the given URL with an SFSafariViewController , WKWebView , or UIWebView ? Does it only apply during -[UIApplicationDelegate application

Download documents with SFSafariViewController

瘦欲@ 提交于 2019-12-01 10:09:36
问题 Isn't SFSafariViewController able to download documents? I'm trying to do this, but the "Save to" dialog doesn't appear. From the same page opened in native Safari it opens. My implementation is basic: let svc = SFSafariViewController(URL: NSURL(string: self.urlString)!) present(svc, animated: true, completion: nil) 回答1: No, it's not possible to download file using SFSafariViewController. 来源: https://stackoverflow.com/questions/41518443/download-documents-with-sfsafariviewcontroller

Can I preload the web content for Safari View Controller?

眉间皱痕 提交于 2019-11-30 21:49:46
问题 I can create Safari View Controller without problem: let svc = SFSafariViewController(URL: NSURL(string: remote_url)!, entersReaderIfAvailable: true) self.presentViewController(svc, animated: true, completion: nil) Is there any way I can preload the URL before I present the view controller to the user? For example, I can preload the URL (web content) in the background first, and after the user clicks on something, I can show the Safari View Controller with the content right away. The user

Could not signal service com.apple.WebKit.WebContent

孤者浪人 提交于 2019-11-30 00:18:51
问题 I use the Shopify Mobile Buy SDK for iOS and I can't get a callback from their payment web view. For some reason the warnings: 2016-11-25 21:17:25.945267 Drool[3328:799969] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2016-11-25 21:17:25.977316 Drool[3328:799969] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service 2016-11-25 21:17:26.105947 Drool[3328:799969] [App] if we're in the real pre-commit handler we

SFSafariViewController: Hide navigation bar

倾然丶 夕夏残阳落幕 提交于 2019-11-29 07:43:27
I was able to get my app to automatically load a url via the SFSafariViewController per this post , and it works great, the only drawback is the navbar. The SFSafariViewController navbar is kind of useless when being used this way, as the url is read-only, and the 'done' link doesn't do anything but reload the page. As such, I would like to hide the navbar altogether. Per the comments attached to accepted answer, it was suggested to set my root view controller to SFSafariViewController which I can't get working. The setup is simple as there is a single view controller with the code included in

iOS10 SFSafariViewController not working when alpha is set to 0

时光毁灭记忆、已成空白 提交于 2019-11-29 06:59:28
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 = self; safari.modalPresentationStyle = UIModalPresentationOverCurrentContext; safari.view.alpha = 0.0; safari.view.hidden = true; [self dismissViewControllerAnimated:false completion:nil]; NSLog(@"[referrerService - StoreViewController] presenting safari VC"); [self presentViewController:safari animated:false completion:nil]; This works well on iOS 9. but

How to clear SFSafariViewController credentials?

爷,独闯天下 提交于 2019-11-29 00:26:42
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. I've tried using the following: let allCreds = NSURLCredentialStorage.sharedCredentialStorage().allCredentials for (protectionSpace, userCredsDict) in allCreds { for (_, cred) in userCredsDict { print("DELETING CREDENTIAL") NSURLCredentialStorage.sharedCredentialStorage().removeCredential(cred, forProtectionSpace: protectionSpace, options: [

Google + login iOS App rejection from appstore using google sdk v3.x

孤街浪徒 提交于 2019-11-28 20:54:08
After digging a lot I am here posting my problem. I am using google sign in latest sdk in my app and the app supports iOS 8+. I am using Xcode 7.2 currently. Recently my app got rejected with the very common reason which many users have experienced in the past: FROM APPSTORE We noticed that the user is taken to Safari to sign in or register for an account, which provides a poor user experience. Specifically, Google log in takes users to Safari to sign in. Next Steps 10.6 Please revise your app to enable users to sign in or register an account in the app. We recommend implementing the Safari

SafariViewController: How to grab OAuth token from URL?

和自甴很熟 提交于 2019-11-28 05:57:56
Trying to use Facebook OAuth with the SafariViewController. First I open the authURL with SafariViewController, which if the user is logged in to Facebook on Safari, will redirect them and return an OAuth URL with the token for that specific service, e.g. Instagram RESPONSE: https://www.facebook.com/connect/login_success.html#access_token=BLAHTOKENRESPONSE&expires_in=5114338 When SafariViewController has redirected I want to grab the response URL and store it so I can grab the token. Here is my code: import SafariServices let kSafariViewControllerCloseNotification =

SFSafariViewController: Hide navigation bar

半世苍凉 提交于 2019-11-28 01:07:31
问题 I was able to get my app to automatically load a url via the SFSafariViewController per this post, and it works great, the only drawback is the navbar. The SFSafariViewController navbar is kind of useless when being used this way, as the url is read-only, and the 'done' link doesn't do anything but reload the page. As such, I would like to hide the navbar altogether. Per the comments attached to accepted answer, it was suggested to set my root view controller to SFSafariViewController which I