I want to open a file browser when I click a button in my application. For example if we want to send an email, we will attach a file by clicking attach file button. Like wise in iOS
if I click a button, a file browser should open and it should be possible to open a file with the ending pdf.
This isn't possible. Your app can only act in it's sandbox or access files which are meant to be shared (like photos or contacts).
Related
I succeeded to make an excel file by using libXlsxWriter in Swift in my App and I have an URL that represent the excel file.
I made Share button for users to share the excel file easily by using UIDocumentInteractionController.
Now I want to add an Open button for users to open the excel file easily with appropriate app such as Microsoft Excel and Polaris Office in my App.
(I know that I can select Polaris Office and Microsoft Excel when I clicked share button but the other share methods are also shown. I want to force open excel app)
However I couldn't find a solution.
How can I force to open excel file with appropriate apps from URL in Swift?
Is it possible?
My app defines a custom document type and when I tap on an attachment my app appears in the "Open in..." menu however I was wondering if it was possible to not show this menu at all but rather open the file immediately in the app.
No, not possible. You have no control over what the Mail app shows to the user when an attachment is selected. The Mail app, like many other apps, uses a UIActivityViewController to give the user lots of other choices. Opening the attachment in your app is only one possible action a user may want to perform on the email attachment.
I am writing an IOS app that needs to be sent a specific file type via email. I have this working - I created a custom attachment type, and I handle opening it in my application delegate's openURL: function. But, when you click on the attachment in the Mail app, it gives you a horizontal list of applications to open the attachment type - such as iMessage, Mail, Notes, Messenger, and some others. My app is in there too. So to open the file in my app, you go through the following sequence:
Click on the attachment in the Mail app
The box pops up asking you to choose the app to open the attachment in
You scroll over and choose my app
The file is opened in my app.
I would like to skip steps 2 and 3. Is there any way to do this? This attachment file is something that will only be handled by my app. I'd like to register my app as the "exclusive" handler for this custom attachment type. Or something like that...
Thanks in advance.
For example, if you open a PDF in Safari, you have the option to open in iBooks - I believe a number of apps have this ability.
How does one "register" the ability of your app to handle such files, and is it possible so that by "long pressing" a link in Safari, you can get the option to open the URL in your app instead of in Safari?
Yes, it is possible.
look at the documentation on "Registering the File Types Your App Supports"
here is a link: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html
For the first part, you are going to want to take a look at Registering Your Support of File Types to add your app to the system list of apps that can open specific document types. That is handled by the system.
For the second part, I could be mistaken, but I don't believe you will be able to get that "long press" functionality as it would require changing Safari. If you control the content of the web page however, you could add a Custom URL Scheme to your app which would allow you to launch it from a web page.
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.