The topic says it all. I've got a .app file here, but the Xcode project is no longer available to me. Is there any way to take the .app file and reverse engineer an Xcode project from it so I can view the code used to make it?
-
4Short answer, no. (Longer answer, no there is not) – KevinDTimm Sep 06 '11 at 16:23
-
This post is not approved by Apple Inc. XD – Mister Smith Sep 06 '11 at 16:23
4 Answers
First, the source code is signed and encrypted.
Second, you're likely legally not allowed to decrypt this source if you are in the United States, Cuba, North Korea and many other countries. I fear it even applies to your own code, since it was encrypted by Apple tools, with an Apple key. Check this with a lawyer, guy in black with scary words and a nice Porsche.
Third, Objective-C being a compiled language, and LLVM allowing you to do some optimization, you would have a real hard time going back to anything slightly readable. This is no Java/C#.
Four, you'd better be really, really sure that "the app file is no longer available to me" means you have a legal right to the source in some way. Stealing source code carries some hefty penalties, with fines you can buy yourself a Porsche with. Ask a lawyer :p

- 5,361
- 3
- 34
- 63
-
1The source code is not contained in the .app file. So it's neither signed nor encrypted. It's not there. You probably mean the compiled and linked executable code. – Codo Sep 07 '11 at 11:55
-
I meant "in the process, the source code will be converted into a signed and encrypted binary". But your point is right, my phrase is not well written. – Kheldar Sep 07 '11 at 11:57
By design this cannot be done. The best you can do is run the app and try to reverse engineer it based on functionality. Stealing the source code is a no-no (and not just because Apple says so).

- 48,188
- 17
- 130
- 149
It would be very very difficult. There's no one click solution. However, you could look at class-dump and otool. Just be aware that it's a very manual effort, you'll still be piecing everything together yourself.

- 16,250
- 3
- 42
- 65
When you say "the Xcode project is no longer available to me" then I would assume you have written the code or at least have seen it.
It will be definitely much faster to rewrite it than to try to decompile it.

- 10,953
- 12
- 77
- 147