Repository navigation
Conversation
Serves /.well-known/apple-app-site-association and /.well-known/assetlinks.json, so a phone with the app installed opens links to profiles, their followers, commits and Remotes conversations in the app. The app IDs come from config/mobile.php.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the mobile app installed, a link to a profile, its followers, a commit or a Remotes conversation can now open in the app instead of the browser. Phones only do that when the site says the app may, so this serves the two files they check:
/.well-known/apple-app-site-associationfor iOS. It lists the app's ID and the paths it opens:/@*and/remotes/@*. It leaves out a profile'sog.png,feed.atom,graph.svgandpreview, which aren't pages./.well-known/assetlinks.jsonfor Android. It lists the package name and the SHA-256 fingerprints of the keys the app is signed with. Android can't scope paths in this file, so the app's manifest does that.The IDs live in
config/mobile.phpand can be set from the environment:MOBILE_IOS_APP_IDSdefaults toJ68WFCX458.com.nativephp.devnull, the production app.MOBILE_ANDROID_PACKAGEdefaults tocom.nativephp.devnull.MOBILE_ANDROID_CERTIFICATE_FINGERPRINTSis empty, so Android won't verify the app until it's set to the release key's fingerprint.Both responses are cached publicly for an hour. Apple's CDN caches the iOS file for longer anyway.
The app side is NativePHP/dev-null-app, which maps the web paths onto its own screens.