I am trying to import a PDF file from other applications, such as mail, but I'm not sure exactly what I should be looking for. I want my user to be able to tap on the share button in a PDF and my app to be listed there as a place that can accept them, such as "Copy to iBooks"
Any good tutorials? Or suggestions as to what I should look for?
Preferably in Swift
Thanks!
You may use Action Extension for making PDF available in your app
Below i have linked Some Tutorials for Action Extension which is not perfect for your requirement but you check the concept and basic implementation for it
Bookmark from Browser
Read a text
Official apple doc
You can tell your app which types of documents it will support in the info.plist. A good place to start is Registering the File Types Your App Supports
in the iOS documentation.
Related
I want to open app from an external link, for example a link that I get in iMessage, the question is, I should use deepLink or universalLink, I want to open the app when I tap on the link, then having ability to read the url in the app is enough for me.
And for this matter, I should set a Json file in the website as well? something like this:
https://developer.apple.com/documentation/xcode/supporting-universal-links-in-your-app
It's a bit confusing for me, could anyone gives me a real example and steps?
Thank you
Yes, basically both the app itself and the website need to be aware that you are going to be using Universal Links. There are a few steps to do this:
First you need to include the website as an Associated Domain inside of your Xcode project.
Then for the website you do have to create what is known as the apple-app-site-association file. This lets the the website know which apps are associated with the website.
This tutorial has a step by step on How to setup your website to work Universal Links.
Lastly you will have to have to update your AppDelegate file to handle when a Universal link opens the application.
More info can be found in the official Apple Documentation on Creating Universal Links.
I want to allow the user to upload the files in my iOS application just like the way we upload a particular file in desktop applications with browsing through the different directories. I did some googling too, but did not find the reliable solution.
Someone says that.
The whole file system is not available, if you're running a non-jailbroken phone. Neither are there filesystem browser controls (for the same reason), However, you can browse the user's photo library, or even take a photo with the camera using UIImagePickerController.
Some questions were like this
Is iOS developer able to view file systeme
How to list all folders and their subdirectories/files in iPhone SDK
From these links and from other sources,
I am only confused that can i provide the file browse option to user on button tap. And if yes, then how it can be achieved? Any help will be appreciated.
If the user taps on the Browse button the list should be there like
iPhone apps are sandboxed. This means that you can only access files/folders inside your AppBundle (like Documents, Cache and the like). That is what the above mentioned URLs are suggesting. You can only upload/download data from/to these folders.
Now if you have a jailbroken phone, its a different scenario. Not going into that.
Check this link out:
Apple iOS Environment under that The App Sandbox
There is no standard control for this purpose, but using the methods mentioned in the posts you referenced, populating a table view is perfectly doable. Keep in mind that this will allow you to view the files in your application's sandbox. You cannot access files of other applications.
Alternatively, you can use open source libraries like the ios_file_browser or the iOS-File-Browser. These provide user interface and you can check out the implementation as well.
Starting in iOS 8, you can use UIDocumentPickerViewController, "a view controller that provides access to documents or destinations outside your app’s sandbox":
https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller
I'm an author of FileExplorer control which is a file browser for iOS. It allows you to browse files and directories that are placed inside your sandbox in a user-friendly way.
Here are some of the features of my control:
Possibility to choose files or/and directories if there is a need for that
Possiblity to remove files or/and directories if there is a need for that
Built-in search functionality
View Audio, Video, Image and PDF files.
Possibility to add support for any file type.
You can find my control here.
i wanted to display the list of files like it is done in itunes .how can it be done please help me out im a beginner
the screen shot is here
That thing you are referring to is called coverflow and there is open source library that provides such functionality
https://github.com/devinross/tapkulibrary
The CoverFlow API Apple uses is (I think) still private, there's open source implementations like OpenFlow, there's lots of resources on how to get started with it if you dig around on Google.
I'd like some kind of overview tutorial that shows how this works. I have only found very specific ones so far which deal with complex problems like file packages etc., but I only need simple images import/export.
Does someone know a tutorial or example project which does just that?
Better late than never, I guess...
This is the best documentation I've seen for file sharing:
http://www.raywenderlich.com/1948/how-integrate-itunes-file-sharing-with-your-ios-app
If your needs are basic you can just enable UIFileSharingEnabled in your Info.plist and you should be able to read/write to the documents directory of the app without further coding.
There appears to be iPad applications that can edit MSWord documents such as "Pages". My question is how can this be accomplished programmatically? Are these apps using OpenXML to do this or is there another way to do it. An API or something? Thanks in advance.
These applications such as Pages use private code to read documents and edit it. At this time there is no OpenXML library for the iPhone SDK. The iOS provides a way to display documents (doc, ppt, xls, pdf) by using the UIWebView but no other API.
Developing a word editor is a real challenge, we did a small rich text editor and it was a very interesting project.
Good luck!
You can now show a button which will allow the user to press it and send the document to another app for editing, the list of apps the file can be sent to is managed by Apple code, so you don't have to do much. Google "ios document controller"