Thank you for reading AppleInsider!
No ad for you. You must have good Karma :)

Tips: Delaying the start of iTunes to avoid the missing library error on macOS

By Mike Wuerthele

If you're running a machine with external drives, it's possible that they won't be mounted when iTunes starts looking for data. AppleInsider explains how to get around this, with a simple AppleScript.

While iTunes and Photos data is generally stored on the system drive, users with especially large libraries can move them to external drives, or network shares to save limited space. Given how the macOS works, and the relative slowness of external media, an app that can't find its data complains, and asks to re-locate the library.

A very simple script, coupled with proper system configuration can be used in place of manually launching iTunes after the entire boot cycle is complete. Here's how to do it.

Configure the system to not bypass your hard work

Remove external drive-dependent apps from starting by themselves at launch

Write the script

Delay 10

Tell application "iTunes" to launch

Other applications can be added to the list, in the same syntax as "iTunes" above.

Make the AppleScript applet, and make it launch on start

Reboot to test.

What to do if it doesn't work

Some drives spin up faster than others. The "Delay 10" line in the script works with all the external enclosures and drives we've tested it with, but adding a few more seconds may be necessary, depending on your hardware.

Thank you for reading AppleInsider!
No ad for you. You must have good Karma :)