CalDAV: Where is the URL Component for iOS? - ios

On iOS, you can create reminders with a URL (https://www.example.com/example.php?key=value) attacted to it (open any web page, open share dialog, tap reminders app).
It syncs correctly between devices (with the full URL), however on my CalDAV server, the To-Do is stored as
BEGIN:VCALENDAR
PRODID:Open-Xchange
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VTODO
DTSTAMP:20200622T134803Z
SUMMARY:Example Reminder
DESCRIPTION:www.example.com
CLASS:PUBLIC
STATUS:NEEDS-ACTION
UID:A0F91D70-6F05-4D91-934A-7E7990B873D5
CREATED:20200622T134404Z
LAST-MODIFIED:20200622T134738Z
END:VTODO
END:VCALENDAR
meaning there is no component to store the full URL (the description is only the host and doesn't contain the full request URL).
How can I include the URL so that iOS understands it when creating reminders on the server side?
RFC 5545 has an URL: component that iOS doesn't interpret.

Related

How iOS URL Scheme work with a https website

I was developing an iOS application which need to work with a website. I'm not the owner of website so I cant use the universal link. I tried to open the website url https://example.com/xxx/xxx directly when I set the https://example.com/xxx/xxx as URL Scheme , however it will only display the website but won't asked for open the apps. What is the problem and can I do to achieve the expectation below?
Expectation:
When the user open the website
Phone w/ app - open the website and ask for open the app
Phone w/o app - open the website
I have similar problem with this question.
iOS URL scheme or not existing Universal Link
If you don't own the website you want to deep link to, you can't dictate the behavior once the user lands on that destination in their browser – that would need to be handled by that website.

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.

Block content of Safari

To block web content I need to create an iOS background app. Which will get the URL address from any browser on the device, before loading the URL content check that URL by HTTP web service. Is there any way to get URL address from any browser on the device?
There is an app in app store Shield, which can filter any safari URL before loading content. How does this app acquire the safari web URL to filter the content? Is it possible to acquire web URL of any browser from another app in iOS?
Please let me how to achieve that.

How to open Apple Maps from another app

My company created an app that sends location deals in an app inbox. I want to send directions in the appmail so that if someone clicks on 'Click here for directions' it will automatically open directions from current location to the requested point in the Apple Maps app.
When I email the URL to myself and open it with AppMail, it works perfect.
When I send the URL via AppMail, it opens the URL in safari via GoogleMaps.
This is the URL I'm using.
>>Click Here for Directions<<
You need to change:
http://maps.apple.com/?...
To one of:
http://maps.apple.com/maps?...
or
http://maps.google.com/maps?...
The apple.com URL is technically the correct one, but the google URL is the only one that will work properly on older versions of iOS, and new versions of iOS also support it as well (although I don't know how long that will last).

Is there a way to intercept URLs so they are opened in my app

Is there a way to intercept URLs on iOS (iphone/iPad) such that a URL from a specific host is always opened by my app and not by the browser?
Example: http://myapp.com/ref/123 -> gets opened by my app and I parse out the 123
Update
I find it really weird that this isn't allowed on iOS (iphone/ipad). On Android I've been able to intercept a url and whenever it begins with http://myapp... it gets opened in my app.
How does the community solve the issue of: Say a user who has my app installed on their iphone gets a link from a friend in an email. When they click it, if the link can't be opened in my app...how else am I suppose to do anything good with the shared url? OR should I not be passing http:// links but myapp:// instead??
The scheme name (or protocol) of a URL is the first part of a URL - e.g. schemename://. For web pages, the scheme is usually http (or https). The iPhone supports these URL schemes:
http, https, ftp Web links* (Safari)
mailto E-mail links (launches the Mail app)
tel Telephone Numbers (launches the phone app)
sms Text Messages (launches the SMS app)
iPhone apps can specify their own custom URL scheme (for example, myapp://doStuff). But it's not possible to redirect a specific http host to be opened by your app.
To add a custom URL scheme to your app follow this guide,
Custom URL schemes

Resources