# How to extract IPA from iOS device

1. Download and install APP from Apple Store or other source.
2. Connect with SSH.

```bash
ssh root@<iPhone-IP> # default password 'alpine'
```

3. Go to Bundle container directory.

```bash
cd /var/containers/Bundle/Application/
```

4. Get UUID folder from APP or listing all.

```bash
find | grep "<APP-NAME>"
ls *
```

<figure><img src="https://1852982556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LswwllXaxD3XsQPgVOF%2Fuploads%2FurylB85eIdCttSgREAou%2Fhow_to_extract_ipa_from_ios_device_001.png?alt=media&#x26;token=59d3a3bc-d250-4bd6-a55f-0abcca39a408" alt=""><figcaption><p>All installed IPAS</p></figcaption></figure>

<figure><img src="https://1852982556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LswwllXaxD3XsQPgVOF%2Fuploads%2FkwvjqrRju2ppea1wjIsg%2Fhow_to_extract_ipa_from_ios_device_002.png?alt=media&#x26;token=4d5a60d1-47f0-4a11-a138-59c28f6baa6e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1852982556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LswwllXaxD3XsQPgVOF%2Fuploads%2Fe9mFIfTG5qaZCzAIRdQP%2Fhow_to_extract_ipa_from_ios_device_003.png?alt=media&#x26;token=d6cd3d80-e86a-4533-9ed0-4a63c7173cbc" alt=""><figcaption></figcaption></figure>

5. Go to UUID folder APP

```bash
cd <UUID-Folder>
```

6. Create `Payload` dir

```bash
mkdir Payload
```

7. Find .app folder name of UUID Folder and copy all content in Payload folder

```bash
ls
cp -r <APP-NAME>.app/ Payload/
```

<figure><img src="https://1852982556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LswwllXaxD3XsQPgVOF%2Fuploads%2F3vqFmwupQMaVJAqDffRk%2Fhow_to_extract_ipa_from_ios_device_004.png?alt=media&#x26;token=8fceb072-78a4-4ff6-b452-874139fdccfb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1852982556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LswwllXaxD3XsQPgVOF%2Fuploads%2FokCLsCBHApnSgyVlE1tX%2Fhow_to_extract_ipa_from_ios_device_005.png?alt=media&#x26;token=84b41c1b-bf98-4530-94d1-d9505d57acdf" alt=""><figcaption></figcaption></figure>

8. Create IPA File from folder

```bash
zip -r /var/root/<NAME-TO-EXTRACT-IPA>.ipa Payload/
```

9. Connect with SFTP

```bash
sftp root@<iPhone-IP> # default password 'alpine'
```

10. Get IPA

```bash
get -r /var/root/<NAME-TO-EXTRACT-IPA>.ipa
```
