_audiofileURL = NSURL(string: NSTemporaryDirectory() + "filename")!.URLByAppendingPathExtension("caf")
var shareView = UIActivityViewController!(nil) shareView = UIActivityViewController(activityItems: [_audiofileURL!], applicationActivities:nil ) self.presentViewController(shareView,animated:true,completion: nil )
OK, I sorted this particular problem, I was deleting the file in the viewWillDisappear function.The funny thing is, if I skip using the temp dir and just save the file in the Documents dir, it works, however it only works once, that is, I share the file or cancel from the UIActivityViewController and second go at sharing the file, it is not recognised, nothing in the modal view.
After the second attempt at sharing, I get this in the console.