title: command/usr/bin/codesign failed with exit code 1- code sign error
body: <p>I'm currently in the process of submitting my first app to the Apple store.
  I've completed the following processes</p>
  
  <ol>
  <li>Obtained a developer account</li>
  <li>Logged into the Member Center to Create an App ID</li>
  <li>Used keychain access to request and receive a distribution certificate</li>
  <li>Obtained a provisioning profile using my id and certificate</li>
  </ol>
  
  <p>When I build the app it runs perfectly in the app simulator and on the actual ipad, however when I switch my app to <code>Archive</code> on iOS Device i have a major code sign error which i've attached below.</p>
  
  <pre><code>codesign /Users/Gaby/Library/Developer/Xcode/DerivedData/RoyalAppInspection-dthvtpxadkslqmhkwdpaqkyujscg/Build/Products/Debug-iphoneos/RoyalAppInspection.app
  cd /Users/Gaby/Desktop/RoyalAppInspection
  export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
  export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
  
  
  /usr/bin/codesign --force --sign 79640A11C8D22589BD337496ABB8443581513846 --entitlements /Users/Gaby/Library/Developer/Xcode/DerivedData/RoyalAppInspection-dthvtpxadkslqmhkwdpaqkyujscg/Build/Intermediates/RoyalAppInspection.build/Debug-iphoneos/RoyalAppInspection.build/RoyalAppInspection.app.xcent /Users/Gaby/Library/Developer/Xcode/DerivedData/RoyalAppInspection-dthvtpxadkslqmhkwdpaqkyujscg/Build/Products/Debug-iphoneos/RoyalAppInspection.app
  
  79640A11C8D22589BD337496ABB8443581513846: no identity found Command /usr/bin/codesign failed with exit code 1
  </code></pre>
  
  <p>I have no idea what to do to fix this, as I've tried to make sure all the other aspects of the process were completed correctly.</p>
  
  <p>One concern i did have was when i clicked the provisioning profile file it would not open and "add to library" wouldn't pop up (i cannot access iphone configuration utility for some reason.) I manually added the .mobileprovision file to my xcode project but i'm thinking this may also be a source of my error.</p>
  
  <p>Anyone, can you please help?</p>