Sharing sqlite database between two iphone applications - iphone

I want to share my sqlite database between two iphone applications
In one application i am reading and writing into that database and in another
I am reading that data
Can we do this in iphone? And if yes How?
Appreciate any help...
Thanks,
Bhagyashree Dayama

iPhone Apps are sandboxed.. In simple terms If you create/Install a App, a folder will be created where all your files will be stored. In your case you will have your DB inside that folder.. Your app cannot access anything outside its folder. The same way Another App cannot access your Apps files..
So the answer for your question will be NO..

No. There is no way to access files outside your applications sandbox.

As everybody saying my answer is also NO..
but you can achieve the database sharing having a common database at the server and then syncing it on the both local applications.

Related

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

Sharing app-specific files and data between ios users

I am writing an app that allows users to create and save (locally) various visual models. A new requirement has come up to allow users to share their models.
Has anyone had an experience doing this and what is the best way of implementing this? Ideally I would like to be able to attach a file or a link to an email/tweet and then send it off and then it opens the file in the app or if you don't have the app installed it send you to the app in the app store?
Update: The MindJet iPad app does exactly what I need
i think you should make your own api on a http server so you can handle the data the users send. and when some one install your application you can check by making a function execute once the app launched if this user "also i suppose here that you have implement a registration module" have any shared data so you can download it ...
The example app you name (mindjet) seems to be using dropbox for its file service.
http://www.dropbox.com/
This article explains this in great detail:
http://www.raywenderlich.com/1980/how-to-import-and-export-app-data-via-email-in-your-ios-app

Sharing data between my other apps

I am going to have database into my application. and i would like to know is it possible to share the same Db for Other apps we build.
Please let me know
NO WAY because every App running in its own sandbox.
Please check the documentation here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheiOSEnvironment/TheiOSEnvironment.html#//apple_ref/doc/uid/TP40007072-CH9-SW1
There is a way to share your Databases with multiple application,
You have a centralize dataBase and then you create webServices to access them.
Webservices will be linked with that dataBase and different Application can use the same webService to access the dataBase.
but if your App itself have a db then Shiny is correct.
You cannot share that DB with other Apps.

iBooks able to read Files in Other App's SandBox

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