I have an app that is configured so that PDFs in other applications such as mail, I can hold down on the PDF and it will have the open to "open in" my app; I have that working and my app opens, but now I want to display that document in my app, how do I do that? I am pretty sure that I have to use AppDelegate, but I just started using Swift and am completely lost and cannot find a tutorial that helps with this task, so any help would be appreciated.
AppDelegate.swift
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let UIApplicationLaunchOptionsURLKey: String = ""
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
if UIApplicationLaunchOptionsURLKey.isEmpty {
print("String is empty.")
}
else{
let alertView:UIAlertView = UIAlertView()
alertView.title = "PDF UPLOAD"
alertView.message = "??"
alertView.delegate = self
alertView.addButtonWithTitle("OK")
alertView.show()
}
return true
}