I'm resurrecting this topic for a method of installing iTunes 12.6 on a clean Mojave 10.14.6 install, with SIP enabled and keeping iTunes 12.9:
1. download iTunes 12.6 from Apple
https://support.apple.com/HT208079 direct link
https://secure-appldnld.apple.com/i...-B085-11E8-B6AB-C1D03409AD2A/iTunes12.6.5.dmg
2. create a new pkg that can be installed on Mojave by modifying the installation limits of the original
(run in /Applications/Utilities/Script Editor.app)
Code:
display dialog "Please select the iTunes 12.6 dmg file" buttons {"Ok"}
set theDMG to choose file with prompt "Please select the iTunes 12.6 dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG & " -noverify -nobrowse"
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
do shell script "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "rm -rf ~/tmp"
display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
3. reboot into Recovery and from Terminal
- rename the installed iTunes to iTunes 12.9
Code:
mv /Volumes/Macintosh\ HD/Applications/iTunes.app /Volumes/Macintosh\ HD/Applications/iTunes12.9.app
- install iTunes 12.6
Code:
installer -verbose -pkg /Volumes/Macintosh\ HD/Users/UserName/Desktop/iTunes.pkg -target /Volumes/Macintosh\ HD/
- rename the newly installed iTunes to iTunes 12.6
Code:
mv /Volumes/Macintosh\ HD/Applications/iTunes.app /Volumes/Macintosh\ HD/Applications/iTunes12.6.app
- rename iTunes 12.9 to iTunes
Code:
mv /Volumes/Macintosh\ HD/Applications/iTunes12.9.app /Volumes/Macintosh\ HD/Applications/iTunes.app
- copy iPodUpdater.framework from iTunes 12.6 to iTunes 12.9
Code:
ditto /Volumes/Macintosh\ HD/Applications/iTunes12.6.app/Contents/Frameworks/iPodUpdater.framework /Volumes/Macintosh\ HD/Applications/iTunes.app/Contents/Frameworks/iPodUpdater.framework
- edit iTunes 12.6 Info.plist to to allow it to work on Mojave
Code:
sed -i '' 's/12.6.5/13.6.5/g' /Volumes/Macintosh\ HD/Applications/iTunes12.6.app/Contents/Info.plist
I know it might look complicated, but if you edit the above commands to include the name of your Mojave disk (if it's not Macintosh HD) and your user name (instead of UserName) and save them in an iTunes.txt file on your desktop, you can run cat /Volumes/Macintosh\ HD/Users/UserName/Desktop/iTunes.txt to display them in Terminal in Recovery and just copy-paste them in a new window.
Thanks to Apple for the "God mode" that is Recovey and thanks to
@GH1852 for the iPodFramework fix.