Can my app access the Notes (Apple app) folder in iOS? - ios

I'm writing an app that handles PDF files, and I want it to take the notes created by the Notes app then convert them to PDF then the app can work on that.
Is it possible for my app to access that folder containing the notes without jailbreaking the device?
(I would ask the same with the iBooks app file as well).

All applications are sandboxed so you can not access the Users notes that they created in the Notes Application. Apple provides no SDK methods which you can use without Jailbreaking and private methods.
A potential (but cumbersome) solution could be that Notes could be synced to a Users IMAP account. You could see if you could communicate with the IMAP Server by asking for the Login Credentials and then grabbing the Notes.

Related

Swift - how to access all pdf files on device

I am trying to build an app that will allow users to see all pdf files that are on the device (in some kind of a list with a preview) [Regardless of which app it belongs to on the device, all should be shown]. Is there anyway to achieve this?
Sorry but this is not possible on an iOS device because of a feature called sandboxing. Apple does not allow an app to access the sandbox of another app. Each app sits inside a sandbox of its own. This is iOS's security feature. There is no way to go around this feature.
Reference - About App Sandbox

How to access all the files(pdf, doc etc) in iOS?

How can I find out programmatically all the files present in iOS device and list them out to user? Also I need to download the file in my local application database?
How this can be achieved with Objective-C.
You cannot access all files in an iOS device outside the sandbox of the app. But there are other ways you can achieve this. What you can do is:
Access all the files in Gallery using UIImagePickerController.
Access all the user files in network- Dropbox/Google drive/iCloud. They all have separate public APIs that can be downloaded and used to download/upload files in network.
In this way, you can access most of the user files and use the same in your application.
Simple answer : you can't (on a non-jailbroken device).
Each app is launched is in own sandbox and can't interact with the others apps, expect using API provided by Apple for app-communication (ex: extension)
You should look at that Apple guide about App Sandboxing, which is valid for OSX and iOS apps.
The main difference between these two OS, as quoted directly from the doc :
iOS Note: Because it is not for user documents, an OS X container
differs from an iOS container—which, in iOS, is the one and only
location for user documents. In addition, an iOS container contains
the app itself. This is not so in OS X.
You cannot access all the files outside the app sandbox. But, if they are available at some shared location(network), you can use third party libraries to access them. For eg.
1. For iCloud- iOS provides inbuilt framework of UIDocument
2. For dropbox- DropBoxAPI is available
3. For Google drive- there is a separate library to access files in the drive.
Hope this helps :)

Unofficial API - Access other apps bundle and icons - iOS

I've seen this which pulls the app from the internet and this which is what I'm looking for, but I'm not publishing to the app store.
So is there a way to do the following:
Go into app bundles on the device and extract the icons for those apps using official and/or unofficial APIs ?
As #Gavin specified: Jailbreaking is not an option for this particular case.
Apps are sandboxed on iOS, so even if you're not submitting to the app store, your app is still prevented from accessing files outside your sandbox, which includes the files of other apps on the device.
Now if you wanted to jailbreak your device, you could access files outside of the sandbox. But you didn't state that you were willing to do that, so I am assuming this is out of the question for you.

Specific constraints of iOS sandboxing

I would like read access to the files in the iPhones music directory:
~/Media/iTunes_Control/Music/F**/*.{M4A,MP3}
1) I can't seem to figure out from the docs whether iOS apps are sandboxed such that I would or would not have this permission.
2) Is it necessary to ask for read or write permissions to directories outside the iOS App sandbox ? Only write permissions ? How does one do this, or is it just up to the discretion of the team that reviews the App for app store release ?
3) I have found a lot of information in the apple docs on sandboxing of OS X apps but not of iOS apps. Is there a similar sandboxing/entitlements process for iOS as for OS X apps ? Any useful links I should read ?
Update: as accepted answer says below, 1,2, and 3 are impossible, however it is possible to obtain a copy of a file in the media library, which is in some sense equivalent to having read access to the original - because of course the digital information is identical. This question contains code that does that:
Application crashed while importing songs from Ipod library in Iphone for iOs 5.0
You will not have permission to read/write outside your application.
You will not have permission to read/write outside your application.
You will not have permission to read/write outside your application.
You can use the Media Player framework to access information about the user's library, but nothing using the filesystem.
Sandboxing on iOS is done for you, there is no need to set that up.
You can not write files outside your applications sandbox.
I have not attempted to access music stored by the iPod app, but there is access to media types. It functions much like access photos.
Here is the link to the Apple docs for MPMediaPickerController.

How do I sync iPad Notes without Mail?

The default Notes app on the iPad is fine for my note taking needs. I see how it syncs through iTunes to Mail, but if one doesn't use Mail for e-mail management, is there any other way to sync and view the iPad notes on the desktop?
(We use Eudora for mail management, and Apple's Mail is not great if all you want to do is view your notes with it.)
Apple iCloud can be used for this.
For third party applications that support Android as well see http://www.evernote.com/ and Penultimate
Evernote does good syncing
For general file sync see Dropbox or wuala
If you need more "Enterprisy" features you could have a look at DME from Excitor or Cortado

Resources