Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

getInitialLink is not working but onLink is working in react-native-firebase v6

$
0
0

I am using the following code in App.js - componentDidMount

    firebase
      .dynamicLinks()
      .getInitialLink()
      .then(link => {
        if (link) {
          if (link.url.includes('/s/')) {
            this.handleSignupURL(link.url)
          }
        }
      })


    firebase.dynamicLinks().onLink(({ url }) => {
      if (url && url.includes('/s/')) {
        this.handleSignupURL(url)
      }
    })
  }

On clicking the dynamic link: When the app is active, onLink handler is fired and the app handles it correctly. But when the app is closed, getInitialLink returns a null. Any solution to get the initial link?

I am using react-native-firebase v6, react-native corresponding to expo 36. The installation is performed as per the new react-native-firebase quick start. I am using the iOS app.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>