title: How to pack ipa with signer for phonegap project
body: <p>I have create a phonegap project for ios. And I use phonegap command line to build <code>./cordova/build</code>. Then I use <code>xcrun</code> to generate an ipa, it fails.</p>
  
  <p>This is my command line:</p>
  
  <pre><code>xcrun -sdk iphoneos PackageApplication -v ./build/page.app -o ~/Documents  
  /ipas/page.ipa -sign "iPhone Distribution: [XXXXXXX]" -embed "XXX.mobileprovision"
  </code></pre>
  
  <p>And this is the error I got after execute the command.</p>
  
  <pre><code>Output directory: '/Users/longfei/Documents/ipas/page.ipa'
  Temporary Directory: '/var/folders/n9/1pqsg0kj667d741s43cfnlw80000gn/T/kLf7Emmi2L'  (will NOT be deleted on exit when verbose set)
  + /bin/cp -Rp ./build/page.app /var/folders/n9/1pqsg0kj667d741s43cfnlw80000gn/T/kLf7Emmi2L/Payload
  Program /bin/cp returned 0 : []
  Checking original app
  + /usr/bin/codesign --verify -vvvv ./build/page.app
  Program /usr/bin/codesign returned 1 : [./build/page.app: code object is not signed at all
  In architecture: i386
  ]
  Codesign check fails : ./build/page.app: code object is not signed at all
  In architecture: i386
  
  Done checking the original app
  Embedding '~/Dropbox/Works/xcode/zs/yunsite1/yunsite1.mobileprovision'
  + /bin/rm -rf /var/folders/n9/1pqsg0kj667d741s43cfnlw80000gn/T/kLf7Emmi2L/Payload/page.app/embedded.mobileprovision
  Program /bin/rm returned 0 : []
  + /bin/cp -rp ~/Dropbox/Works/xcode/zs/yunsite1/yunsite1.mobileprovision /var/folders/n9/1pqsg0kj667d741s43cfnlw80000gn/T/kLf7Emmi2L/Payload/page.app/embedded.mobileprovision
  Program /bin/cp returned 1 : [cp: ~/Dropbox/Works/xcode/zs/yunsite1/yunsite1.mobileprovision: No such file or directory
  ]
  error: Unable to copy '~/Dropbox/Works/xcode/zs/yunsite1/yunsite1.mobileprovision' to '/var/folders/n9/1pqsg0kj667d741s43cfnlw80000gn/T/kLf7Emmi2L/Payload/page.app/embedded.mobileprovision'
  </code></pre>
  
  <p>I'm a newbie for ios and phonegap. I have searched for a long time to get a solution, but failed. Hope you can help me. Thanks a lot.</p>