-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Not working from cold app launch #57
Comments
Hey, that is quite some coffee! Many thanks! 🙏 |
My pleasure, more than happy to contribute something to a solution that works this well.
Apologies I meant to say, this is iOS. I fear it's something I'm not doing correctly but any direction you could provide would be amazing. Pasting my dependencies below in case they provide a clue.
Thank you again 🙏 |
Hmm, I've actually found a (probably hacky) workaround. in my AppDelegate.swift, I'm delaying the triggering of the notification. I guess it just gives the app enough time to open and register the listener. Perhaps there's a better way or this is a sign that I'm doing something wrong?
|
I think you explained it correctly. The event probably didn't get triggered because the listener wasn't there yet. I myself do a combination of a regular call on startup (which you will need for Android) and a listener (which is necessary on iOS). It looks like this:
I wasn't aware that checking on startup has a case on iOS as well, so probably the Android way just got me going by accident. Please try this and let me know if this works for you! I will then try to point that out clearer in the Readme. |
Ah, I didn't realise you could checkIntentReceived outside of the listener but of course you can 🤦🏻♂️ I've adapted your example above to my Nuxt3 use case and it looks to have solved my problem, thank you for the quick responses and thanks again for your plugin. Great work. 🙏 For anyone (including my future self), here's my code (Nuxt3 specific).
|
You're welcome. Thanks for your code, looks good! I slightly edited the iOS manual with a link to this discussion and therefore will close this issue. |
Hi, firstly thank you for your plugin - it's a lifesaver for a side project I'm working on. I bought you a few coffees 🙂
I may be missing something, but I have things working fine when the app is already open in the background, but from a cold start I'm not catching the sendIntentReceived event.
I'm using Nuxt3 and have put my event listener in app.vue which I believe is one of, if not the first page to load and it's not catching the event.
Is there something I'm missing perhaps?
Many thanks 🙏
The text was updated successfully, but these errors were encountered: