Git Product home page Git Product logo

react-native-deep-linking's People

Contributors

greenkeeper[bot] avatar jonfridrik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-deep-linking's Issues

this lib is not working with react-native version 0.63.3

no events are getting fire here is my code

`  componentDidMount() {
    // Google SignIn init
    GoogleUtil.configureGoogleSignIn();
// Register schemes
DeepLinking.addScheme('recreative://');
// Deep linking
Linking.addEventListener('url', this.handleUrl);

var url = Linking.getInitialURL()
  .then((url) => {
    if (url) {
      Linking.openURL(url);
    }
  })
  .catch((err) => console.error('An error occurred', err));

DeepLinking.addRoute('/UserProfile/:id', ({ scheme, path, id }) => {
  console.log('response for deeplinking');
  // recreative://UserProfile
  // this.setState({ response });
  console.log('scheme checking', scheme); // `facebook://`
  console.log('path checking', path); // `/profile/33138223345`
  console.log('id checking', id); // `33138223345`
  NavigationService.navigate('UserProfile');
});

// Twitter SignIn init
// TwitterUtil.init();

setTimeout(() => {
  SplashScreen.hide();
}, 2000);

}

  componentWillUnmount() {
    // Deep linking unmounting
    Linking.removeEventListener('url', this.handleUrl);

    // network info change remove listener
    NetworkInfo.removeNetworkInfoListener(
      this.state.store.dispatch,
      networkActions.networkInfoListener,
    );
  }
  handleUrl = (url) => {
    console.log('checking url', url);
    Linking.canOpenURL(url).then((supported) => {
      if (supported) {
        DeepLinking.evaluateUrl(url);
      }
    });
  };`

Best practice for catch all route?

Hi, thanks for your efforts with this repo.
Seem really solid!

If I want to catch all routes, especially those that doesn't match specified routes, what's the best way to go about it?

Thanks in advance, Anton

does this support deep linking into your app?

all of the examples show deep linking from your app into another app, for example - like launching facebook. how about deep linking into your own app? does this support that too?

Not working when the app closed [Android]

Hi,

How can I make this work while the app closed?

I've implement this and it's working when the app in foreground / background, but it's not working when the app closed. The listener only working when the app in foreground/background.

Really need help.

Thanks

An in-range update of eslint-plugin-react is breaking the build 🚨

The devDependency eslint-plugin-react was updated from 7.14.0 to 7.14.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v7.14.1

Fixed

  • Fix prop-types crash on multiple destructuring (#2319 @golopot)
Commits

The new version differs by 3 commits.

  • 62255af Update CHANGELOG and bump version
  • 655eb01 Merge pull request #2320 from golopot/issue-2319
  • 9639d82 [Fix] prop-types: fix crash on multiple destructuring

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Not working on android

When I try to open deeplink on the android application β€” the application is restarted continuously.

RN 0.36.1

How to get full URL from addRoute callback/handler

I can't find a way to get the full URL inside a handler of addRoute method. I can only get scheme, path and URL params but I also need the domain. I've tried to use Linking.getInitialURL but it returns null everytime

Reset Scheme Option ?

Can we also have reset scheme option? In Android, I am facing an issue where already running app is mounting scenes again on link open request and calling componentDidMount, which is pushing scheme again and causing routes callback to be called multiple times.

So I was hoping there will be some method like below to reset the scheme. Or is there already an option to reset schemes?

const resetScheme = () => { schemes.splice(0, schemes.length); };

If this is fine then, I can also send the pull request.

Query params inside last uri param

Hello!

Currently, this lib does not support query params.

What I mean is, suppose you have this route

DeepLinking.addScheme('domain://');
DeepLinking.addRoute('/queryparams/:id', ({id}) => console.log('id: ', id))

when evaluating the uri, id gets query params concatenated:

DeepLinking.evaluateUrl('domain://queryparams/1234?q=query&p=param');
// console.log => id: 1234?q=query&p=param

is there any way to get around this?

my intentions isn't to get the query params, but for them to not get concatenated to the last uri param.

probably in a next version, it would be nice for the addRoute callback to receive:

{ path, scheme, match, params, query }

I can send a PR with what I just wrote, but it would be a breaking change.

An in-range update of husky is breaking the build 🚨

Version 0.13.3 of husky just got published.

Branch Build failing 🚨
Dependency husky
Current Version 0.13.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As husky is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 9 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Cannot handle multiple params in a single url

Suppose an url like this myclnq://register?firstName=Saran&lastName=kumar, how can i get firstName and lastName from this url.
In the example, retrieing one param is defined but not multiple params. pls give a solution

Event listener not working on iOS

Simply does not react to any link being opened in the app.

This may be the react native Linking API issue too - I am not sure.

Not working in Simulator or physical device.

Version: 2.2.0
React Native: 0.63.4

addEventListener is not working in IOS?

I have cloned your project and I tried to running your project in my local but I didn't work properly like addEventListener is not working.

Please let me what should I do?

Query params Deep link not working

Hi team , I am using this plugin for deeplink in my application my deeplink url as below
https://my.domain.com/services/auth/v1/unlock-account?token=1234

I set scheme and host in android as below

<data android:scheme="https" android:host="my.domain.com"/>

I write code in react native side as below

function addUnlockAccountRoute() {
     
    DeepLinking.addRoute('/services/auth/v1/unlock-account/:token', ({scheme, path, token}) => {
        console.log('unlock_account_deeplink_response_schema', scheme);
        console.log('unlock_account_deeplink_response_path', path);
        console.log('unlock_account_deeplink_response_token', token);
        
    });
  }

When i try to run above code route not found means i am not able to get value scheme, path and token value because my deep link URL includes query parmas like ?token=1234 so can you tell me how i can resolve this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.