Reverse Engineering? - iphone

I have *.ipa file which is the iphone application.
Is that possible to use reverse engineering in that ipa and extract
code..?

Well, its not really a hacking but it can surely help you identify some parts of the UI... Do the following:
1- Create a new project on the Xcode (doesn't really mater what you choose)
2- Connect your device to your computer
3- Profile your project on your device.
4- On the Profile, pick Core Animation
5- On the options choose Color Blended Layers
It will look like this:
6- Unplug your device while the profile is running.
Your phone will look like this now:
7- Go to the app you want to check.
Although you can't see any code, this can help you out to identify key parts of the application. To get back to normal, you can restart your device, or just go to the profile and run it Again, and uncheck the Color Blended Layers option.

As stated here: How to use Xcode to open decrypted IPA contents ipa is only a "zipped" version of the executable.
So if you are able to extract, its mostly an issue of dissasemble the executable (assembly code/dissasemblers).
But somehow this smells like fish.

Not possible the way you intend it! .ipa files contain the resources(images,sound files, database files,etc) and compiled classes only. The code is contained in these compiled classes as binaries and thus, you can at the most see how the app was structured into classes and how the resources were used but can not get the actual code as written by the developers. You can refer this SO question to get a brief idea as to how that can be done.

Related

What do I need to do to configure a new iPhone project so it can be seen as the same as my current iPhone app in the Appstore?

I currently have an app in the Appstore. I need to make changes to the app, but they are significant enough that we've decided it would be easier to create a new Xcode project from scratch rather than modify our existing project. I don't fully understand everything that goes into an iPhone application, just enough to support the code and make basic changes. But I assume that the binary I upload to the Appstore, to replace my existing code there, needs to be similar enough so Apples sees it as the "same" code. What things in the new project do I need to make sure are the same as the old project so Apple knows it's the "same" app?
I've compared the Info.plist file in both projects to make sure they're the same. I only needed to change the bundle identifier in the new project to match the old. Also, the Product Name has been modified to be the same. I don't know if these changes are necessary, but they are the sort of things that I think need to be the same. Are there others? If so, what are they?
The only thing that matters, as far as the app store is concerned, is the app id (Bundle identifier). You can rename the app, change the icon, upload an entirely different program, whatever. As long as the app id matches, the store considers it the same.
Other things I would check are the Build Settings if the defaults are not suitable or the Code is having issues compiling and the Build Phases and Build Rules for all your Targets.
Essentially if your Code compiles fine and you have no issues within the Application then the Bundle Identifier and the name (Basically the Info.plist) needs to be the same to replicate.
Edit: If you have migrated from an older Xcode version then you may have different Build Settings and Build Phases. I would just see if compilation is okay and the App works properly in functionality under all your Targets

Iphone app sharing file with iTunes problem

Somebody please help me out. This problem is killing me.
I went through tones of documents and posts. All seems to suggest that simply add a UIFileSharing key into info.plist and set boolean value to YES, files in App's Documents folder (not sub-folder, I know) will show up in iTunes.
However my problem is that I don't have an iPhone, so I really have no clue about what exactly the behaviors of both iPhone or iTunes will be when try to verify this file sharing thing. And what is the right way to verify this.
So when my client try to verify this off my watch (we are on different sides of earth), he keeps reporting back that file sharing feature not work. It is certain that file is properly stored under Documents folder.
In the last attempt, he claimed that he can see the app but not files.
I would like to know the following things, so I can guide him through this and end this pain:
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Are there any special requirements for building (like, only work for release build?), deploying?
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
Thank you all.
Is it really plain and simple like add one key, no changes to code needed? Or did I miss something?
Yes
Are there any special requirements for building (like, only work for release build?), deploying?
No
What will really happen when plug the iPhone into the computer and sync with iTunes? Will the app show up in the Apps tab anyway, or only show up if file sharing feature are enabled correctly?
It will show up in the app view (on top) all the times. But you will only see them in the file sharing area if you have an app with enabled filesharing.
File sharing is only available on iPhone OS 4 onwards and iPad 3.2
Make sure your client has iOS4 or later.

Not loading all content of ipa file into device while using itunes

i developed an app which is meant to read books(pdf book reader).i loaded 25 books(total size of 320MB) into the app using absolute path.all the books are been seen in the simulator and also i can load all the books into my device through xcode(build and run).
my requirement:
when i loaded the above obtained ipa file into the same device or other device which are in ad-hoc distribution using itunes , it is strange that only few books are being seen in the device.
note: i made sure that all the books are present in the .ipa file,i deleted old app in the device which i run via xcode. the device is in ad-hoc distribution.
while code signing i used the iphone developer certificate.
is it necessary to use distribution certificate instead iphone developer certificate which i feel that might be one reason for my problem?
plz anyone suggest me with exact solution to the scenario.
tnx in advance
I know I have seen problems going from simulator to live device. The simulator is not case sensitive, but the device is. Recheck all your actual files in bundle vs what you are requesting when you open the file. They need to match exactly for device, but not so much for simulator.
I would also try seting the apps-Info.plst to have "Application supports iTunes file sharing" on so you could see what is in the documents folder (this is if your moving files in that area).
One problem might be as RAZ suggested that iPhone is case sensitive, but there could be other problems.
For starters I would check the that ipa does contain everything you think should be there. Take the ipa, change the extension to zip and open it. You'll get a folder containing you're app. Right click the .app and choose show package. You'll now see all the files/resources included in your app. If the files that won't load in the app are there then you'll need to provide more information about the problem.
If they're not you need to make sure xCode knows to copy them to the app resources.
You might have resources that you haven't copied into the project, and you're only referencing the files on your hard disk. Then when you make the .ipa file it's not included. Try re-importing all your resources and select "copy to project".

creating a free version of an app, but having the app separate on debug device

I was just making a free version of one of my apps. I copied the folder, renamed the project, and changed the icon file, loading screen, interface, and code. BUT YET it still replaces a build on my phone.
1)how do I stop this from happening (i want both the free and paid version on my phone)
2) if you can fix this, will a customer who has the paid, and downloads the free, will that replace it on their phone?
I really need to know these, as I have the app ready to go, and would like to get it before the end of the week.
cheers
Sam
You need to have a different app bundle identifier. I think that's your problem.
Long answer:
Go into your projectname-info.plist file and change the CFBundleIdentifier.
I'd recommend something like:
com.mycompany.mycoolapp for the app store
com.mycompany.mycoolapp-beta for the beta version
You should actually be able to set up the "Debug" build configuration to use a different info.plist file configured with a different CFBundleIdentifier and a different icon filename. That way you'll automaticlly get the beta ID and icon, etc for the Debug build and the real id/icon for the full one.
This should allow users to install and use both the production and test versions of the apps at the same time without confusion.
You might also find this IPA target template helpful if you're doing ad-hoc distribution to Windows users for testing:
http://devblog.appmagination.com/2010/01/target-template-for-building-iphone-ipa.html

Decompile iPhone app binary

Is there a way to decompile an iPhone binary file in order to extract it's resources like images and sound files?
If you have sync the app to you Mac, just open the following folder:
/Users/YOUR_USER_NAME/Music/iTunes/iTunes Media/Mobile Applications
Or open iTunes and go to Apps and right mouse button on the app and select "show in Finder"
Copy the app you want to inspect, f.e. Demo.ipa
Change the extension ipa to zip => Demo.zip
Extract the zip
Open the folder and then the folder "Payload"
Right Mouse Click Demo.app and select "Show Package Content"
Change your .app file extension to zip and then extract the files. You will be able to get all resource files.
An iPhone .app file is simply a folder. If you're viewing it on a Mac (or even on the iPhone with iFile), just remove the .app extension and you should be able to view the resources. On Windows and Linux (tested with Ubuntu 14.04), it should "just work" and you'll be able to view the folder's contents without any renaming.
Edit: Removed the assumption that images/sound would be used in another application.
First, off you shouldn't be reverse compiling code so that you can get images/sound files from an iPhone or any other application for that matter.
Second, reverse compiling does not always guarantee a successful file generation of whatever file you're looking for. Whether it's an audio or image file.
It would be a much better approach for you in the long run, and in the process of learning that you either contact the authors of the app and ask for permission to use the images/audio that you're seeking (since you think it's such an awesome sound/image that you can't live without). Or you can do an audio mixing or image generation yourself.
If your lacking the time, skills or applications that would get you the quality of work you're looking for. I would recommend bring in a graphic artist or sound engineer/mixer.
You'd be learning how to manage a group or individual, convey your ideas correctly and informative, and you're more likely to build a better application as a result. And that is something you can't get from reverse compiling an iPhone application :-)