0

Currently, Dynamic Link is used normally in the React-native app. However, the Dynamic Link is not redirected to the app-store when the user has not installed the app.

createShortDynamicLink(contentKey, title, subtitle, youTubeVideoId) {
  const dynamicLinkDomain = __DEV__
    ? 'test.page.link'
    : 'test.page.link';

  const link =
    new firebase.links.DynamicLink(`https://test.com/contents/${contentKey}`, dynamicLinkDomain)
      .social.setImageUrl(`https://img.youtube.com/vi/${youTubeVideoId}/hqdefault.jpg`) // make size over 200*200
      .social.setDescriptionText(subtitle)
      .social.setTitle(title)
      .android.setPackageName(DeviceInfo.getBundleId())
      .ios.setBundleId(DeviceInfo.getBundleId());

  return firebase.links()
    .createShortDynamicLink(link, 'UNGUESSABLE');
}

https://firebase.google.com/docs/dynamic-links/use-cases/web-to-app https://rnfirebase.io/docs/v5.x.x/links/reference/SocialParameters I used this docs..

  • I'd look at providers who do this for you like branch.io. All the details of making it work in Android links, Chrome links, and iOS links is a pain. – Gabe Sechan Jan 21 '19 at 07:04
  • https://rnfirebase.io/docs/v5.x.x/links/reference/IOSParameters <- Need to setFallbackUrl setting! – Kyungbin Ryu Jan 21 '19 at 07:15

1 Answers1

0

You need to set fallback links. You can find more options about properties in official page.

Emre Aktürk
  • 3,306
  • 2
  • 18
  • 30