-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add deep linking support #1805
Add deep linking support #1805
Conversation
@jarredwitt is there documentation needed for this? |
@enahum updated the PR description to include some instructions for setup. The setup is pretty specific for each platform since it deals with the app ID's as well as some required file uploads to the server. The good thing about the setup is that it sits silently in the background if a configuration is not found. Let me know if you need help/have issues testing. |
It would be great to submit the PR to the docs and the developer docs ;) |
Will this work with multiple servers if the app id is the one we provide or people wanting to use this will need to build their own apps? |
@enahum sorry for the late response, not sure on the multiple servers front. My guess is maybe? For iOS the |
@enahum actually forgot that comment. It'll require users to build their own app if they want to support other servers since you have to specify the site url in the entitlements file at build time for iOS and Android. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one minor comment, also can you please submit a PR to the https://github.com/mattermost/mattermost-developer-documentation repo on how to set up universal links when building from source?
@@ -58,6 +58,15 @@ export default class ChannelPostList extends PureComponent { | |||
this.contentHeight = 0; | |||
} | |||
|
|||
componentDidMount() { | |||
this.mounted = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was getting some setState on unmounted component warnings from this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz don’t forget about the docs for this feature
#1805 enabled support for deep links for iOS. The link parsing mechanism remains the same for both platforms, but this commit enables registration of the URL scheme to the Android OS so that deep links can be accessed.
#1805 enabled support for deep links for iOS. The link parsing mechanism remains the same for both platforms, but this commit enables registration of the URL scheme to the Android OS so that deep links can be accessed.
Summary
Allow permalinks to open the mobile app.
The app checks for platform specific configuration on app install. If no configuration is found then the deep linking code sits silently and permalinks act as just regular links.
Setup for iOS
apple-app-site-association
file in the.well-known
directory at the root of your server. It should be accessible by navigating tohttps://<your-site-name>/.well-known/apple-app-site-association
. *** There should NOT be a file extension ***apple-app-site-association
file. Make sure to place your app ID in theappID
property:Before installing the app with the new entitlement make sure that you can view the contents of the
apple-app-site-association
file via a browser by navigating tohttps://<your-site-name>/.well-known/apple-app-site-association
. The app will check for this file on install and if found will allow outside permalinks to open the app.Official documentation can be found using the following link:
Setup for Android
Configuring deep links for Android is done much easier when using the App Links Assistant in Android Studio. Please refer to the following link for adding deep links via the App Links Assistant:
Screenshots