UIDocumentInteractionController failing to send file via AirDrop

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];

Hi,


I'd suggest filing a bug with a sample project that makes it easy to reproduce this problem. Please report back here with the radar number!

Can be related - I got the same Airdrop error and console log when app uses symlinked file as item in UIActivityViewController. (Workaround is to create a copy of the file).

Radar number: rdar://31842522Openradar: http://openradar.appspot.com/radar?id=5013470848221184

UIDocumentInteractionController failing to send file via AirDrop
 
 
Q