title: ERROR ITMS-90161 Invalid Provisioning Profile
body: <p>I was finally able to get my project to build in Unreal Engine on my macbook... but... Application Loader won't accept it to the App Store. I'ts an iOS app made for Distribution.</p>
  
  <h2>Here's What I Have</h2>
  
  <p><strong>Apple Resources</strong> (image: <a href="https://i.imgur.com/RaY3bqe.jpg" rel="nofollow noreferrer">https://i.imgur.com/RaY3bqe.jpg</a>)<br>
  - Intermediate Certificate<br>
  - iOS Distribution Certificate + Key<br>
  - App ID | Type: explicit | “com.companyName.appName”<br>
  - Provision Profile | Platform: iOS | Type: App Store<br>
  - Keychain | Intermediate Certificate + iOS Distribution Certificate + Key<br>
  - App Store Connect Project with "appName" and matching Bundle ID selected.<br></p>
  
  <p><strong>How I made my Certificate</strong><br>
  - Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority… It made a CSR and key<br>
  - I used the CSR to make the iOS Distribution certificate at developer.apple.com<br>
  - Downloaded certificate, drag and dropped into the keychain I made “UnrealEngineiOS”.<br></p>
  
  <p><strong>Unreal Engine Settings</strong> (image: <a href="https://i.imgur.com/bHvsvDA.jpg" rel="nofollow noreferrer">https://i.imgur.com/bHvsvDA.jpg</a>)<br>
  - Provision, Certificate are valid<br>
  - Bundle Info is named exactly how I named my certificate,provision,ID. (case sensitive)<br>
  - Automatic Signing | off<br>
  - Build Configuration | Shipping<br>
  <br></p>
  
  <p>Ok so… I used that to attempt to package in Unreal on my macbook<br></p>
  
  <h2>Steps</h2>
  
  <ol>
  <li>Unreal Engine > File > Package Project > iOS<br>
  <br>
  Message Log: Provision not found. A provision is required for deploying your app to the device<br>
  Message Log: Signing key not found. The app could not be digitally signed, because the signing key is not configured<br>
  <br></li>
  <li>Unreal Engine > Project Settings > iOS > Build > <strong>Automatic Signing</strong> | <strong>set to On</strong><br></li>
  <li>Unreal Engine > Project Settings > iOS > Build > iOS Team ID | I enter my team ID<br></li>
  <li>Unreal Engine > File > Package Project > iOS<br></li>
  <li>Build Success! appName-IOS-Shipping.ipa is created.<br></li>
  <li>Xcode > Open Developer Tool > Application Loader | I choose my ipa file<br></li>
  <li>Application Loader: “Reviewing your applications...”<br></li>
  <li>Application Loader > Next<br></li>
  <li>Application Loader: “Adding application”, “verifying assets with the App Store”<br></li>
  <li>Application Loader error:</li>
  </ol>
  
  <h2>Error</h2>
  
  <p>ERROR ITMS-90161: “Invalid Provisioning Profile. The provisioning profile included in the bundle com.companyName.appName [Payload/appname.app] is invalid. [Missing code-signing certificate]. A Distribution Provisioning profile should be used when submitting apps to the App Store. For more information, visit the iOS Developer Portal.”</p>
  
  <p><strong>How do I get the App Store to accept my ipa file? What am I doing wrong?</strong></p>