I am new in IOS and I want to view a PDF file using Adobe Acrobat application which is installed on my iPhone.The Pdf file which I want to view in Adobe acrobat coming from web service in base64 format.I have converted in bytes than in .pdf format.My pdf is now in .pdf format.But now how to open this pdf in Adobe Acrobat. In my code temper is the path of my pdf.
@IBAction func savePDF(_ sender: Any) {
let pdfData = Data(base64Encoded: FilePDF, options: .ignoreUnknownCharacters)
let array = pdfData?.withUnsafeBytes
{
[UInt8](UnsafeBufferPointer(start: $0, count: (pdfData?.count)!))
}
let data = NSData(bytes: array, length: (array?.count)!);
let tmpDir = NSTemporaryDirectory()
data.write(toFile: tmpDir.appending("HandyHR_File_YEAR.pdf"), atomically: true)
print(array!)
print(data)
print(tmpDir)
}