mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #337] iOS: Notifications received (in popup) but app interface doesn't update to reflect new notifications until manual refresh #262
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PiotrKrzyzek on GitHub (Jun 21, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/337
I successfully got the iOS app working and loading and receiving notifications, which is amazing and awesome. Though, I noticed that while it can receive notifications without issue the app interface in and of itself doesn't update 'live' when new notifications come in.
If I manually refresh (pull down refresh) it'll load them up just fine, but it won't do that by itself.
Expected behavior:
When a new notification is received, that topic's information should automatically update on the app interface.
@binwiederhier commented on GitHub (Jun 21, 2022):
Hey thanks for using ntfy.
This is a known bug in iOS that I thought I had fixed in #267, but clearly not. I have the same problem sometimes with my iPhone but it doesn't always happen. I'll fix it eventually, but right now I'm a little bit clueless as to why this happens.
@PiotrKrzyzek commented on GitHub (Jun 21, 2022):
This may be presumptuous of me as someone who codes but hasn't coded in Swift (yet): it looks like it might be one of two things:
(a) receiving a notification isn't triggering a refresh (based upon the stuff I see from 267)
(b) a refresh is triggered but for the data only and not for the view/screen. So the data is updated there (somewhere), but it's not drawn / reflected into the screen.
For idea (b), this is from issues (usually caching related) I had with react and jquery. For idea (a) we've had similar logic issues on larger projects where we simply forgot to properly trigger a data pull in ALL places rather than just one.
Hopefully this gives me a good reason to try Swift finally and help out if I can.
Also, no worries about not making this a priority. I understand other items are more important. :)
You're doing awesome. Thank you much for this awesome app.
@binwiederhier commented on GitHub (Jul 27, 2022):
So my guess is that this is caused by two things:
lastNotificationIdfield and then polls using/mytopic/json?since=$id. This ID is coming from Core Data.The issue is this (this is a GUESS!): The Core Data database is not properly in sync between the main app and the NSE, which means the
lastNotificationIdis out of sync, so messages are delivered/displayed twice. This is bug https://github.com/binwiederhier/ntfy/issues/316.This causes another bug too, where the UI does not reflect all messages all the time (this is: https://github.com/binwiederhier/ntfy/issues/337). It is annoying and it just shows that I don't know how Core Data works internally. It could also be a bug, but it's annoying.
Again, this is just a guess.
Debugging this is next to impossible, because
Before you ask "what the heck": 90% of this is Apple's fault, of how the NSE and all that work. The problem with Core Data is obviously my fault, but I have no time currently to debug this or spend any time with it.
@plia7 commented on GitHub (Jun 25, 2023):
Hello,
I can confirm having this issue too with my iPhone 12 Pro Max iOS 14.4.1.
Sometime it works when I receive the notification, when I click on it, it does take me to the app where the notification is showing without a manual refresh. But sometime it doesn't work without a manual refresh. If I'm already inside the app ui, and a new notification arrives, it doesn't reflect the new notification. I hope it can be fixed to make the functionality more consistent.
Thanks.
@binwiederhier commented on GitHub (Nov 15, 2023):
📢 A new version of the ntfy iOS app is currently in TestFlight. This version (hopefully) fixes the issues with the UI not properly refreshing, as well as fixes for subscriptions "getting lost". It contains no other fixes. More to come. To test the app, please use this TestFlight link: https://testflight.apple.com/join/P1fFnAm9