I am using UIDocumentInteractionController
to share a KML (Geo XML) file. When I use the UIDocumentInteractionController
I can open the KML file in other apps just fine. I can send it via email. However, when I try to share it via AirDrop to my mac I get this error message. I know that AirDrop works between my iPhne and my Mac since I can use it just fine in other apps. I can actually share the KML from my app to another app and then share the KML file from other apps via AirDrop.
Sender kSFOperationEventErrorOccured {
Error = "Error Domain=SFOperation Code=-1 \"Transfer failed. Try again.\" UserInfo={NSLocalizedDescription=Transfer failed. Try again.}";
Files = (
{
FileBomPath = "./topoMapsExport.kml";
FileIsDirectory = 0;
FileName = "topoMapsExport.kml";
FileType = "com.trailbehind.kml";
}
);
ReceiverComputerName = "Stephen\U2019s MacBook Pro";
ReceiverID = 994fcdc90a7d;
ReceiverModelName = "MacBook Pro";
SessionID = 3C1A7DF67296;
TotalBytes = 11857;
UsePKZip = 0;
VerifiableIdentity = 0;
}
Does anyone know why sharing via AirDrop would fail?
Here is how I set up the document interaction controller.
//Path is the path to my kml file. The path does exist and it has the correct data in it.
NSURL* url = [NSURL fileURLWithPath:path];
self.documentController = [UIDocumentInteractionController interactionControllerWithURL:url];
self.documentController.UTI = @"com.google.earth.kml";
self.documentController.name = @"topoMapsExport.kml";
[self.documentController presentOptionsMenuFromRect:self.exportButton.frame inView:self.view animated:YES];