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

On ionic 2, does initSession() need to be called onResume? #268

Closed
chanphillip opened this issue Dec 30, 2016 · 3 comments
Closed

On ionic 2, does initSession() need to be called onResume? #268

chanphillip opened this issue Dec 30, 2016 · 3 comments

Comments

@chanphillip
Copy link

In the docs, some places say it's needed and some do not.
Is initSession() suppose to be called every onResume?

@renesansz
Copy link
Contributor

@chanphillip ,
Hello, I haven't tried using the plugin w/ Ionic 2. Can you please elaborate your question?
As far as I know, you always needed to initialize the session every time the device starts so that you can use the Branch methods, in Cordova it should be initialize on deviceReady. See doc

@ethanneff
Copy link
Contributor

Hello @chanphillip,

The reason why initSession() is called within resume and deviceready is because of scenarios on some Android devices where deep link data will not pass into the app on open.

When testing, this issue appeared to be isolated with Phonegap and Cordova builds. I have not been able to replicate this Android issue with Ionic, which is why the documentation only contains Branch.initSession() within $ionicPlatform.ready(function() for Ionic 1 and platform.ready().then(() => for Ionic 2.

If you notice that Branch deep link data is not being passed within your Ionic 2 app, please reach out and we will add your use case to our regression tests.

Best,

@ethanneff
Copy link
Contributor

@chanphillip I am closing this ticket, feel free to reach out if you are still experiencing issues.

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

3 participants