How to allow user to upload attachments in iOS application - ios

In case of Android when I want to send or attach a document such as a pdf or doc from my application I can easily access all the files in the external storage and share or attach.
But since iOS follows a sandbox approach as well as there is no filesystem so it is not possible to attach or upload in same manner.
In my iOS application right now, I have implemented Open In functionality, wherein in the info.plist file I have specified that my application supports all types of documents so when the user opens any documents he gets an option to Open In my application, then I save that document in the
Documents/Incoming
folder in the application, now when my user clicks to add attachment then he can see the document to attach, since this is a long process I was looking for better ones.
I saw whatsApp allows uploading/sharing from iCloud apart from that what can I do to provide a similar behaviour as Android.

Related

Phonegap 3.0+ How to print a document and/or send it to another device via email/airdrop/etc without using Mobile Safari

I'm working on a Phonegap 3.1 iOS app.
What I have currently:
I'm using the InAppBrowser plugin to view user-uploaded documents from a server.
The document types users upload are commonly (but not limited to) the following:
.pdf
.png, .gif, .jpeg
.xls, .doc, .ppt
.txt
What I want to do:
Viewing the files works well in the InAppBrowser, but now I am exploring ways that users could send the documents to each other.Mobile Safari has a share button that allows a user to send a file by airdrop, message, mail, tweet, facebook or airprint. I cannot, however, use Safari since it is a non-negotiable requirement that I do not expose the URL where these files are hosted.
The InAppBrowser allows me to hide the location from the user, which is not possible with Mobile Safari. I want to be able to email and print a document without ever exposing the url where that document lives.
Is it possible to create the same sharing mechanism from within a Phonegap app?
What I know so far
I'm aware of the Phonegap File plugin for uploading and downloading files.
If I were to download a file from the server so it was stored locally, how would I go about making it shareable (through email, airdrop, etc)?
From what I can tell, there are no relevant Phonegap 3.0+ compliant plugins to achieve this so I would think I need to create my own. Am I on the right track?

Best place for saving user data for Windows Store App

Disclaimer: I am new to Windows Store App development.
My app is a Windows Store App (for desktop). The app has to create some content using user's input and the data can be considered as documents. Also, the document'd be in a proprietary format. The user should be able to see all those documents listed inside the app every time he launches it.
My question is where to save these document files. I have no issue it is directly accessible to users without using app (it is their data).
The document suggest roaming (limited storage) and local storage. But both are deleted once the app is deleted (bad for the user).
http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
Document also states that accessing right for My Document folder is granted only if the developer is a company (bad for me).
http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx
Any other popular pattern from developers (apart from Azure, SkyDrive and any online storage)?
On app's first launch, you can allow the user to choose his/her folder as per choice, and then add that folder in future access list. So you can access that folder anytime. Please check below given links.
How can I save a StorageFile to use later?
Exploring WinRT: Storage.AccessCache
Windows.Storage.AccessCache Classes

How to Impliment Browse functionality in ios

I want to Implement Browse functionality in my Ipad App.
Actually My requirement is,When i chick on button need to open the all document are existed in device same like as "widows my computer".After Browsing that document,Select any document and I need to Upload the selected document to server.
You only have access to the "sandbox" of your application. It is by default an empty folder. It is called the application documents folder (see here how to get it). Unfortunately, unless you have a jailbroken phone, you have (mostly) no access to other folders.
If you populate this folder with files you can certainly show them in your UI and send them to a server.

Document Interaction Controller

My app is supposed to be able to read and edit PDF, DOC and TXT file formats, so I decided to use another application (let me name it as app2) to open and edit files from my application.
But when I save the file in app2, file gets saved into sandbox of the app2. Is it possible to make app2 save files into my application's sandbox?
The application sandbox secures all of the files for that application... So unless you've gotten some sort of jailbroken phone you're basically going to have 1 app with 1 sandbox (i.e. 1 set of files). However, there are certain dependencies you can take advantage of from within your app. (e.g. you can do things like open a PDF using a WebView if you have iBooks or a PDF reader installed on the phone, or boot the user off to Safari to open a web link)

forcing a file to open in predefined application in iOS

I am trying a simple web app which downloads files from internet and saves on iPad. Theses files are of .pdf,.xls,.doc, etc format. Now, I want to assign a default application to open a specific file type. (Say Adode reader for pdf file, Some image viewer app for image files etc). I dont want my app/os to decide which app the file should open in. Instead, if assigned app doesnt exists then it should give me a message that no such app found. Is it possible to do?
With a web app you cannot do such things.
If you go native, you can use Custom URL Schemes (see http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html)
But with Custom URL Schemes, you only are able to pass a view parameters. If you want more, UIPasteboard is recommended.
Apps are sandboxed. You cannot access other apps, nor their data!!!
But on native apps you can pass over data with pasteboard, call a custom url handler, pass a few parameters to cause the other apps to process your data.
Often App developers, like camera+ offer a documentation for the usage of their custom url schemes (Camera+ URL Schemes API)

Resources