> For the complete documentation index, see [llms.txt](https://bamtech.gitbook.io/dev-standards/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bamtech.gitbook.io/dev-standards/project-standards/taking-over-project/migrate-to-new-ios-certificates.mo.md).

# migrate-to-new-ios-certificates.mo

## Owner: [Yassine Chbani](https://www.github.com/yassinecc)

## Description

* A project started by a third party should use your organisation's iOS certificates once a team starts working on it

## Impact

* If the original Apple developer account is not an entreprise one, the certificates for the staging app will expire and renewing them will include a dependency to the original owner of the project

## Prerequisites

* [ ] You have access to the previous Apple Developer account
* [ ] Your project uses fastlane

## Steps

### Removing the old app ID

* Log in to the original Apple Developer account on developer.apple.com
* Go to the certificates, Identifiers and Profiles page
* In the Identifiers section, locate the staging app's ID and select it
* In the menu you opened, browse to the bottom and delete the app ID

### Generating a new provisiong profile

* In your fastlane folder, open the .env file for the staging app
* Change the `MATCH_GIT_URL` and `IOS_TEAM_ID` fields to the ones used by you organisation
* If not already the case, set `MATCH_TYPE` to 'enterprise' and `MATCH_FORCE_ENTERPRISE` to '1' in the `IOS_MATCH` section of the env file
* Change the `FL_HOCKEY_API_TOKEN` to you organisation's token
* Run `bundle exec fastlane ios setup --env=staging`
* Deploy to HockeyApp
* Download and test the app
* Share with your product owner and relevant people the new link to download the staging app


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://bamtech.gitbook.io/dev-standards/project-standards/taking-over-project/migrate-to-new-ios-certificates.mo.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.
