From 142daae0152fe258cbe5076419b8e9f397a45d18 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 9 May 2021 22:49:47 -0700 Subject: [PATCH] Use item provider for sharing images --- View Controllers/ImageViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/View Controllers/ImageViewController.swift b/View Controllers/ImageViewController.swift index 374806c..c1a9797 100644 --- a/View Controllers/ImageViewController.swift +++ b/View Controllers/ImageViewController.swift @@ -194,7 +194,9 @@ extension ImageViewController { func presentActivityViewController() { if let image = imageView.image { - let activityViewController = UIActivityViewController(activityItems: [image], applicationActivities: []) + let activityViewController = UIActivityViewController( + activityItems: [NSItemProvider(object: image)], + applicationActivities: []) if UIDevice.current.userInterfaceIdiom == .pad { activityViewController.popoverPresentationController?