Q: How to open pdf files with siri? - ios

I want siri to open pdf files that are stored into an app.
Is there a way to do this?
Siri -> open pdf file xyz
Thanks

First you need to write an app to render pdfs. Then you need add Document extension to that app to handle opening pdfs. Then you need to add siri extension to handle voice commands.

Related

Is there a way to attach file with outlook's URL scheme?

I'm creating an ios application that opens the outlook app and attaches file. I can open the outlook app via this URL scheme
ms-outlook://compose?to=joe#example.com&subject=Hello&body=Hello but do not know how to attach file. Is there a way to attach the file from the URL scheme? Thank you for your time.
No, there is no way to specify an attachment using a URL scheme or the mailto protocol.

How do I determine that a link is a calendar event from an IOS App and then add it to Calendar?

I have written an iPhone App that looks at a webpage. (I have authorized the App to access Calendar.) One of the links is a calendar link. When I look at that link with Safari, I get a message.
https://www.dropbox.com/s/opzhxcrg8ye2z4v/Screen%20Shot%202018-11-23%20at%201.17.15%20PM.png?dl=0
"The website is trying to show you a calendar invite. Do you want to allow it ...". I can then add it to my calendar. However, when I open that identical link inside my app, my app does not recognize it is a calendar link and then I get options to either Open, Add to Read List, copy ...".
https://www.dropbox.com/s/wd7n8n9bz764wih/Screenshot%202018-11-23%2013.20.53.png?dl=0
My question is how to get my App to recognize that a link is a calendar link?
One determines what should be in the file by the suffix and the MIME content type.
For icalendars, the suffix is .ics and the MIME content type is text/calendar. If a link does not have .ics suffix your app can ignore it, if it has a .ics, then it should check the header for the mime-type.
What is a MIME type?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
What a browser or device actually does with the file depends on what the user has set in the settings. EG: a .pdf will topen in the way that the user has told the browser to open .pdf's - either in browser or adobe reader.
EG in windows for development purposes, I have specified that calendar links (links with suffix .ics) should be opened in my editor rather than my calendar.

Open every files type in iOS

I'm developping a messaging app allowing user to add attachments to their messages.
Is there a way to open every files type ? Maybe like Intent in Android ? Or in WebView ?
Types are docx, pdf, png, jpg, mov, xls, zip, mp3, etc.
There is an apple framework that can allow the user to view local files of these types.
QLPreviewController
This opens most local documents / media files.
To use you have to import QuickLook

can we implement functionality like iBooks in our own app?

whenever we sync pdf files. it shows in our app.
because I want upload that pdf file on server.
but I couldn't find any other way to do that.
I have tried to access pdf from iBooks but there is no way to access other app file in our app.
so is their any way to do that?
appreciate for help
You can upload the PDF to your server and show a webview where you load the URL for your PDF file

How to open link to ePub file in iBooks, when link is in UIWebView

Links to ePub files automatically offer user option to load in iBooks--when the link is accessed from Safari.
However, I have an app with an UIWebView that links to an ePub file. I want to give the user the same option: let the link open in iBooks. However, that option is never given. When the link is tapped, the activity indicator spins for a few seconds, stops, and that's it.
To be clear so that no one flags this as a duplicate question: I do not want to open the epub file within the UIWebView or within the app at all for that matter. I just want the link to open (or give the user the option to open) the file in ibooks.
Any help would be greatly appreciated!
I don't think there's any way to control that, you have to use what the phone let you open.

Resources