handle incoming url for appclip

This commit is contained in:
Hailey
2024-06-16 19:09:26 -07:00
parent 10d4d10714
commit 07696d8eb7
3 changed files with 33 additions and 7 deletions
+9 -3
View File
@@ -12,9 +12,15 @@ class ViewController: UIViewController {
webView.contentMode = .scaleToFill
self.view.addSubview(webView)
if let url = URL(string: "http://localhost:19006/start/haileyok.com/3kuw7byr7gd2x?clip=true") {
webView.load(URLRequest(url: url))
self.webView = webView
}
func handleURL(url: URL) {
let urlString = "\(url.absoluteString)?clip=true"
if let url = URL(string: urlString) {
self.webView?.load(URLRequest(url: url))
}
}
}