macOS Mojave、macOS Catalina 安装 iTunes 12.6.5
iTunes 12.7 的版本中没有“应用”功能了,对于需要备份 App 或需要抓包旧版本 App 的用户来说就非常不友好了。
本方法适用于 macOS Mojave 10.14.3、10.14.4 及更高版本
-
下载 iTunes 12.6.5
https://
secure-appldnld.apple.com
/itunes12/091-87821-20180912-69177170-B085-11E8-B6AB-C1D03409AD2A/iTunes12.6.5.dmg
了解相关知识 https:// support.apple.com/zh-cn /HT208079
2. 临时关闭 System Integrity Protection,简称 SIP
关于 Mac 上的系统完整性保护(SIP)
https://
support.apple.com/zh-cn
/HT204899
a. 重启电脑,按住 Command + R,进入恢复模式
b. 点击 “实用工具”,选择 “终端”,输入命令 “csrutil disable”
c. 确认并回车,然后重启电脑
3. “启动台” - “其他” 文件夹 - 启动 “脚本编辑器”,复制下面代码并运行;
set question to display dialog "Delete iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "rm -rf /Applications/iTunes.app" with administrator privileges
display dialog "iTunes was deleted" buttons {"Ok"}
set theDMG to choose file with prompt "Please select iTunes 12.6 dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
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"
end if
if answer is equal to "No" then
display dialog "iTunes was not deleted" buttons {"Ok"}
return
end if
set question to display dialog "Install iTtunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "open ~/Desktop/iTunes.pkg"