I am working on universal link. I had some urls to open in my application.
I had added portal.xyz.com in associated domains.
Problem : My application opens on https://portal.xyz.com/. I want to continue this URL to browser. Just want to open URL that having start path https://portal.xyz.com/da/notification**.
How can I do this?
Please keep same associated domain in your project and you need to handle this case from apple-app-site-association file that you have uploaded in server,
{
"applinks": {
"apps": [],
"details": [
{
"appID": "9JA89QQLNQ.portal.xyz.com"//keep your Apple Id of you application,
"paths": [ "/da/notification/*"]
}
]
}
}
Ref: https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
Hope it will be helpful.
Related
I have an AASA file which is working great so far. Basically it routes everything to go inside my app:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "my.app.id",
"paths": [
"/uni/*",
"*"
]
}
]
}
}
So, every link the user click which has mydomain.com redirects to my app! Which is great so far!
But my loved company had the greatest idea to mess with my sleepy nights and decided to release a new product which is working under newproduct.mydomain.com so in the newsletter emails, every time our users tap on a link, it opens my app... although it should be redirected to the web.
What we tried to do is to create a blacklist inside the AASA, but it didn't work... reading around we saw that the user should reinstall the app in order to make it work. The way we did the AASA with blacklist is:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "my.app.id",
"paths": [
"NOT /uni/*",
"*"
]
}
]
}
}
The solution we are seeing is to threat the link inside the app and if we see is coming from newproduct.mydomain.com we redirect the user to safari, but that will require a release.
My question is... is it possible to make every link in newproduct.mydomain.com to be redirected to the web without an app release?
I’m using Universal link to achieve forgot password functionality in my app
When user click on forgot password we take email input & based on that generate link like below & send email, over that link I want that my app open reset password screen
https://www.domain.in/resetpassword?emailId=test#gmail.com&deviceId=udid
on developer.apple.com I enabled associate domain & add entitlements to app & add domain in capabilities section
Url handlers also added to app delegate
AASA file is also validate successfully with https://branch.io/resources/aasa-validator/#resultsbox
{
"applinks": {
"apps": [],
"details": [
{
"appID": “teamId.com.organization.appname”,
"paths": ["https://www.domain.in/*”]
}
]
}
}
still the link open on safari.
Something I forget to add or may be paths key value in AASA file is wrong ?
I prefer following link for implement universal link,
https://medium.com/#abhimuralidharan/universal-links-in-ios-79c4ee038272
You need to add meta tag on your server where AASA file is uploaded
Example for meta tags :-
<meta name="apple-itunes-app" content="app-id=yourAppStoreID, app-argument=ThisPagesUrl>">
or
<meta property="al:ios:app_store_id" content="12345" />
Enter your Associated Domain without "www", as: "applinks:domain.in"
In AASA (apple-app-site-association) file you can use "*" as a wildcard to enable all paths in a directory.
Write down this way:
{
"applinks": {
"apps": [],
"details": [{
"appID": "teamId.com.bundleId.of.your.app",
"paths": ["*"]
}]
}
}
I am using Unviversal link in iOS application.
I am referring Apple doc: https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
I want to open app for only one path. example domain is https://example.com and paths are /a, /b, and so on. I want to give access to only '/b' path.
How do I do it?
Universal Links operate on an opt-in basis for URLs. In other words, if you don't explicitly specify a path in the apple-app-site-association file (either by literal string or wildcard matching), it won't be used.
Using Apple's example as a basis:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "9JA89QQLNQ.com.apple.wwdc",
"paths": [ "/b"]
}
]
}
}
Identify an area that should not be handled by adding “NOT ” (including a space after the T) to the beginning of the path string. For example, you Want to prevent to handle the /videos/samples/2010/* area of the website then the paths array as shown here:
"paths": [ "/videos/collections/*", "NOT /videos/samples/2010/*", "/videos/samples/201?/*"]
Here is my actual apple-app-site-association file:
{
"applinks": {
"apps": [],
"details": [ {
"appID": "XXXXXXXXX.com.example.app",
"paths": [
"NOT /Registration",
"/*"
]
}]
}
}
I would like to allow every urlendpoint to working as universal link, expect the example.com/Registration/whatever
But the above code not working. If I click on a registration link, it open my application.
I tried a lot of version of this file eg: "NOT /Registration/*", "NOT /Registration*", "NOT /Registration/", but no one work.
What is wrong?
UPDATE:
Here is my full example registration link:
https://example.com/Registration/AccountActivation?activationCode=XXXX
I do not have a fix for your problem, but I can give you a possible explanation. I'm leaving this here for reference in the hopes that I overlooked something.
Did you try reinstalling the app after changing the file? I had a simmilar problem not long ago. It seems that apple is only fetching the file once on install. From the orininal source:
During my troubleshooting, I discovered it’s best to verify an app is
making the HTTPS request for the apple-app-site-association file. It’s
important to know that apps only attempt to this once per
installation. The request occurs the first time an app is launched
after installation. Furthermore, force closing an app and then
launching it will NOT trigger the app to reload
apple-app-site-association.
via https://medium.com/#barsh/my-first-date-with-ios-universal-links-90dfabc88bb8#.wyrslx2di
As I said, there seems to be no solution on updating the file without a reinstall of the app.
NOT /Registration is a match for yourdomain.com/Registration but not any subpath e.g. /Registration/AccountActivation....
I believe this should achieve what you're looking for:
{
"applinks": {
"apps": [],
"details": [ {
"appID": "XXXXXXXXX.com.example.app",
"paths": [
"NOT /Registration/*",
"/*"
]
}]
}
}
I implemented Universal Links. The apple-app-site-association is structured as follows:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "APPID.my.awesome.newspaper",
"paths": [ "NOT /webapp/issue/*/ads/*", "/webapp/issue/*/*.html" ]
}
]
}
}
For some reason the first path with the NOT is not considered at all.
For example:
These URL's are handled as expected:
awesome-newspaper.my/webapp/issue/sz/2016-01-22/page_2.157908/article_1.2828646/article.html
awesome-newspaper.my/webapp/issue/sz/2016-01-22/page_2.157908/page.html
This URL should not be handled as Universal Link and should always open in Safari.
awesome-newspaper.my/webapp/issue/sz/2016-01-22/ads/ad_145/index.html
But it always opens in the App as well.
Can someone please help me out?
i think the problem is that your URL matches both cases, which is then making the results unpredictable.
try making the paths mutually exclusive. if thats not possible you may need to change the URL structure.
UPDATE:
it's possible that your NOT string is ill formatted, try changing it to: "NOT /webapp/issue/*/ads/*/*.html"