Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

happycamper66

macrumors newbie
Original poster
Oct 26, 2009
2
0
Hello,

I just wanted to know how exactly the Apps are encrypted once they go on the App store, i have made a good few Apps now and its just something i am thinking about.


When i go in Apps i own, i can .zip them and see the contents but where is the .xcodeproj with the files in it? I mean if i own the Apps, or i send out my App, then for it to run there is the source code for it to install and work on the iPhone. But that is nowhere in the zip extracted files? is there any way to make them visible or even extract the .xcodeproj onto a mac? and i mean, ANYWAY?


If you have the App on your machine you can run it on your iPhone then the source code must be somewhere in the package. Albeit encrypted i would imagine..
 

TodVader

macrumors 6502a
Sep 27, 2005
596
0
Quebec, Canada
When you build, Xcode creates a binary with your code. No one will ever see that code. The resources are wide open though. Every image and sound you use can be easily copied off the app.
 

happycamper66

macrumors newbie
Original poster
Oct 26, 2009
2
0
Has there been ANY record of anyone actually "reverse engineering" the code? Getting it back from binary code?
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
Has there been ANY record of anyone actually "reverse engineering" the code? Getting it back from binary code?

When you compile your code, the objective-c is turned into equivalent ARM machine code instructions. These machine code instructions can be translated directly into ARM assembly instructions, which are slightly more readable by a human than the machine code. It is still pretty tedious to figure out what this code is doing, but it's certainly possible. Your exact objective-c code can't be directly recovered from the machine code.
 

firewood

macrumors G3
Jul 29, 2003
8,108
1,345
Silicon Valley
You can't reverse engineer "the code" HLL source from the compiled binary exactly, but there are often ways to reverse engineer a form of source code that will pretty much create the same app, even though it may not be structured or easy to read.

It's a lot easier to reverse compile more restrictive languages such as Java, than for wild spaghetti C code. Objective C is a mix of those two extremes, so it depends on how (badly) you write your source code.

Objective C apps publish their method names for the language's dynamic dispatch to work. If you don't want method calls to be seen, use straight C functions instead, or even inline macros, and make sure to turn off or strip symbol generation.

Library headers are easy to extract because they HAVE TO publish the interface names in some form in order to be linked.

etc.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.