Page MenuHomePhabricator

Fix for apple-app-site-association for thankyou.wikipedia.org
Open, LowPublic

Description

We want to prevent the iOS app from intercepting thankyou.wikipedia.org. For some background, we attempted this in the past (see T259312) by spinning up a unique apple app site association file on thankyou.wikipedia.org which excludes all paths:

EN: https://en.wikipedia.org/apple-app-site-association
vs. THANKYOU: https://thankyou.wikipedia.org/.well-known/apple-app-site-association

Unfortunately this did not work. What we want to try next is specifically excluding the wiki/Thank_You path on the main app site association file. Ideally testing something like this on the beta cluster, but if not aa.wikipedia.org might operate as a suitable production alternative prior to deploying on thankyou.wikipedia.org.

{
	"activitycontinuation": {
		"apps": [
			"AKK7J2GV64.org.wikimedia.wikipedia.developer",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
			"AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
			"AKK7J2GV64.org.wikimedia.wikipedia"
		]
	},
	"webcredentials": {
		"apps": [
			"AKK7J2GV64.org.wikimedia.wikipedia.developer",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
			"AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
			"AKK7J2GV64.org.wikimedia.wikipedia"
		]
	},
	"applinks": {
		"apps": [],
		"details": [{
				"appID": "AKK7J2GV64.org.wikimedia.wikipedia.developer",
				"paths": [
					"NOT /wiki/Thank_You/*",
					"/wiki/*"
				]
			},
			{
				"appID": "AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
				"paths": [
					"NOT /wiki/Thank_You/*",
					"/wiki/*"
				]
			},
			{
				"appID": "AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
				"paths": [
					"NOT /wiki/Thank_You/*",
					"/wiki/*"
				]
			},
			{
				"appID": "AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
				"paths": [
					"NOT /wiki/Thank_You/*",
					"/wiki/*"
				]
			},
			{
				"appID": "AKK7J2GV64.org.wikimedia.wikipedia",
				"paths": [
					"NOT /wiki/Thank_You/*",
					"/wiki/*"
				]
			}
		]
	}
}

This NOT pattern was found here - https://developer.apple.com/forums/thread/24981

If this doesn't work, it may expect a different JSON structure more in line with the official documentation:

{
	"applinks": {
		"details": [{
			"appIDs": [
				"AKK7J2GV64.org.wikimedia.wikipedia.developer",
				"AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
				"AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
				"AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
				"AKK7J2GV64.org.wikimedia.wikipedia"
			],
			"components": [{
					"/": "/wiki/Thank_You/*",
					"exclude": true,
					"comment": "Matches any URL containing a path /wiki/Thank_You and instructs the system not to open it as a universal link."
				},
				{
					"/": "/wiki/*",
					"comment": "Matches all URLs containing a path /wiki."
				}
			]
		}]
	},
	"webcredentials": {
		"apps": [
			"AKK7J2GV64.org.wikimedia.wikipedia.developer",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
			"AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
			"AKK7J2GV64.org.wikimedia.wikipedia"
		]
	},
	"activitycontinuation": {
		"apps": [
			"AKK7J2GV64.org.wikimedia.wikipedia.developer",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfalpha",
			"AKK7J2GV64.org.wikimedia.wikipedia.tfbeta",
			"AKK7J2GV64.org.wikimedia.wikipedia.adhoc",
			"AKK7J2GV64.org.wikimedia.wikipedia"
		]
	}
}

Event Timeline

For making modifications to such files:

Static content lives in the mediawiki-config repo, under the docroot folder, where you'll find the roots of all domains under which static content is served.

Notably, you'll find app site-association files under the wikipedia.org folder, and a separate site-association file under the thankyou folder.

One last resort (client-side) fix we could try is to list all 300+ language hosts separately as an applink option on the entitlements file instead of using applinks:*.wikipedia.org, taking care to not add thankyou.wikipedia.org.

Seddon renamed this task from Fix for apple-app-site-association for thankyou.wikipedia.org to [Spike ]Fix for apple-app-site-association for thankyou.wikipedia.org.Aug 7 2023, 9:36 PM
Seddon renamed this task from [Spike ]Fix for apple-app-site-association for thankyou.wikipedia.org to Fix for apple-app-site-association for thankyou.wikipedia.org.
Seddon updated the task description. (Show Details)