gpt4 book ai didi

react-native - React Native 深层链接事件监听器未触发

转载 作者:行者123 更新时间:2023-12-02 20:32:46 24 4
gpt4 key购买 nike

  componentDidMount() {
Linking.addEventListener('url', event =>
this.handleOpenURL(event.url));
Linking.getInitialURL().then(url => {
console.log('url===',url);
if(url)
this.handleOpenURL(url);
});
}

如果应用程序已打开并且我尝试更改深层链接 Url,则永远不会调用handleOpenUrl。如果应用程序尚未打开,则会打开应用程序并获取 URL。

最佳答案

实际上是FBSDK覆盖该方法的问题。

这个解决方案对我有用。 https://github.com/react-navigation/react-navigation/issues/798#issuecomment-290363058

关于react-native - React Native 深层链接事件监听器未触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48188808/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com