How to config apple-app-site-association to open/redirect only link with specific url query?
For example I would like to open only links like this https://www.example.com/?modal=CreatePassword
This is my current config an it opens all links even without the url query (modal=CreatePassword)
"applinks": {
"details": [
{
"appIDs": [
"com.app"
],
"components": [
{
"?": {
"modal": "CreatePassword"
}
}
]
}
]
}
I found that iOS keeps/downloads old file even after reinstallation of the app(delete -> install). This video was very helpful: https://youtu.be/xxyEq_ySoO4
I downloaded sysdiagnose file from my iPhone and checked swcutil_show.txt, and found that it keeps old version of the apple-app-site-association file.
The correct config for me:
{
"applinks": {
"details": [
{
"appIDs": [ "com.app" ],
"components": [{
"?":{"modal":"CreatePassword"},
"/":"/"
}
]
}
]
}
}
Related
I correctly have created Universal Link on iOS side and also successfully upload it to the domain.
Apple Validate service shows me that all work fine but I can't open specific links because the syntax of the component wrong
My file:
{
"applinks": {
"details": [
{
"appIDs": [ "K6789HNH.com.example-app" ],
"components": [
{
"/": "/#/market/lettings"
},
{
"/": "/#/market/lettings/*"
},
{
"/": "/#/market/acquisitions"
},
{
"/": "/#/market/acquisitions/*"
}
]
}
]
},
"webcredentials": {
"apps": [ "K6789HNH.com.example-app" ]
}
}
Example of links:
https://example.com/#/market/lettings/49830?view=grid
https://example.com/#/market/acquisitions/50134
I follow the Apple example of components https://developer.apple.com/videos/play/wwdc2019/717/ , time code 7:23 - 9:00
Image from example above
What is my syntax problem with components?
The problem was in the symbol "#", it's a fragment, a little info about URL
I change components to :
"#": "*market/lettings*"
and
"#": "*market/acquisitions*"
And all work well, symbol * used for handling all value between # and market/. Example: www.example.com/#.......market/lettings, instead of ... can be any of the symbols like www.example.com/#/market/lettings/123
I recently developed an App Clip and published it on the App Store. I've created the default app clip experience and put the apple-app-site-association file in the .well-known directory. The JSON looks like this.
{
"applinks": {
"details": [
{
"apps": ["T3Y3F3XXXX.it.company.my-app"],
"components": []
}
]
},
"appclips": {
"apps": ["T3Y3F3XXXX.it.company.my-app.Clip"]
}
}
This is what I've done on App Store Connect:
My meta looks like this:
<meta name="ARShades" content="app-id=1586660000, app-clip-bundle-id=it.company.my-app.Clip, app-clip-display=card">
The problem is the Smart App Banner won't show. I think I've met all of the Apple stated requirements here: https://developer.apple.com/documentation/app_clips/supporting_invocations_from_your_website_and_the_messages_app
Try using the below JSON in apple-app-site-association file :
{ "applinks": {
"details": [
{
"appIDs": [ "T3Y3F3XXXX.it.company.my-app" ],
"components": [
{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
}
]
}
] },
"appclips": {
"apps": ["T3Y3F3XXXX.it.company.my-app.Clip"]
}
}
I am using below URL to search files in Onedrive. How to add the query string as "Sourcecode"?
https://graph.microsoft.com/beta/search/query
Request parameters:
{
"requests": [
{
"entityTypes": [
"driveItem"
],
"query": {
// "queryString": "Presentation.pptx"
//"queryString": "contoso filetype:pdf OR filetype:docx"
//"queryString": "contoso
path:\"https://contoso.sharepoint.com/sites/Team Site/Documents/\\""
}
}
]
}
The sourcedoc value should be the same as id of the listItem which represents an item in a SharePoint list.
Try to specify the sourcedoc value in queryString.
Example:
{
"requests": [
{
"entityTypes": [
"listItem"
],
"query": {
"queryString": "C2CB147F-1B73-4307-990E-37F7CBE090C6"
}
}
]
}
It will search across the metadata including id.
I implemented universal deep links in my React Native app:
Linking.ts:
const config = {
screens: {
details: {
path: "details",
},
menu: {
path: "menu",
},
orders: {
path: "orders",
},
share: {
path: "share",
},
},
}
export const linking = {
prefixes: ["https://getdad.co.uk", "dad://"],
config,
}
apple-app-site-association:
{
"applinks": {
"apps": [],
"details": [{
"appID": "<TEAMID>.io.feastly.dad",
"paths": [
"/details",
"/menu",
"/order",
"/share"
]
}]
}
}
They work fine on the Simulator (direct to the correct page, etc), but on a real device they only direct to the app (i.e. they open the app normally, they don't link to a specific screen)
I tested it in multiple ways on the Simulator (e.g safari, address book, from command line)
Any ideas?
Add http:// and the bare url to your linking file. https goes to safari on the iphone, don't know why, don't care, this works:
export const linking = {
prefixes: [
"https://getdad.co.uk",
"http://getdad.co.uk",
"getdad.co.uk",
"dad://",
],
config,
}
I have implemented universal links and working fine but now I need to exclude few url types from opening app so i tried following ways with apple-app-site-association file.
{
"applinks": {
"apps": [],
"details": [{
"appID": "abc",
"paths": ["NOT /test_url_1/", "NOT /test_url_2/"]
}]
}
}
"paths":["NOT /test_url_1/", "NOT /test_url_2/"] - will ignore ALL urls, no redirection to the mobile app
{
"applinks": {
"apps": [],
"details": [{
"appID": "abc",
"paths": ["NOT /test_url_1/", "/test_url_2/"]
}]
}
}
"paths":["NOT /test_url_1/", "/test_url_2/"] - will ignore /test_url_1/ url, allow /test_url_2/ and ignore other urls
{
"applinks": {
"apps": [],
"details": [{
"appID": "abc",
"paths": ["NOT /test_url_1/", "NOT /test_url_2/", "*"]
}]
}
}
"paths":["NOT /test_url_1/", "NOT /test_url_2/", "*"] - will open ALL urls in the mobile app
I just need to ignore test_url_1and test_url_2 and open mobile app for other urls. Is there anyway to do this? am I missing something here?
Your third example should be correct, and matches both the specifications and examples I've seen in working practice before. We'd probably need to see non-anonymized data and actual links to debug any further.
You could possibly also try this:
{
"applinks": {
"apps": [],
"details": [{
"appID": "abc",
"paths": ["NOT /test_url_1/*", "NOT /test_url_2/*", "*", "/"]
}]
}
}
You have to check it by casting each of your url to string and look for the ur that you don't want to be in your new url path like so
let url = URL(string: "/test_url_1/somepoints/")!
let urlString = url.absoluteString
var newURL:URL!
if !urlString.contains("test_url") {
newURL = URL(string: urlString)
// use the new url now
}
for a big list of urls you have to make this test inside a for loop and generate the urls that you want