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
Related
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"},
"/":"/"
}
]
}
]
}
}
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 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 am developing a speech recognition for a custom device using Google Assistant SDK. I am using Action SDK to create custom actions.
In my example the Google Assistant doesn't recognize actions in german language in case these actions are marked with "locale": "de" and the assistants language is set to german. I recognized that query patterns are understood clearly, but the event is not triggered. If everything is set to english the events are triggered.
action.json
{
"locale": "de",
"manifest": {
"displayName": "Blink Licht",
"invocationName": "Blink Licht",
"category": "PRODUCTIVITY"
},
"actions": [
{
"name": "com.acme.actions.blink_light",
"availability": {
"deviceClasses": [
{
"assistantSdkDevice": {}
}
]
},
"intent": {
"name": "com.acme.intents.blink_light",
"parameters": [
{
"name": "number",
"type": "SchemaOrg_Number"
},
{
"name": "light_target",
"type": "LightType"
}
],
"trigger": {
"queryPatterns": [
"lasse das $LightType:light_target $SchemaOrg_Number:number mal blinken"
]
}
},
"fulfillment": {
"staticFulfillment": {
"templatedResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Das Licht $light_target.raw blinkt $number mal"
}
},
{
"deviceExecution": {
"command": "com.acme.commands.blink_light",
"params": {
"lightKey": "$light_target",
"number": "$number"
}
}
}
]
}
}
}
}
],
"types": [
{
"name": "$LightType",
"entities": [
{
"key": "LIGHT",
"synonyms": [
"Licht",
"LED",
"Glühbirne"]
}
]
}
]
}
hotword.py - snipped of event processing
def process_event(event, device_id):
"""Pretty prints events.
Prints all events that occur with two spaces between each new
conversation and a single space between turns of a conversation.
Args:
event(event.Event): The current event to process.
device_id(str): The device ID of the new instance.
"""
if event.type == EventType.ON_CONVERSATION_TURN_STARTED:
print()
print(event)
if (event.type == EventType.ON_CONVERSATION_TURN_FINISHED and
event.args and not event.args['with_follow_on_turn']):
print()
if event.type == EventType.ON_DEVICE_ACTION:
for command, params in process_device_actions(event, device_id):
print('Do command', command, 'with params', str(params)) #
if command == "com.acme.commands.blink_light":
number = int(params['number'])
for i in range(int(number)):
print('Device is blinking.')
Project language in action console is German:
enter image description here
To update and make the action available for testing I used "gaction CLI".
The question: Why is the event/command "com.acme.commands.blink_light" in hotword.py not triggered in case using german language?
Thanks in anticipation!
Here's how I solved this problem:
1. Go to your action on google console and pick the project you're having this trouble with.
2. In the 'Overview' section you'll see a window with the languages of your action on top, and at their right a 'Modify languages' in blue. Click it and then delete the langauge you're not using, english in this case.
At least that worked for me.
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