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

Message banners incorrectly retain view controllers #106

Open
defagos opened this issue Jun 6, 2019 · 2 comments
Open

Message banners incorrectly retain view controllers #106

defagos opened this issue Jun 6, 2019 · 2 comments
Labels
bug Issue to be fix (issue and PR) - release notes section

Comments

@defagos
Copy link
Member

defagos commented Jun 6, 2019

The SwiftMessages banner retains the parent view controller context, if any has been defined, while it is displayed.

This is easy to see with our media player view controller:

  1. Play some content.
  2. Toggle the show favorite state.
  3. Close the player (with a pull down) while the notification is displayed.
  4. The sound continues in the background for a few seconds, matching the display duration of the notification.

After having briefly looked at the SwiftMessages source code (nothing we do could lead to this behavior), version 7.0.0, it appears that view controllers should be weakly referenced. There is probably an issue with the implementation. We should fix it as a PR.

@defagos defagos added maintenance Code maintenance (issue and PR) - release notes section bug Issue to be fix (issue and PR) - release notes section labels Jun 6, 2019
@defagos
Copy link
Member Author

defagos commented Jun 7, 2019

An app-side fix has been made in commit 2a31e98.

Still, we can try fixing the issue in SwiftMessages, which would be helpful for other projects as well.

@defagos
Copy link
Member Author

defagos commented Feb 17, 2020

The app fix does not work, the view controller is still retained during dispatch_after. This issue has already been reported to SwiftMessages and needs to be fixed there.

@pyby pyby removed the maintenance Code maintenance (issue and PR) - release notes section label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue to be fix (issue and PR) - release notes section
Projects
None yet
Development

No branches or pull requests

2 participants