11

Is there any way to extract an Xcode Project file from an .ipa (executable file)?

I tried the following:

Make a copy of the .ipa file and change .ipa to .zip. Double click on the Payload folder and open project folder. Right-click on that folder and select Show Package Contents.

Everything seems to be okay, but I want to see the code, which is now showing as executable files. Is there any tool or any way to achieve this?

jscs
  • 63,694
  • 13
  • 151
  • 195
Ramu Pasupuleti
  • 888
  • 2
  • 15
  • 35

4 Answers4

10

The .ipa file contains, as you have noticed, your compiled project. So no, you can't get the Xcode project file or the source code. (Unless of course, someone deliberately copied those files in).

Sebastian
  • 7,670
  • 5
  • 38
  • 50
  • 3
    I need one more clarification. If the above is not possible, then how could Apple review the code written by developers while submitting the app to App Store. I heard that, they will also review the code as a part of submission approval process. – Ramu Pasupuleti Mar 27 '13 at 05:31
5

No, you can't convert a compiled executable back into source code.

An .ipa is an archive of a compiled iOS application, containing the compiled executable plus any resources (images, property lists, etc.). You can't easily translate compiled code back into the human-readable source code that produced it, and you certainly cannot get the Xcode project file that defined the build process for the app. While there are machine code disassemblers out there, they will only give you rough approximations of the original code and can lose valuable information such as the original variable names, comments, etc.

Stuart M
  • 11,458
  • 6
  • 45
  • 59
2

Actually, you can unpack it and see a lot of included files that may be helpful. For me, I needed to see what cordova version and cordova plugin version were in the .ipa file.

After you use XCode to export a previous submission, change the .ipa file to .zip. Inside "Payload" directory right click on your app name and click Show Package Contents and voila.

To see the cordova version navigate to www/cordova.js, you will see PLATFORM_VERSION_BUILD_LABEL

For plugins, check the very BOTTOM of the file cordova_plugins.js

Thanks to oxdaily.com for the tip about converting to zip file.

Dmitri R117
  • 2,502
  • 23
  • 20
0

Yes Stuart is right we cannot extract the code from its binary so easily the reverse engineering process is very hard to do and even if done it has a lot of complication and the code is not exactly in the same form and more importantly not understandable

hariszaman
  • 8,202
  • 2
  • 40
  • 59