Hey
I’m having an issue with deep linking back to my app when I’m running it in the Expo client - everything works fine in the binary builds.
In my login screen in componentDidMount
, I set up a linking listener using
Linking.addEventListener('url', this.handleDeepLink);
const initialUrl = await Linking.getInitialURL();
if (initialUrl) {
this.handleDeepLink({ url: initialUrl });
}
That is handled with
private handleDeepLink = (event: { url: string }) => {
const { navigation } = this.props;
const { path, queryParams } = Linking.parse(event.url);
if (path === RouteNames.AuthStack.ResetPasswordScreen) {
this.closeModal();
navigation.replace(RouteNames.AuthStack.ResetPasswordScreen, queryParams);
} else if (path === RouteNames.AuthStack.VerifyEmailScreen) {
this.closeModal();
navigation.replace(RouteNames.AuthStack.VerifyEmailScreen, queryParams);
}
};
The way I create the linking routes is using Linking.makeUrl
, a la
Linking.makeUrl(RouteNames.AuthStack.ResetPasswordScreen,)
As a I said, this works fine on binary builds, but fails when testing the app using the Expo client on a release channel. I get the following error when returning to the app:
Do I need to change anything, or should this be a github issue? Thanks