title: iOS simulator: could not hardlink copy. Wrong path in my filesystem?
body: <p>I am using Xcode Version 6.1 (6A1052d)</p>
  
  <p>I am trying to launch an app on the simulator.</p>
  
  <p>The first time it always works fine. If I want to launch a second time, I have an error (see log below). Then in iOS simulator I "Reset Content and Settings" and I can launch again successfully. </p>
  
  <p>Given the error log, I think it must have something to do with a wrong path. The problem is I am bad with Mac filesystem and path linking, so your help would be much appreciated.</p>
  
  <p><strong>EDIT</strong>: 
  Here is the info.plist.xml (generated by LibGDX if it matters)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
      &lt;string&gt;en&lt;/string&gt;
      &lt;key&gt;CFBundleDisplayName&lt;/key&gt;
      &lt;string&gt;${app.name}&lt;/string&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;${app.executable}&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;${app.id}&lt;/string&gt;
      &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
      &lt;string&gt;6.0&lt;/string&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;${app.name}&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
      &lt;string&gt;${app.version}&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;????&lt;/string&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;${app.build}&lt;/string&gt;
      &lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;UIViewControllerBasedStatusBarAppearance&lt;/key&gt;
      &lt;false/&gt;
      &lt;key&gt;UIStatusBarHidden&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;UIDeviceFamily&lt;/key&gt;
      &lt;array&gt;
          &lt;integer&gt;1&lt;/integer&gt;
          &lt;integer&gt;2&lt;/integer&gt;
      &lt;/array&gt;
      &lt;key&gt;UIRequiredDeviceCapabilities&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;armv7&lt;/string&gt;
          &lt;string&gt;opengles-2&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;UISupportedInterfaceOrientations&lt;/key&gt;
      &lt;array&gt;
          &lt;!-- &lt;string&gt;UIInterfaceOrientationPortrait&lt;/string&gt; --&gt;
          &lt;string&gt;UIInterfaceOrientationLandscapeLeft&lt;/string&gt;
          &lt;string&gt;UIInterfaceOrientationLandscapeRight&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;CFBundleIcons&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;CFBundlePrimaryIcon&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleIconFiles&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;Icon&lt;/string&gt;
                  &lt;string&gt;Icon-72&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>And my robovm.xml:</p>
  
  <pre><code>app.version=1.0
  app.id=&lt;my package name&gt;.IOSLauncher
  app.mainclass=&lt;my package name&gt;.IOSLauncher
  app.executable=IOSLauncher
  app.build=1
  app.name=&lt;my app name&gt;
  </code></pre>
  
  <p>I have tried to identify more precisely the error thanks to the advice of Jeremy, in the system.log inside the folder of my virtual device. The system.log has a lot of entries around the time of the crash, so I might have missed something... Anyway I have found these potentials errors:</p>
  
  <pre><code>Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 createDictFromFile: open failed for /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Containers/Bundle/Application/CA2B6D8C-1A62-4DA6-8433-AA4678D009E1/ManifestCache.plist : No such file or directory
  
  Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e4d6000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Library/Caches/com.apple.mobile.installd.staging/temp.gCGKCY/extracted/ManifestCache.plist
  
  Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 validate_stream: Got manifest for version "1 1.0", but expected version "1 "
  
  Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 hardlink_copy_hierarchy: Failed to open manifest /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Library/Caches/com.apple.mobile.installd.staging/temp.gCGKCY/extracted/com.apple.deltainstallcommands.&lt;my app.id&gt;
  </code></pre>
  
  <p>The original crash log from Eclipse console (device name folders are different as I have tested on multiple virtual devices, but the error is always the same)</p>
  
  <pre><code>11/27/14 9:58:17 AM: [ERROR] Session could not be started: 
  Error Domain=LaunchServicesError 
  Code=0 "Unable to run app in Simulator" UserInfo=0x7fc8eb900d70 
  {Error=PackagePatchFailed, ErrorDescription=Could not hardlink copy 
  /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Containers/Bundle/Application/CCF8C472-C48F-41D7-8885-E83830256EE3/IOSLauncher.app 
  to 
  /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Library/Caches/com.apple.mobile.installd.staging/temp.TsGEn1/extracted/Payload/IOSLauncher.app 
  with manifest 
  /Users/&lt;myname&gt;/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Library/Caches/com.apple.mobile.installd.staging/temp.TsGEn1/extracted/com.apple.deltainstallcommands.&lt;pathtomyappexec&gt;, 
  NSLocalizedFailureReason=An error was encountered while running 
  (Domain = LaunchServicesError, Code = 0), 
  NSUnderlyingError=0x7fc8ebb1a500 "The operation couldn’t be completed. 
  (LaunchServicesError error 0.)", 
  NSLocalizedDescription=Unable to run app in Simulator}
  </code></pre>