> For the complete documentation index, see [llms.txt](https://wiki.smhuda.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.smhuda.com/pentesting/application-security/mobile-security/ios/ios-reverse-engineering.md).

# iOS Reverse Engineering

{% embed url="<https://habr.com/en/post/595797>" %}

## `ipa` package analysis

`ipa` is essentially a `zip` file.

## `ipa` file root structures

* `iTunes Artwork`--a PNG app icon for showing in iTunes and the App Store.
* `iTunesMetadata.plist`—Contains copyright information, release date, purchase date, name of the developer and company who created it, etc.
* `/Payload/Application.app`

> To repack the `ipa`, simple select the three files and folder listed above and right click and select compress. The `Archive.zip` you get can be install using `ideviceinstaller`. You can also rename the file name you wanted.

> You can also use script.

```
cd <the-directory-that-store-the-three-files-and-folder>
zip -0 -y -r out.ipa .
#or use
zip -0  --symlinks --recurse-paths out.ipa .
# the `out.ipa` is the result
```
