title: iOS app submission : invalid signature
body: <p>I'm struggling with this issue for more than a week now, I've tried all I could find on Google with no luck. This is my first time trying to submit an app to the App Store, but I keep getting this email after each try:</p>
  
  <blockquote>
    <p>invalid Signature - Make sure you have signed your application with a
    distribution certificate, not an ad hoc certificate or a development
    certificate. Verify that the code signing settings in Xcode are
    correct at the target level (which override any values at the project
    level). Additionally, make sure the bundle you are uploading was built
    using a Release target in Xcode, not a Simulator target. If you are
    certain your code signing settings are correct, choose "Clean All" in
    Xcode, delete the "build" directory in the Finder, and rebuild your
    release target.</p>
  </blockquote>
  
  <p>so here is what I'm doing:</p>
  
  <ul>
  <li>I have my distribution certificate in login keychain , with the
  private and public key . </li>
  <li>I have the distribution provisioning profile with the same certificate i've created earlier . </li>
  <li>The bundle ID on my provisioning profile is the same on my iTunes connect app and the
  same in Xcode general settings .</li>
  <li>The same version (0.8.2) in iTunes connect app and Xcode .</li>
  <li>I'm building with device selected not a simulator (but i don't have a device connected to the mac). </li>
  <li>the code signing part under build settings (for both target and project). </li>
  <li>I have "iPhone Distribution : ... " for everything and also i'm selecting the distribution provisioning profile .</li>
  </ul>
  
  <p>What I am missing? I've looked all over and all I find is people with incorrect versions or incorrect bundle id.</p>
  
  <p>I am using Cordova and Ionic to build my app, I don't know if that has something to do with it.</p>
  
  <p>I've seen the troubleshoot guide of Apple on this issue and ran this command:</p>
  
  <blockquote>
    <p>codesign --verify -vvvv -R='anchor apple generic and certificate
    1[field.1.2.840.113635.100.6.2.1] exists and (certificate
    leaf[field.1.2.840.113635.100.6.1.2] exists or certificate
    leaf[field.1.2.840.113635.100.6.1.4] exists)' /path/to/the.app</p>
  </blockquote>
  
  <p>I get : <code>a sealed resource is missing or invalid file modified: /path/to/MyApp.app/MyApp</code>
  they suggest to run this to resolve the issue: <code>dot_clean path/to/xcodeproject</code></p>
  
  <p>But that didn't help, I keep getting the same error. 
  Please help, I'm out of clues</p>
  
  <p><strong>EDIT ( Solution )</strong> </p>
  
  <p>Apple is just a big stupid company, none of the suggested solutions under any of the posts helped me ! it was just the stupid process of apple , I had an invalid character "?" that should have been removed from the App Name. I wish Xcode coulde validate the name first before going into any of the submitting and testing process.  </p>