In addition to the dozen iOS 12 Shortcuts suggestions from my colleague Jason Cipriani, I have a trio of YouTube-related additions for your Shortcuts Library. One lets you download YouTube videos on your iPhone ($899 at Amazon) -- no computer or iTunes required. Another lets you listen to YouTube in the background. And the last lets you look up YouTube videos of the current track playing in Apple Music.
To add these Shortcuts, make sure you are viewing this in Safari on your iPhone or iPad ($419 at eBay). Just tap the link and then tap the Get Shortcut button to add it to the Library tab in the Shortcuts app.
This Shortcut lets you download YouTube videos without needing to involve iTunes. I used Charlie Sorrel's version of it from Cult of Mac, which was based on a this Shortcut on Reddit. With it, you can tap the share button when watching a YouTube video in the YouTube app or Safari, choose Shortcuts from the share menu and then tap the Download YouTube Shortcut. Wait a few seconds while it runs, and you'll find the downloaded video in the Shortcuts folder of the Files app.
You can change the location for your downloaded videos by opening the Shortcuts app, tapping the triple-dot button for the Download YouTube Shortcut in your Library. Scroll to the last action at the bottom called Save File and toggle on Ask Where to Save. Now, when you use the Shortcut, it will ask you where you want to save the video: another folder on iCloud Drive, Dropbox, Google Drive or On My iPhone.
If you aren't a paying subscriber to YouTube Premium, then you can't listen to the app in the background. With this Shortcut, however, you can listen to YouTube in the background as long as you use Safari. After adding the Shortcut, start playing a YouTube video in Safari and tap the share button at the bottom of Safari (as opposed to the YouTube share button right below the video). Next, tap Shortcuts from the share menu and then tap Background YouTube. You will return to the video in Safari, where it will be paused. Tap play and it will open a new page for the video. Lock your phone and then use the media player on the lock screen to begin playing the video. You can listen to the audio on your locked phone or you can unlock your phone and continue listening with Safari in the background and using the Control Center to play and pause the video.
Find Track on YouTube
If you find yourself listening to a particularly enjoyable track on Apple Music and might wonder what YouTube videos exist of it for your viewing pleasure, then you ought to give this Shortcut a whirl. Unlike the other two Shortcuts above, you access this one not from a share menu but directly from the Shortcuts app. With a song playing in Apple Music, open the the Shortcuts app and tap the Find Track on YouTube Shortcut. It will open up the YouTube app to a search results page using the artist and track name as your search terms.
Also unlike the other two Shortcuts apps above, the Find Track on YouTube is listed in the Gallery of the Shortcuts app.