# Expired iOS certificate

### iOS build failure: Expired certificate

If your app build is failing, your download is not working, or your build is not completing and you see the error:

“It seems your app build has encountered an issue. The uploaded certificate has expired. Please upload a valid certificate.”

This means the distribution certificate uploaded in your dashboard is no longer valid in your Apple Developer account.

An expired certificate will always cause the iOS build to fail.

#### Why this build failure happens

1. The distribution certificate has passed its expiration date
   * Apple certificates are valid only for a limited period
   * Once expired, they cannot be used for app builds
2. The expired certificate is still uploaded in your dashboard
   * The system attempts to generate a build using an invalid certificate
   * The build process fails immediately

#### How to fix this iOS build failure

1. Check certificate expiration
   * Log in to your Apple Developer account
   * Go to Certificates, Identifiers & Profiles
   * Open Certificates
   * Check the expiration date of your Apple Distribution certificate

{% hint style="warning" %}
If the certificate is expired, you must create a new one.
{% endhint %}

2. [Create a new distribution certificate](/app/download/ios/certifications/iphone-distribution-certificate.md)
   * Click the + button in Certificates
   * Select Apple Distribution or iOS Distribution
   * Upload your CSR file
   * Download the generated .cer file
   * Open it in Keychain Access
   * Export it as a .p12 file

{% hint style="warning" %}
Export the .p12 certificate without setting a password.
{% endhint %}

3. Update your provisioning profile

After creating a new certificate:

* Go to Profiles
* Select your existing App Store provisioning profile
* Replace the old distribution certificate with the new one
* Regenerate and download the updated provisioning profile

{% hint style="warning" %}
If you do not update the provisioning profile with the new certificate, the build will continue to fail.
{% endhint %}

4. Upload the updated files to your dashboard
   * Go to your app dashboard
   * Navigate to the iOS configuration section
   * Upload the new .p12 certificate
   * Upload the updated provisioning profile
   * Save the changes
5. Rebuild your app
   * Go to the Download section
   * Click Rebuild under the iOS app card

Once the new certificate and provisioning profile are correctly uploaded, your build failure should be resolved and the download should complete successfully.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmysite.com/app/download/build-failure/expired-ios-certificate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
