@IBAction func clickedViewData(_ sender: Any) {
let fileManager = FileManager.default
let documentoPath = (self.getDirectoryPath() as NSString).appendingPathComponent("zip_2MB.zip")
if fileManager.fileExists(atPath: documentoPath){
let documento = NSData(contentsOfFile: documentoPath)
let activityViewController: UIActivityViewController = UIActivityViewController(activityItems: [documento!], applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView=self.view
present(activityViewController, animated: true, completion: nil)
}
else {
print("document was not found")
}
}
i have one Zip file i want to share as a .zip directly..but cant get proper solution to share .zip file..when i share file its share as data file.. i read some documents but cant get proper way for share zip file in activity controller.. please help to solve this problem.
Thank You