title: WCSession File Transfer Issue
body: <p>I am having an issue sending files to the Apple Watch from the parent device. Sometimes the file goes through and is parsed completely. Other times it begins the file transfer, but it fails and never even rens the method <code>session:(WCSession *)session didReceiveFile:(WCSessionFile *)file</code> on the Apple Watch.</p>
  
  <p>Here is the parent device code:</p>
  
  <pre><code>- (void)sendLiveAudioRecording
  {
      NSError *moveError;
      NSFileManager *fileManager = [NSFileManager defaultManager];
      NSURL *groupURL = [fileManager containerURLForSecurityApplicationGroupIdentifier: @"group.myCompany.myApp"];
      NSURL *permanentURL = [groupURL URLByAppendingPathComponent: @"PhoneToWatch.mp4"];
      [FileSystem_Helper removeFile: [permanentURL path]];
      [fileManager moveItemAtURL: [self fileURL] toURL: permanentURL error: &amp;moveError];
  
      if (!moveError)
      {
          if ([WCSession isSupported])
          {
              [[WCSession defaultSession] setDelegate: self];
              [[WCSession defaultSession] activateSession];
              if ([[WCSession defaultSession] isReachable])
              {
                  NSLog(@"File Is Being Transferred: %@", [permanentURL path]);
                  [[WCSession defaultSession] transferFile: permanentURL metadata: nil];
              }
              else
              {
                  [self createAlertWithTitle: @"Error" andMessage: @"WCSession Not Reachable"];
              }
          }
          else
          {
              [self createAlertWithTitle: @"Error" andMessage: @"WCSession Not Supported"];
          }
      }
      else
      {
          NSLog(@"%@", [moveError localizedDescription]);
      }
  }
  </code></pre>
  
  <p>And here is the Apple Watch code:</p>
  
  <pre><code>-(void) session:(WCSession *)session didReceiveFile:(WCSessionFile *)file
  {
      NSData *fileData = [NSData dataWithContentsOfURL: [file fileURL]];
      WKAudioFileAsset *asset = [WKAudioFileAsset assetWithURL: [file fileURL]];
      NSURL *fileLocation = [FileSystem_Helper writeAudioToAppGroupsWithData: fileData withName: @"FromPhone.mp4"];
      NSLog(@"%@", [file fileURL]);
      NSLog(@"%@", [fileLocation path]);
  
      [FileSystem_Helper removeFile: [[file fileURL] path]];
  
      NSError *writingError;
      if (!writingError)
      {
          [self playURL: fileLocation withDuration: [asset duration]];
      }
      else
      {
          [WKAlertViewController_Helper showWKAlertControllerWithTitle: @"Audio Receive Failed" andMessage: [writingError localizedDescription] andButtonTitle: @"Ok" onController: self];
      }
  }
  </code></pre>
  
  <p>I am not even sure it has anything to do with the code itself. I think the file transfer is failing sometimes, but I can't find anywhere to print out an error to debug.</p>
  
  <p>Can anyone give me some insight here?</p>
  
  <p>iOS 9.2 &amp;&amp; WatchOS 2.1</p>
  
  <p>Here is the code from [FileSystem_Helper removeFile: (NSString *)filePath]:</p>
  
  <pre><code>+ (void) removeFile: (NSString *)filePath
  {
       NSFileManager *fileManager = [NSFileManager defaultManager];
       if ([fileManager fileExistsAtPath: filePath])
       { 
            NSError *error; 
            if (![fileManager removeItemAtPath: filePath error:&amp;error]) 
            {
                  NSLog(@"Error removing file: %@", error); 
            } 
       }
  }
  </code></pre>
  
  <p>And here is [FileSystem_Helper writeAudioToAppGroupsWithData]:</p>
  
  <pre><code>+ (void)writeAudioToAppGroupsWithData: (NSData *)audioData withName: (NSString *)name
  {
      // Writing the audio data to the App Groups
      NSURL *URL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier: @"group.myCompany.myApp"];
      NSURL *containerURL = [URL URLByAppendingPathComponent: name];
      [audioData writeToURL: containerURL atomically: YES];
  }
  </code></pre>