View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 2021.3.29 or later
- Package size
- 28 KB
- Files
- 6
- Favorites
- 5
- Views in the past week
- 9
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $4.99 on
Browse with Safari View Controller for iOS
Price $9.99
Buy on Asset Store (opens in new tab)
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 1
Browse with Safari View Controller for iOS screenshot 1
About this asset
SFSafariViewController is part of the SafariServices framework, and lets your users browse a web page, or a website right inside your app. With it, people can enjoy the same web browsing experience they get in Safari — including features like Password Autofill, Reader, and Secure Browsing — without ever having to leave your app.
When should I use SFSafariViewController?
When you want display websites inside your app without sending people to Safari, the best tool is SFSafariViewController. By using this API, you can effectively embed the Safari interface — and many of its key features and privacy protections — into your app.
SFSafariViewController is best used when you need to display interactive web experiences on websites you don’t own, or showcase parts of your web content that are generally outside the scope of your app.
Usage
● Call SafariViewController.OpenURL(string url) to open an URL in embedded Safari web view
● Subscribe to events: SafariViewController.DidCompleteInitialLoad, SafariViewController.InitialLoadDidRedirectToURL, SafariViewController.ViewControllerDidFinish
● Call SafariViewController.Close() to close Safari web view (for example, if a deep link has been activated)
FAQ
● Can I control Safari View Controller? No, you can only launch it and close.
● Can I get a page URL and HTML from Safari View Controller? No, you need WKWebView for this.
● Can I detect redirecting from the initial page? Yes, subscribe to SafariViewController.InitialLoadDidRedirectToURL. If it was a deep link to your app, subscribe to Application.deepLinkActivated.
● Can I use it for OAuth authorization? Yes!
Links
● Documentation
● Should I use WKWebView or SFSafariViewController for web views in my app?
When should I use SFSafariViewController?
When you want display websites inside your app without sending people to Safari, the best tool is SFSafariViewController. By using this API, you can effectively embed the Safari interface — and many of its key features and privacy protections — into your app.
SFSafariViewController is best used when you need to display interactive web experiences on websites you don’t own, or showcase parts of your web content that are generally outside the scope of your app.
Usage
● Call SafariViewController.OpenURL(string url) to open an URL in embedded Safari web view
● Subscribe to events: SafariViewController.DidCompleteInitialLoad, SafariViewController.InitialLoadDidRedirectToURL, SafariViewController.ViewControllerDidFinish
● Call SafariViewController.Close() to close Safari web view (for example, if a deep link has been activated)
FAQ
● Can I control Safari View Controller? No, you can only launch it and close.
● Can I get a page URL and HTML from Safari View Controller? No, you need WKWebView for this.
● Can I detect redirecting from the initial page? Yes, subscribe to SafariViewController.InitialLoadDidRedirectToURL. If it was a deep link to your app, subscribe to Application.deepLinkActivated.
● Can I use it for OAuth authorization? Yes!
Links
● Documentation
● Should I use WKWebView or SFSafariViewController for web views in my app?
From the publisher's Asset Store listing.