Read not to contradict and confute; nor to believe and take for granted; nor to find talk and discourse; but to weigh and consider.
F. Bacon , The Essays - 1597 A.D.
It seems that the late 2015 iMac does not support AirPlay. Therefore, it is not possible to stream from an iOS device to these iMacs, which are now running macOS Monterey.
Fortunately, there is an open source project called shairport-sync that can add AirPlay support to any device, as long as the device supports Apple’s zero-configuration protocol.
Using MacPorts, we can install the shairport-sync
application:
sudo port install shairport-sync
---> Computing dependencies for shairport-sync
[...]
However, the application does not come with a launchd init script to automatically launch the daemon at startup. We will need to create one ourselves and place it in the following directory: /Library/LaunchDaemons/org.macports.shairport-sync.plist
. The default permissions should work fine.
<plist version=\"1.0\">
<dict>
<key>Label</key>
<string>org.macports.shairport-sync</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/shairport-sync</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Next, we need to update the ownership and permissions of the file:
sudo chmod 644 /Library/LaunchDaemons/org.macports.shairport-sync.plist
sudo chown root:admin /Library/LaunchDaemons/org.macports.shairport-sync.plist
Finally, we can launch the daemon:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.shairport-sync.plist
If your firewall is enabled, the system will prompt you to allow communication. It is safe to allow communication on a private network. If you need to secure the communication, you can modify the configuration file at /opt/local/etc/shairport-sync/shairport-sync.conf
.
Happy streaming!