Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch.initSession not working #248

Closed
phanthinh opened this issue Dec 5, 2016 · 3 comments
Closed

Branch.initSession not working #248

phanthinh opened this issue Dec 5, 2016 · 3 comments

Comments

@phanthinh
Copy link

Hi everybody,

I have used code at below:
$ionicPlatform.ready(function() { // Branch initialization alert(JSON.stringify(Branch)) // {debugMode: false} Branch.initSession(function(data) { // read deep link data on click alert('Deep Link Data: ' + JSON.stringify(data)); }); });

At simulator: It's just only show alert {debugMode: false}
At device: It's not any alert

What happen for this?

If there is a bug or error in this repo, please file the issue here.

If you are having trouble integrating the Branch SDK, please reach out to us here

Thank you.

@renesansz
Copy link
Contributor

renesansz commented Dec 6, 2016

Hello @phanthinh ,
Thanks for reporting the issue, we'll look into it.
At the moment, can you explain on what you're trying to accomplish? also can you please provide more details regarding the bug? eg: Cordova version, iOS/Android version.

Best,

@renesansz
Copy link
Contributor

renesansz commented Dec 6, 2016

@phanthinh , the function parameter for initSession is a function callback for deep link data, this only triggers upon opening a deep link url.
Please note that the initSession is promisified, therefore you can do .then() and .catch()
Example:

Branch.initSession(handleDeepLinkCallback).then(onInitSuccess).catch(onInitError);

@phanthinh
Copy link
Author

@renesansz It's work for simulator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants