TL;DR: This could be a question with an easy answer, but I'm either looking for a solution that allows me to use larger content images in macOS Big Sur notifications or evidence that it is no longer possible.

In macOS X High Sierra (and possibly Catalina), it was possible to display notifications in the top-right of the screen like so:

enter image description here

I'm working on changes to the OSS spotify-now-playing that will allow displaying album art in notifications as it currently does not do this. Here's what it looks like in Big Sur:

enter image description here

It was easy enough to add the content image to the notification. This is what that looks like:

enter image description here

The code for this looks something like this (chopped up for clarity):

const NotificationCenter = require('node-notifier').NotificationCenter;
const notifier = new NotificationCenter({ withFallback: false });

// All the data maps correctly. The icon key/value pair does not seem to
// affect the notification that is displayed.

notifier.notify({
  title: mappedData.musicName,
  subtitle: mappedData.artistName,
  message: mappedData.albumName,
  contentImage: mappedData.albumImageSrc,
  icon: mappedData.albumImageSrc,
  group: 'Spotify',
  remove: 'ALL',
  sender: 'com.spotify.client',
  timeout: '5',
});

The problem I have is that the album art is very small in comparison to the examples I found in the past. I struggle to find evidence that it is no longer possible to display larger images, or perhaps larger icons.

I even bought Notify for Spotify on the App Store prior to this:

enter image description here

No luck there either. Something like this should be open-sourced anyway, so pressing on, I've looked into:

  • Apple's official API documentation.
    • Unsurprisingly, this was for their Swift API. For now, rewriting an app in Swift really isn't a path I'd like to go down.
  • The official documentation for node-notifier.
  • The documentation for terminal-notifier.
  • Tested out some system notifications and browser notifications.
  • The documentation for alerter.

At this point it seems like Apple just made it impossible to display large images anymore. But no matter how hard I look, I can't find any evidence that they did this.

What I'd like is that evidence, a workaround using node-notifier or another Node notifications library that allows larger images, or evidence it is only possible using XCode and Swift.

Thanks!

1

There are 1 best solutions below

0
Thomas On BEST ANSWER

According to Apple's own documentation on Notification Center, Big Sur has changed the way images are displayed.

enter image description here

This is not as definitive of proof as I'd like, but enough to keep me from looking for an answer. If Apple does this to their own notifications, then it's very unlikely it's possible with third-party software.