logo
  • 教程列表
  • SO官方文檔
  • 連結 Native API
    • 傳出連結
    • Incomming Links
  1. StackOverflow 文件
  2. react-native 教程
  3. 連結 Native API
  4. Incomming Links

Incomming Links

Created: November-22, 2018

你可以檢測從外部 URL 啟動應用程式的時間。

componentDidMount() {
  const url = Linking.getInitialURL()
  .then((url) => {
    if (url) {
      console.log('Initial url is: ' + url)
    }
  }).catch(err => console.error('An error occurred ', err))
}

要在 iOS 連結 RCTLinking 上啟用此專案 。

要在 Android 上啟用此功能,請按以下步驟操作 。

  • 傳出連結

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明