Notifications do not popup if app installed from *.dmg on macOS #14976

issue hebasto openend this issue on December 16, 2018
  1. hebasto commented at 8:52 pm on December 16, 2018: member

    How to reproduce:

    1. Install Bitcoin Core from downloaded dmg file (e.g., v0.17.1rc1).

    2. Run with -regtest.

    3. Generate a new block. A new notification is expected to popup.

    Actually, this notification is present in Notification Center; but it did not popup.

    The same Bitcoin Core version being self-compiled (git checkout v0.17.1rc1) works as expected.

  2. fanquake added the label macOS on Dec 16, 2018
  3. fanquake commented at 11:20 am on December 17, 2018: member
    Which version of macOS are you testing/have tested on?
  4. hebasto commented at 11:37 am on December 17, 2018: member

    @fanquake

    Which version of macOS are you testing/have tested on?

    10.13.6 and 10.11.6; both in VM.

  5. Sjors commented at 2:59 pm on December 17, 2018: member
    Haven’t tested this yet, but reminds me of #11840
  6. hebasto commented at 0:38 am on December 19, 2018: member
    It seems related to CFBundleIdentifier.
  7. jonasschnelli commented at 7:50 pm on December 19, 2018: contributor

    This is not a bug, it’s a feature.

    When Bitcoin Core is the most foreground application, such notifications go silently to the Notification Center (top right global menu bar).

    If you put the Bitcoin Core GUI in the background and trigger a notification via RPC (generatetoaddress as example) you will get a banner (popup) notification.

    I guess it would be possible to overwrite the NSUserNotificationDelegate and make it always popup.

    https://developer.apple.com/documentation/foundation/nsusernotification#//apple_ref/occ/instp/NSUserNotification/presented

  8. hebasto commented at 8:58 pm on December 19, 2018: member

    @jonasschnelli

    This is not a bug, it’s a feature.

    When Bitcoin Core is the most foreground application, such notifications go silently to the Notification Center (top right global menu bar).

    Tested. It works as described. But why do notifications popup for a self-compiled build running from the command line?

  9. jonasschnelli commented at 9:01 pm on December 19, 2018: contributor

    But why do notifications popup for a self-compiled build running from the command line?

    Not entirely sure but maybe because the command line is the process initiator and not the front most application?

  10. hebasto closed this on Dec 19, 2018

  11. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me