How to hide "Share option" and take user directly to the "Save to Files" Screen in Swift

Viewed 150

I have gone through different stackoverflow questions or developer's forums but I am unable to find any answer.

The questions previously asked is about previewing files and then hiding the Share button on the right top of your screen.

Whereas, my question is related to using UIDocumentInteractionControllerDelegate and only allowing user to perform one action i.e. Save to Files

Currently, this popup opens which gives me option to Share and Save to Files Share and Save to Files

Whereas, I want my controller to directly navigate to this screen:

enter image description here

I have written following code:

    func openUrl(url : URL) {
    self.documentInteractionController = UIDocumentInteractionController(url: url)
    self.documentInteractionController.delegate = self
    ProgressIndicator.hideHud()
    let isValidAppAvailable = self.documentInteractionController.presentOpenInMenu(from: self.view.frame, in: self.view, animated: true)
    
    if (!isValidAppAvailable){
        AlertManager.showAlert(self.getMessage(messageId: Messages.noCompatibleApplicationFound.rawValue))
    }
}

Any help on how to directly open Save to Files from code would be appreciated.

0 Answers
Related