diff options
author | Hailey <me@haileyok.com> | 2024-09-26 12:37:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-26 12:37:51 -0700 |
commit | 7ee67e4e7e10a808f8e885efea4caf0465ee9619 (patch) | |
tree | 871ffa8fad2b864a67da4a067b50c50a932ad998 /modules | |
parent | 175df72972343795a67be208e58edb02267e1ced (diff) | |
download | voidsky-7ee67e4e7e10a808f8e885efea4caf0465ee9619.tar.zst |
[Share Extension] Move away from deprecated API, implement JS side of things (#5509)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/Share-with-Bluesky/ShareViewController.swift | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/Share-with-Bluesky/ShareViewController.swift b/modules/Share-with-Bluesky/ShareViewController.swift index e166c22d2..46851a0d7 100644 --- a/modules/Share-with-Bluesky/ShareViewController.swift +++ b/modules/Share-with-Bluesky/ShareViewController.swift @@ -23,7 +23,7 @@ class ShareViewController: UIViewController { await self.handleUrl(item: firstAttachment) } else if firstAttachment.hasItemConformingToTypeIdentifier("public.image") { await self.handleImages(items: attachments) - } else if firstAttachment.hasItemConformingToTypeIdentifier("public.video") { + } else if firstAttachment.hasItemConformingToTypeIdentifier("public.movie") { await self.handleVideos(items: attachments) } else { self.completeRequest() @@ -107,7 +107,7 @@ class ShareViewController: UIViewController { let data = try? Data(contentsOf: dataUri) try? data?.write(to: tempUrl) - if let encoded = dataUri.absoluteString.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed), + if let encoded = tempUrl.absoluteString.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed), let url = URL(string: "\(self.appScheme)://intent/compose?videoUri=\(encoded)") { _ = self.openURL(url) } @@ -150,7 +150,8 @@ class ShareViewController: UIViewController { var responder: UIResponder? = self while responder != nil { if let application = responder as? UIApplication { - return application.perform(#selector(openURL(_:)), with: url) != nil + application.open(url) + return true } responder = responder?.next } |