How to preview downloaded file before saving?

I am writing an Xamarin.iOS app, but an answer in native iOS would suffice. In my code, I download a file (a pdf or png file), and then give a notification when the download is complete so the user can view it:

using var configuration = NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(Identifier);
var session = NSUrlSession.FromConfiguration(configuration, new UrlSessionDelegate(this), null);

using var url = NSUrl.FromString(downloadUrl);
using var request = new NSMutableUrlRequest(url);
var keys = new object[] { "Authorization" };
var objects = new object[] { new AuthenticationHeaderValue("Bearer", token).ToString() };
var dictionnary = NSDictionary.FromObjectsAndKeys(objects, keys);
request.Headers = dictionnary;
downloadTask = session.CreateDownloadTask(request);

// In my delegate
public void DidFinishDownloading(NSUrlSession session, NSUrlSessionDownloadTask downloadTask, NSUrl location)
    NSFileManager fileManager = NSFileManager.DefaultManager;

    string fileName = controller.Download.FileName ?? location.LastPathComponent.Split(".")[0] + ".pdf";

    var URLs = fileManager.GetUrls(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomain.User);
    NSUrl documentsDictionry = URLs[0];

    NSUrl originalURL = downloadTask.OriginalRequest.Url;
    NSUrl destinationURL = documentsDictionry.Append(fileName, false);
    NSError removeCopy;
    NSError errorCopy;

    fileManager.Remove(destinationURL, out removeCopy);
    bool success = fileManager.Copy(location, destinationURL, out errorCopy);

    controller.ViewModel.IsBusy = false;

    if (!success)
    } else
        UNUserNotificationCenter.Current.GetNotificationSettings((settings) => {
            var alertsAllowed = (settings.AlertSetting == UNNotificationSetting.Enabled);

            if (alertsAllowed)
                var content = new UNMutableNotificationContent
                    Title = "Title text",
                    Body = "Body text",
                    Badge = 1,

                    UserInfo = new NSDictionary(new NSString("location"), new NSString(destinationURL.ToString()))

                var trigger = UNTimeIntervalNotificationTrigger.CreateTrigger(1, false);
                var requestID = "myNotificationRequest";
                var request = UNNotificationRequest.FromIdentifier(requestID, content, trigger);

                UNUserNotificationCenter.Current.AddNotificationRequest(request, (err) => {
                    if (err != null)

After it downloads and I get the notification and I tap on it, I am prompted with a screen to save it to my iPhone or send it somewhere (with the share icon at the top right). How can I at least preview the file before saving it to my device?

Source: Xamarin.ios Questions