Skip to content

Put UrlSession in iosNotification handeling to background - #10734

Open
tuta-sudipg wants to merge 1 commit into
masterfrom
ios-notif-no-action
Open

Put UrlSession in iosNotification handeling to background#10734
tuta-sudipg wants to merge 1 commit into
masterfrom
ios-notif-no-action

Conversation

@tuta-sudipg

Copy link
Copy Markdown
Contributor

Notification action in ios is not 100% relaible. Sometimes, the action is only applied when the app is in foreground.
We suspect it might be because the request we make is not in background tho we could not reproduce it locally.
We intend to test in testflight with these changes


return urlSession
public func makeUrlSession() throws -> URLSession {
let backgroundSessionId = if let bundleId = Bundle.main.bundleIdentifier {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to just have a separate function for backgroundUrlSesion()?

Clever hack though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. we definitely don't want to change how widget behave. Thanks

@tutao-mac
tutao-mac force-pushed the ios-notif-no-action branch from 09268f0 to 8ad9ab9 Compare April 28, 2026 12:09
Notification action in ios is not 100% reliable. Sometimes, the action
is only applied when the app is in foreground. We suspect it might be
because the request we make is not in background tho we could not reproduce
it locally. We intend to test in testflight with these changes

Co-authored-by: nif <[email protected]>
@tuta-sudipg
tuta-sudipg force-pushed the ios-notif-no-action branch from 8ad9ab9 to 5c40c7e Compare April 28, 2026 12:14
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

Successfully merging this pull request may close these issues.

3 participants