PDA

View Full Version : A way to see the code of existing apps?




Paandaman
Feb 1, 2012, 03:33 AM
Hello everyone!

Does anyone know if there is a program that let's you see the code of an existing app? I would like to get a bit more insight in how other people have constructed their apps. I know that there's some test apps that you can download from the apple-site but none of the apps there is in my interests.

Thanks in advance!



admanimal
Feb 1, 2012, 03:35 AM
It is impossible to reverse engineer the Objective-C code from a compiled app.

miles01110
Feb 1, 2012, 03:36 AM
You can e-mail the developer and ask for the code.

admanimal
Feb 1, 2012, 03:38 AM
You can also email Coke and KFC and ask for their secret recipes.

ArtOfWarfare
Feb 1, 2012, 05:46 AM
You can also email Coke and KFC and ask for their secret recipes.

Yes, and that'd be akin to asking Microsoft or Adobe for their code.

Asking a developer for their code is more like asking your local mom and pop bakery about their recipe. There's a good chance they're friendly and will tell you some of it, if not all.

And actually, I've emailed Coke before regarding how they make various packaging choices (school assignment a few years ago.) I got a very surprisingly detailed response.

PhoneyDeveloper
Feb 1, 2012, 07:07 AM
Start here

http://cocoadev.com/index.pl?ClassDump

johnjmapp
Feb 1, 2012, 08:56 AM
dont think there is any at the moment.

dejo
Feb 1, 2012, 09:15 AM
Does anyone know if there is a program that let's you see the code of an existing app?
There may be ways to decompile the executable of other apps, but you would lose a lot of what help makes that code understandable (variable names with meaning, comments, etc.)

I know that there's some test apps that you can download from the apple-site but none of the apps there is in my interests.
So, what is your area of interest?

dantastic
Feb 1, 2012, 11:30 AM
What you want to do instead is download a few open source projects from github and have a look how they are constructed. Open source projects tend to be well structured and ok-enough documented.

This presuming you are looking to pick up best practices.

Paandaman
Feb 2, 2012, 01:48 AM
Thanks a lot for the replies everyone, you've been really helpful:)
Will try to go through some open sources then!

----------

So, what is your area of interest?[/QUOTE]

Currently i would like to know how to make it possible to see a list of all applications running or just existing on the phone. I have seen it on quite a lot of apps on the market but not on any open source document yet!

dejo
Feb 2, 2012, 09:44 AM
Currently i would like to know how to make it possible to see a list of all applications running or just existing on the phone. I have seen it on quite a lot of apps on the market but not on any open source document yet!

Really? Care to provide some examples?

EDIT:

Anyways, perhaps this blog post (http://amitay.us/blog/files/how_to_detect_installed_ios_apps.php) will help.

firewood
Feb 2, 2012, 12:18 PM
Reverse engineering is almost always possible with a lot effort and expertise on a rooted device to which you have physical access. But reverse engineering will not show you the original code for the app, only an equivalent that can produce the same compiled result, which is usually far less readable (but occasionally can be more readable for really badly coded apps).

iOS App store app binaries are encrypted. But unencrypted info might include plists, object method and class names.

Really, the only good way to see the actual source code of an app might be to politely ask the author of the app if they will send you a copy. Or even offer to buy the code.

Paandaman
Feb 2, 2012, 03:08 PM
Really? Care to provide some examples?

EDIT:

Anyways, perhaps this blog post (http://amitay.us/blog/files/how_to_detect_installed_ios_apps.php) will help.

I have seen it in SBsettings where it's called appfolders. And please excuse me if i sound like some kind of smartass trying to prove his point, i'm just really unfamiliar with everything that has to do with programming. That link seems to be spot on! Cheers:)

Thanks firewood, i'll see if i can get in contact with the developer then:)

dejo
Feb 2, 2012, 03:24 PM
...i'm just really unfamiliar with everything that has to do with programming.

In that case, I suggest you put all your grand ideas on the back-burner for now and concentrate on just learning the fundamentals of programming. Get comfortable with the basics, build small, simple programs, tweak existing code to enhance it, learn more advanced concepts, apply them, etc. Then, in a few weeks (or months, realistically), you can revisit what you can possibly accomplish for your high school project.

robbieduncan
Feb 3, 2012, 04:39 AM
I have seen it in SBsettings where it's called appfolders.

That's a Jailbroken app. To the best of my knowledge what you are asking to do is completely impossible on non-Jailbroken devices. The developers on these forums seem to mostly concentrate on targeting non-Jailbroken devices using the official SDK.

jnoxx
Feb 3, 2012, 05:33 AM
That's a Jailbroken app. To the best of my knowledge what you are asking to do is completely impossible on non-Jailbroken devices. The developers on these forums seem to mostly concentrate on targeting non-Jailbroken devices using the official SDK.

I do have 1 question about it though. When you run BUMP, you can collect information about other apps installed.. How does that happen >.> (not trying to prove a point or being smartass, just want to know).

robbieduncan
Feb 3, 2012, 05:37 AM
I do have 1 question about it though. When you run BUMP, you can collect information about other apps installed.. How does that happen >.> (not trying to prove a point or being smartass, just want to know).

All other apps? Or ones that respond to it or can be used with it in some way (I've never used BUMP but I assume it's showing a list of other apps that it can interact with). If it shows apps that can be used with BUMP does it only show apps that have previously been used with it? Or if you install a new app does it show in BUMP before you open/use the new app?

I am basically wondering if BUMP exposes a custom URL scheme handler and the URLs the other apps use to open BUMP somehow encode the app and BUMP simply remembers them or if there is something clever going on.

dantastic
Feb 3, 2012, 05:40 AM
I do have 1 question about it though. When you run BUMP, you can collect information about other apps installed.. How does that happen >.> (not trying to prove a point or being smartass, just want to know).

dejo posted a link a bit up: http://amitay.us/blog/files/how_to_detect_installed_ios_apps.php

essentially, your app needs to keep a list of apps it has info on and test for each one by either urlscheme or executable name.

thewitt
Feb 3, 2012, 07:57 AM
Code requests from other programmers always intrigue me. We get requests every month through our support email address where people want to see source code for one of our apps.

The answer is always no - unless you would like to pay for custom app development, then you will get source, and no we won't sell just one section of code...

Commercial app developers do this for a living, don't expect them to give you their work for free.

If you want free source code, there are plenty of open source, all volunteer projects out there you can peruse, as well as the Stanford podcasts at iTunes U and lots of books on programming iOS devices.

KarlJay
Feb 3, 2012, 12:48 PM
You might want to look at some of the books that are being offered. I just bought Learning Cocos 2D at 1/2 off and it has complete source code you can download.

The upside to buying one of these kind of books, is that you get chapter after chapter explaining the source code.

Look at the eBooks deal thread posted in this forum. I paid $9.99 for mine.

On decompiling programs, I've had that happen before. Years ago a client bought a product that decompiled my program and they hired someone to take over so they wouldn't have to pay me. There's usually a way to do this, but you end up with very hard to read source code and it's not always in the high level languages. Hard to learn from, much better to learn from a good book.