-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
iOS notifications only work in the foreground #4971
Comments
Duplicate to or related to #3656 possibly? |
That issue is about remote push notifications and mobile in general. This issue is about local push notifications and specific for iOS only. This works on platforms like Darwin and Android, but not for iOS. |
It's not related to whether the app is foregrounded but whether it is running according to the OS (as I understand it anyhow). We don't have any background service support so as soon as the OS suspends your app the code won't run and notifications won't send. |
I am sure there is no background processing possible on iOS. The only thing coming close is sending a silent remote push notification which 'wakes up' the app for a moment (if the OS chooses to allow it). At that moment the app can do things in the background. @andydotxyz You mentioned elsewhere that on mobile notifications would be shown if the app was in the background. So that is only for Android then. Sorry, I was hoping I missed something about local notifications on iOS. So this indeed related to #3656 PS: it is possible to setup a local notification with a specific 'show' time and date on both iOS and Android. This is not exposed by Fyne though. |
The app can send notifications if it is running in the background on iOS and Android. However (depending on memory pressure) the iOS app will likely be killed in seconds rather than minutes on Android. Scheduling notifications is an intended improvement so feel free to open a PR or feature request so we can track its addition. |
Checklist
Is your feature request related to a problem?
IOS notifications are working in the latest develop branch. The app asks correctly if notifications are allowed to show. But then notifications are shown only while the app is running in the foreground.
If I create a notification to be shown a few seconds later and send the app to the background nothing happens. Only going back to the app will trigger showing the notification (which can be much later or never).
Is it possible to construct a solution with the existing API?
This might be related to some bug or configuration problem on iOS.
Describe the solution you'd like to see.
On Android this works correctly: even while an app is in the background, notifications from that app will be shown at the required moment.
Only showing notifications while the app is in foreground is not very useful. The app already has full attention.
The text was updated successfully, but these errors were encountered: