I am writing an app for the iphone platform. My code is mostly C++ with some Objective-C code to interface with ios sdk apis. I am not very versed on iphone programming and this is my first app, so problem is that i need to read a binary file, using C++ code, containing some data but i don't kown how to do it. My concern is: can i use directly fopen/fread? Which path should i use? I come from Android development. The .apk is a simple .zip archive, so one just need to extract in memory the needed file and process it, or extract the file in a temporary directory and read it in the usual way, but i do not know how to to the same in the case of an iPhone application. Thanks.
I believe the core question you're asking has already been asked and answered. You want to read and write files, but aren't confident about how/where to do so: Write a file on iOS
Related
I noticed that there is software (such as iExplorer) that allows you to access files on an iPhone-device from your Mac.
Now my question is: How can I access iPhone files via Objective-c?
This is only for educational purposes.
I found this: https://github.com/Chronic-Dev/libirecovery but I'm not sure if I'm on the right track.
So it seems that you're looking for an API which makes it possible to access the filesystem of the iPhone from a computer. Well, this API exists, and it's called the MobileDevice framework.
Unfortunately, there's no easy or legal way to access files on your iPhone, especially through Objective-C.
The applications installed on iOS are sandboxed, which means they can only access files in their own directory tree; they have no access/knowledge of other files.
Like you said, you can access files using software like iExplorer, but not programmatically from the iPhone itself.
Here is an old project to browse the iphone. You may be able to get some pointers from it on building an application to do the same with the latest info.
http://code.google.com/p/iphonelist/
Couple that with carbonic acid's post about the Mobile Device Framework and you should be able to do some good stuff.
if I find more unique info ill post it here.
i am new to iPad development. I am making iPad applications. In my application i want to create an epub file using Xcode 4.2, is there any demo tutorial available for making ePub file using Xcode. I have searched in google but i havn't found any thing which starts from basic..
can any one give me basic ideas, how to start ??
I don't know any code examples which shows how to generate ePub in objective c, but ePub is pretty easy format. It's zip file with structurized content based on xml files http://www.jedisaber.com/eBooks/Tutorial.shtml
You can build your solution based on projects in other languages, like, in ex. Ruby ePub generator https://github.com/jugyo/eeepub or C# http://sourceforge.net/projects/epubhub/
I want to reuse iPhone source code application with other application, so in Xcode iPhone does it be able build library .jar file?
You cannot reuse a whole application, but you can create a static library and have other apps link to it.
".jar" is a Java archive format, so no. iPhones don't come with a jvm. You can build libraries though.
The best way to recycle your code from one application to the next is to try to write in the most general or abstract way you can, i.e. in such a way as to minimize the dependence on any given project.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
decompile an app binary to get back to source code
I've got an iPhone/iPad application, what is kinda interesting. It uses a special internal XML format for the stuff it does, but without a device, I can't see how it works. I want to recreate this function for Android phones (freeware and opensource maybe) but for that I would like to see how the reading part works, actually, I would like to know the XML format itself. It is very hard to re-create from scratch (using only the XML files) as they aren't commented and the names aren't telling anything particular about their function.
All I want to see is how the files are read, what specific tags do, etc, so I can write a converter to convert the iOS output files for my same purpose Android app. And yes, I've checked the Market, there's no such application like the one I want to recreate (and is actually almost totally recreated, I only need a converter or a parser for these iOS specific files).
The binary of all apps from the iOS App store, and on the filesystems of stock OS devices, is encrypted.
Try writing the authors of the app very politely, and see if they'll give or offer to sell you source code for the parser in which you're interested.
As noted here, you can get the assembly code, but you'll never be able to get the source code since there are an indefinite number of ways to represent the assembly.
I am aware of some third party libraries and open source libraries to extract ZIP files within iPhone application.
But I would like to know whether there are any default iPhone frameworks provided in SDK itself?
None that I know of. I have been using Objective-Zip and it seems pretty good for my needs. But I am deflating not inflating.