Where do I put a custom ringtone for Facetime? (macos Sierra)

I like that Facetime Continuity allows my phone to ring on my computer. But it repeats the sound aggressively and it loops way too fast..

I created a quieter tone with eight seconds before it loops. But I can't figure out where to put it.

Apparently in Yosemite you could unlock access to this folder and put it here:

  • /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/Ringtones/

But I don't see any info on where to put it in Sierra. Any thoughts?


Overview

Here are the steps that worked for me:

  1. Disable System Integrity Protection (see below for details).
  2. Put your custom ringtone file in /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/Ringtones/
  3. Edit the system's property list of ringtones at /System/Library/PrivateFrameworks/ToneKit.framework/Versions/A/Resources/TKRingtones.plist (see below for details).
  4. Choose your custom ringtone in FaceTime preferences.
  5. Re-enable System Integrity Protection (see below for details).

Enabling/Disabling System Integrity Protection

It looks like in macOS Sierra (actually starting from El Capitan), Apple has implemented a System Integrity Protection technology that restricts access to /System. In order to play around with custom ringtones, you would need to disable System Integrity Protection

To enable or disable System Integrity Protection [...]

  1. Boot to Recovery OS by restarting your machine and holding down the Command and R keys at startup.
  2. Launch Terminal from the Utilities menu.
  3. Enter the following command: $ csrutil enable [or use the command $ csrutil disable to disable System Integrity Protection]

After enabling or disabling System Integrity Protection on a machine, a reboot is required.

Sources: Apple Support, Apple Developer

Editing TKRingtones.plist

In order to make your custom ringtone show up in the list of ringtones in FaceTime preferences, you will need to edit the file /System/Library/PrivateFrameworks/ToneKit.framework/Versions/A/Resources/TKRingtones.plist using TextEdit (or some other text editor -- you can also use Xcode's developer tools for a nicer interface). Specifically, add <string>system:Custom Ringtone Name</string> at the location shown below (you should replace "Custom Ringtone Name" with the name of your ringtone file).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    // lots of stuff omitted here
    <key>modern</key>
    <array>
        <string>&lt;default&gt;</string>
        <string>system:Custom Ringtone Name</string>
        <string>system:Apex</string>
        <string>system:Beacon</string>
        <string>system:Bulletin</string>
        // lots of stuff omitted here
    </array>
    <key>sort</key>
    <true/>
</dict>
</plist>

To me, this other answer is no longer a viable solution on Catalina.

Specifically, /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/Ringtones/ is now a read-only filesystem. So even with System Integrity Protection disabled, I can’t use these steps tocopy the custom ringtone to the indicated folder.