iBooks able to read Files in Other App's SandBox - iphone

I want to know if i can develop an app that would download books in epub format from a website and then it would be accessed by iBooks ( iPad app for Reading books ) to read that file.
The issue in my view is that an application can access files present in its own SandBox and it is not allowed to access any file outside it. Please explain if there is any way that files can be downloaded to a specific location on iPad which would be accessible by other apps.
Thanks!
Taimur

No, apps generally cannot access files outside their sandbox (except Apple's own apps, of course, but it is very unlikely they would interfere in another app's sandbox).
However, that is why Apple introduced UIDocumentInteractionController.

Thanks Everyone i have found the answer!
http://andycodes.tumblr.com/tagged/uidocumentinteractioncontroller

Related

Is there a way to access iphone's browser history and app history

I dont know whether iam asking a right question..,kindly give your valuable advice.
I want to know:
Is it possible to access iPhone's browser history in our code?
Is there any way to access app histories (means; which apps i opened recently & what time.)
waiting for your valuable reply.. Thanks.
App History can be accessed via a few methods. There are ways using Private APIs, but if you are aiming of the App Store that is probably not a good idea.
Here is a UIDevice category to get the Processes currently running on your phone using Public APIs. You have to figure out which app matches which process name, but I have found that it is usually pretty straightforward (e.g. Facebook is Facebook).
For your Both Questions.. No as Apps are sandboxed in ios.
How to access iPhone Safari History in an App?
Getting safari history from phone
How to access Safari history from iPhone App using Private Frameworks
We can find the history.plist in /var/mobile/Media/Safari/ and this we can read in jailbreaken iPhone. And You dont have a way to access app histories either.
There is a History.plist located at /private/var/mobile/Library/Safari for the jailbroken device only.
The history is stored in a property list outside of your applications sandbox and you cannot access it.

How can i access iPhone files via Objective-c?

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.

Access files of one Application from other application in ios

Can we have shared storage in iPhone which is accessible to other ios apps?
I am working on one ios app which downloads updated files from server. And there will be some other application which uses those files. So for that I want to save downloaded files on particular location. So that I can access those files from other application.
So the flow will be like this,
Application1, which will download files from server.
And
Application2 or Application3..... will use those files.
Do we have such type of shared location in iOS. Is it possible in iOS?
Thank you in advance.
No. Its not possible as your application will be in sandbox mode.
All applications are sandboxed as the other answers have said.
However, if you own both apps, or you know the developer of the other app, you could always use some sort of cloud storage, but that may defeat the point of you asking this question
You can't "share" files between in iOS, because all apps are sandboxed and can't access other files besides its own files with the public APIs.
Maybe you could combine the functionality of all the separate apps into a single app. Have each one be a module accessible from a master menu.
Read Apple Doc File System Basics

Iphone - How to Read book file from device

I imported pdf file to iphone device using iTunes. I verified that the pdf file stored in 'root/user/media/books' path. Can i read this file in my program?
Is there any way to read the file? Please Help me.
Thanks in advance.
The SDK doesn’t provide any access to the books (including PDFs) in the user’s media library. For your app to read a PDF that was added via iTunes, it needs to be added to your app specifically, using the iTunes file sharing malarkey (look up “UIFileSharingEnabled” for more information on that). You can file an enhancement request with Apple to try to get them to add support for accessing the user’s book library, but don’t count on it.
Here is a guide on how to view a pdf on the screen. Here is a previous post about how to parse a pdf using CGPDFScanner. Hope that helps!

Loading remote application would it lead to App Store rejection?

I have an application using JQtouch and would like it to be on the App Store.
Will my application get rejected from the App Store if all the functionality is done remotely (loading in UIWebView) and I provide no offline functionality?
Thanks.
From the Apple App Approval Guidelines:
12.3: Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected.
Basically if your app does not add anything to the experience of viewing the website, then you may get rejected.
I have had apps approved in the app store that were just a web view pointed on a JQTouch application. However, I loaded the .html from a local file included in the app. I believe the no "web clippings" clause of section 12.3 in the App Approval guidelines is only meant for clippings of full web sites. Embedding a mobile web application in a local app will likely get accepted.
I don't think this should be a problem. Apple reviewers are probably the most fickle people on the planet, but I can think of several apps that are UIWebView based, and which provide little or no offline functionality.