Can I launch an iOS app from the calendar? - ios

Is it possible to launch any of the apps I made directly from the calendar?
If I have a particular entry in my calendar can I link it to an app?

No it is not.
But as CodaFi stated, you could try to implement custom URL schemes in your app and note the appropriate url in the calendar event.
Update:
No, it doesn't work even with the url inside the calendar event because it doesn't recognizes it as a link.
Update 2:
I've found a question with the same problem. Sadly it's not working for me, but i can test it only on iOS6 and it may be broken there.

Yes you can. The app you want to use needs to support URL schema. You must have some text after the schema:// though for Calendar to recognise. It works fine ios4+ (inc 6).
E.g. For Facebook profile you could use fb://me and it will load. Fb:// won't work.

You can open a custom URL Scheme from inside the calendar app with 1 large caveat. The calendar app only recognizes URL schemes that were registered BEFORE the calendar was opened. Meaning if your calendar is open when you install your app, the calendar will not recognize the URL scheme as a valid URL.

Related

Custom URL scheme without confirmation prompt (Swift)

I've found two options to open my app from a Safari web page: a custom URL scheme created in my app project's Info.plist or Apple's Universal Linking. Obviously the custom URL scheme is the easiest one to set up, but the problem I'm having with this is that Safari shows a confirmation window asking "Open myapp?" first and the user has to tap OK before the app actually opens. I want my app to open automatically as the scheme is opened, and I'm being told the only way to do this is through Universal Linking (please correct me if this is not true). If this is true, however, I would like to know if it's possible in any way to put the required apple-app-site-association file on a http:// domain instead of https://? According the official Apple documentation the format of a correct Universal Link starts explicitly with https:// but my domain name can't be loaded on https:// without redirecting a few times and that messes up the web services I've written to execute other tasks in my app. The two main questions I'm left with after this issue:
1) Is it really impossible to work around the confirmation prompt using a custom URL scheme (myscheme://)? If it's not impossible, how can I do this?
2) If I have to use Apple Universal Linking, can I use a http:// domain? If so, how do I do it? Right now if I load up the universal link, it just shows the dictionary inside the apple-app-site-association file, which I'm pretty sure is not supposed to happen. I'm told it's supposed to send a NSUserActivity object to my app delegate. How can I accomplish this with a http:// link?
It is not possible to trigger a custom URI scheme without showing an alert to the user. This used to be possible in iOS 8, but iOS 9 started showing the alert for all apps. And iOS 10.3 has extended that even to the App Store itself. You cannot bypass this. Universal Links were created to replace URI schemes for this behavior, so you do need to use them instead.
From your description, I believe you may be misunderstanding how Universal Links work. To answer the literal questions you asked first, no the Universal Link URL itself does not need to be on the https:// protocol, and yes, the apple-app-site-association must be served over https:// without redirects.
However, it sounds like you're trying to serve the content of the apple-app-site-association file for every Universal Link. That is not the correct implementation — the AASA file is hosted only at https://example.com/apple-app-site-association, and iOS automatically retrieves it when the app is installed. After that, any URL on example.com that matches the criteria in the AASA file will be eligible for Universal Links.
All of that said, you really don't want to built out this system on your own. I suggest looking into Firebase Dynamic Links or Branch.io (full disclosure: I'm on the Branch team).
Is it really impossible to work around the confirmation prompt using a custom URL scheme (myscheme://)? If it's not impossible, how can I do this?
That is possible with some hacky tricks and BAD user experience. It requires user to press "add to home screen" button, so I don't recommend this solution in most cases.
set your app scheme like myapp
create the following html file and put it into the web
window.onload = function() {
if (("standalone" in window.navigator) && window.navigator.standalone) {
window.location.href = 'myapp://open'
}
}
open the html file with safari and "add to home screen"
open the home screen icon and your native app will launch
The point is the meta tag.
<meta name="apple-mobile-web-app-capable" content="yes" />
Without this, safari will launch and confirmation prompt will appear.

Firebase.google.com Firebase Dynamic Links in iOS ( Swift )

How to Open an iOS App using Firebase Dynamic Links and Pass or get Parameters To an App Via Custom URL Scheme in iOS(swift)?

for eg :- https://q3tyj.app.goo.gl/abcd
My URL Scheme is ‘q3tyj.app.goo.gl’ in iOS app in Url Types.
If I type q3tyj.app.goo.gl in safari, I am able to open the application. But if I type q3tyj.app.goo.gl with some extra parameter like https://q3tyj.app.goo.gl/abcd in safari, , I am not able to open the application.

please also explain me how to get “link” parameter (which associated with dynamic link) from dynamic link in iOS app ( Swift ) .


I followed steps which were mentioned in Firebase.google.com for iOS ( Swift ).but its not working.
Thanks,
Nirav Virpara
It's hard to know exactly where your error is, but a few things to help you debug:
If you go to https://q3tyj.app.goo.gl/apple-app-site-association, you should see some JSON that points to your app. If you don't see this, make sure you've entered your team ID and your App Store ID in the project settings in the Firebase console
Make sure you're using your Bundle ID, not the shortlink domain, as your custom URL scheme in Xcode
Make sure you've enabled Associated Domains in the Capabilities tab of your Xcode project, and your domain looks like applinks:q3tyj.app.goo.gl
Universal Links (and, therefore, Dynamic Links) generally don't work if you type them directly into the Safari address bar. Instead, try typing the URL into an app like Notes and then clicking on them from there.
Good luck!
If you type https://q3tyj.app.goo.gl/apple-app-site-association this link in your browser and check, you will end up seeing a json, meaning your apple-app-site-association is correctly configured on your google website. However, you need to make sure that teamid in your google console or appid is correct.

Get referrer string for Universal Link?

I implemented Universal Links in our iOS 9 app and they work by calling a method in AppDelegate.swift, in which I get an NSUserActvity with an URL attached to it.
Is there a way to get the (HTTP-) referer? I need to know on which website the user has tapped the link that opened the app.
You should be able to use NSUserActivity > referrerURL instance property. See https://developer.apple.com/documentation/foundation/nsuseractivity/2875762-referrerurl.
No, there is no way to get the referrer.
An Apple employee made that pretty clear on the developer forums: https://forums.developer.apple.com/thread/65423
They say that the only way to get some kind of referrer would be to append it to the URL. Maybe take a look Google's campaign tracking URLs (utm_...).
I found another interesting solution if you need to support iOS 9 and 10 - https://appmetrica.yandex.com/blog/referrer-based-tracking-dlya-ios-tochnaya-atributsiya-dlya-lyubogo-istochnika-trafika.
Since iOS 11 I guess can be used NSUserActivity > referrerURL.
In short:
SFSafariViewController uses the same cookies as Safari app.
You can open invisible SFSafariViewController inside your app.
If your site contains some cookie - use Universal Link to pass it back to the app.
Though it requires to implement something like tracking link on your site.

Is it possible to add PHG affiliate parameters to these new App Store launch URLs in iOS 7?

To launch app page in App Store app on iOS 7, this URL format is required:
#"itms-apps://itunes.apple.com/app/id%#"
Can you also append the affiliate ID and campaign token to this URL like this?
#"itms-apps://itunes.apple.com/app/id%#&at=%#&ct=%#"
Or does it have to be a plain
#"https://itunes.apple.com/app/%#/id%#?mt=8&uo=4"
type URL like you do in websites? Disadvantage of this URL is it opens Safari and causes redirects.
Try it and see; the link will either open or it won't, and if it does, and if you specify a custom campaign for testing, it will either show up in PHG or it won't. Let us know what happens, as I'm curious myself.
Oh, and if it doesn't, please file a bug, as that seems like a useful feature, and it should be trivial for Apple to add it if they haven't already.

Possible to launch Apple's default weather app from my application?

One of my client wants to open Apple's native weather app from our application. After few I don't see a possible way, unless we need to go with any 3rd party apps which provides custom url scheme.
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
It would be great if someone confirm or give me a lead if it is possible.
Its not possible, the weather app doesn't have a known URL scheme and I dubt that it has an unknown one.
The website handleOpenURL is an excellent resource for custom iOS URL schemes; use this link to search for the known Apple app schemes.
Unfortunately the weather app is not among them.
Another couple of sites with schemes (handleOpenURL seems to be the most complete, but it can't hurt to check the others):
app lookup
Akosma iPhone URL Scheme Wiki
You can open the weather app with this URL: weather://
Here is a codepen demo I got to work: https://codepen.io/irom1/pen/KKeZBMW
Open weather
I found another site for sharing the url scheme - http://schemes.zwapp.com/

Resources