title: Could not launch 'app' with iCloud container
body: <p>I have an OS X app targeting 10.7 (Lion) platform. I use XCode 4.4 on a development machine where iCloud is enabled. The OS X version on this machine is 10.8 (Mountain Lion). </p>
  
  <p>I have an APP ID that I enabled <code>iCloud</code> using the Developer Certificate Utility: <code>com.company.appname</code>. The utility shows a green tick next to iCloud label under description of the App ID.</p>
  
  <p>From <code>XCode</code> <code>Target/Summary</code> tab I enabled <code>Entitlements</code> and added iCloud Container <code>com.company.appname</code>. Of course internally it is preceded by the team id in the Entitlements file: <code>teamid.com.company.appname</code>. </p>
  
  <p>I also have a valid (green ticked) provisioning profile on my Mac with the same id:<code>teamid.com.company.appname</code>.</p>
  
  <p><code>Derived Data</code> locations is set to <code>Relative</code> from <code>XCode/Preferences</code>.</p>
  
  <p>The app builds OK. But when I run it I get <code>"Could not launch "appname". Permission denied."</code> error.</p>
  
  <p>If I remove the iCloud container id <code>com.company.appname</code> from <code>iCloud Containers</code> list box under Entitlements and build the app, it runs OK. But of course I cannot access iCloud container enabled for the app.</p>
  
  <p>I have been working on this problem for the past 24 hours. I have read the guides; <code>Developing for the App Store</code>, <code>App Sandbox Design Guide</code>, and <code>Entitlement Key Reference</code> inside out. Yet I am stuck. What went wrong? </p>
  
  <p>I am desperate and I will be grateful if you can help me.</p>