Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update file format for apple-app-site-association in "Set up universal links for iOS" guide #10488

Closed
meme1255 opened this issue Apr 30, 2024 · 1 comment · Fixed by #10561
Closed
Assignees
Labels
devos.macOS Relates to developing apps on macOS platform e1-hours Effort: < 8 hrs from.flutter-sdk Reported via move from flutter/flutter p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.add-to-app Relates to adding Flutter components to native app target.iOS Target apps on the iOS Platform

Comments

@meme1255
Copy link

meme1255 commented Apr 30, 2024

Steps to reproduce

The proposed apple-app-site-association
file is incorrect :

{ "applinks": { "apps": [], "details": [ { "appID": "S8QB4VV633.com.example.deeplinkCookbook", "paths": ["*"] } ] } }

Corrected association file

Since iOS 14, additional features have been introduced. The correct file structure follows:

{ "applinks": { "apps": [], "details": [ { "appIDs": [ "S8QB4VV633.com.example.deeplinkCookbook" ], "paths": [ "*" ], "components": [ {"/": "/*"} ] } ] }, "webcredentials": { "apps": [ "S8QB4VV633.com.example.deeplinkCookbook" ] } }

Expected results

App link offers redirection into the app.

Actual results

No redirection is offered.

Code sample

{
"applinks": {
"apps": [],
"details": [
{
"appID": "S8QB4VV633.com.example.deeplinkCookbook",
"paths": ["*"]
}
]
}
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
sudo swcutil dl -d <domain> --verbose
SWCErrorDomain 7 {
	Line: "275",
	Function: "-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:]",
	NSDebugDescription: "SWCERR00401 Bad JSON content -- {"cause":"invalid character ':' after top-level value"}",
	NSUnderlyingError: "Error Domain=HTTP Code=404 "(null)" UserInfo={Line=275, Function=-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:]}"
}
sudo swcutil dl -d <domain with corrected file> --verbose
{
    applinks =     {
        apps =         (
        );
        details =         (
                        {
                appIDs =                 (
                    "team.app.id"
                );
                components =                 (
                                        {
                        "/" = "/*";
                    }
                );
                paths =                 (
                    "*"
                );
            }
        );
    };
    webcredentials =     {
        apps =         (
            "team.app.id"
        );
    };
}

Flutter Doctor output

Not needed.

@huycozy
Copy link
Member

huycozy commented May 2, 2024

Hi @meme1255, this issue should be addressed on website repository. Transferring this issue for better support there.

@huycozy huycozy transferred this issue from flutter/flutter May 2, 2024
@atsansone atsansone added p2-medium Necessary but not urgent concern. Resolve when possible. e1-hours Effort: < 8 hrs devos.macOS Relates to developing apps on macOS platform from.flutter-sdk Reported via move from flutter/flutter st.triage.ltw Indicates Lead Tech Writer has triaged target.iOS Target apps on the iOS Platform t.add-to-app Relates to adding Flutter components to native app labels May 2, 2024
@atsansone atsansone self-assigned this May 2, 2024
@atsansone atsansone changed the title Incorrect "Set up universal links for iOS" guide, causes iOS Universal links not to work. Fix included: Update file format for apple-app-site-association in "Set up universal links for iOS" guide May 2, 2024
sfshaza2 pushed a commit that referenced this issue May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devos.macOS Relates to developing apps on macOS platform e1-hours Effort: < 8 hrs from.flutter-sdk Reported via move from flutter/flutter p2-medium Necessary but not urgent concern. Resolve when possible. st.triage.ltw Indicates Lead Tech Writer has triaged t.add-to-app Relates to adding Flutter components to native app target.iOS Target apps on the iOS Platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants