I am trying to invoke an external application such as Numbers (.numbers) or Safari (.htm). I have tested this with an internet URL and this works (with slight changes to the code here). I tried to use a htm to invoke Safari local access but no joy. canOpenURL returns true Resp var) however openURL returns false (Resp2). I am not fixed to this code if there is some other way to do this or are there some restrictions with swift and the iOS simulator?
var txtPath = NSString(string:NSBundle.mainBundle().pathForResource("ReadMe", ofType: "htm")!)
let targetURL=NSURL(fileURLWithPath: txtPath)
let application=UIApplication.sharedApplication()
var Resp=application.canOpenURL(targetURL!)
var Resp2=application.openURL(targetURL!);