apple-app-site-association (deeplinking) and Umbraco 10
Hey guys!
I am trying to enable some deeplinking from my site and I have been unable to find out how it works for IOS. Android works out of the box but IOS will not accept my current setup. I have Googled a bit and this is my current configuration:
I have added "UmbracoReservedPaths": "~/.well-known/,~/apple-app-site-association" to my AppSettings.Json file to enable access to the URL. But accessing the url domain.com/.well-known/apple-app-site-association only returns a classic 404.
Then I tried adding the following to my startup.cs file: app.UseRewriter(new RewriteOptions().AddIISUrlRewrite(env.ContentRootFileProvider, "IISUrlRewrite.xml"));
which I assumed created a link between my application and a custom config file that has some specific rewrite rules:
Neither of these approaches have helped. I read somewhere that the file needed a JSON extension, but enabling that only enables the ability to actually hit the URL and see the JSON, but IOS still does not work as intended.
Have you guys tried deeplinking from an Umbraco 9, 10 or 11 site yet? If so, what am I missing here? :-)
I don't think this is related to the umbraco set-up but to the iOS app that should respond to a deeplink. iOS has some strict rules on deeplinking. I am not a iOS dev, but if I was in this scenario I would look at permissions etc on the iOS side.
I will try and figure out how IOS expects a deeplink "app-site-association" file to look like and how it should be handled in an app or elsewhere.
Thanks!
FYI. If I find out that the IOS app or service is the issue, I will mark your answer as the solution and post what had to be done in the app to make it work :-)
It seems like some specific routes are handled differently by Umbraco.
The address /.well-known/apple-app-site-association was not handled by the IContentLastChanceFinder either, but as you wrote only returned a generic 404.
However it is possible to add a custom middleware to handle this situation.
apple-app-site-association (deeplinking) and Umbraco 10
Hey guys!
I am trying to enable some deeplinking from my site and I have been unable to find out how it works for IOS. Android works out of the box but IOS will not accept my current setup. I have Googled a bit and this is my current configuration:
I have added
"UmbracoReservedPaths": "~/.well-known/,~/apple-app-site-association"
to my AppSettings.Json file to enable access to the URL. But accessing the url domain.com/.well-known/apple-app-site-association only returns a classic 404.Then I tried adding the following to my startup.cs file:
app.UseRewriter(new RewriteOptions().AddIISUrlRewrite(env.ContentRootFileProvider, "IISUrlRewrite.xml"));
which I assumed created a link between my application and a custom config file that has some specific rewrite rules:Neither of these approaches have helped. I read somewhere that the file needed a JSON extension, but enabling that only enables the ability to actually hit the URL and see the JSON, but IOS still does not work as intended.
Have you guys tried deeplinking from an Umbraco 9, 10 or 11 site yet? If so, what am I missing here? :-)
Thanks!
I don't think this is related to the umbraco set-up but to the iOS app that should respond to a deeplink. iOS has some strict rules on deeplinking. I am not a iOS dev, but if I was in this scenario I would look at permissions etc on the iOS side.
Hey Roy,
Thanks for replying!
I will try and figure out how IOS expects a deeplink "app-site-association" file to look like and how it should be handled in an app or elsewhere.
Thanks!
FYI. If I find out that the IOS app or service is the issue, I will mark your answer as the solution and post what had to be done in the app to make it work :-)
It seems like some specific routes are handled differently by Umbraco. The address /.well-known/apple-app-site-association was not handled by the IContentLastChanceFinder either, but as you wrote only returned a generic 404.
However it is possible to add a custom middleware to handle this situation.
Adding this to the startupFile:
And then having a middleware like this solved it for me:
is working on a reply...