[2019.5.20]macOS10.14.5 mojave安装低版本iTunes,提示“您的系统不支持本软件。”

96
tanpengsccd
0.9 2018.10.29 16:16* 字数 199

此为搬运帖子,你再搬运请注明最初来源(底部)。

10.13

只有iTunes 12.6.X才能管理部署app(下载,安装)
官方方案:10.13可用,10.14不可
https://support.apple.com/zh-cn/HT208079

10.14

先下载10.13可用的iTunes
需要SIP 关闭(具体百度,白果 黑果不同)
利用apple script 脚本:(以下二选一),将下面代码 贴入 script Editor,运行

会删除原来iTunes , (也可直接下载https://gist.githubusercontent.com/tanpengsccd/fd7579c9b065f3c84641a2e4b0b5b46e/raw/d10fe299a4e3e05a4fa3870fa71cebcde0fdf493/10.14%2520install%2520itunes.scpt )

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"
    return
end if
if answer is equal to "No" then
    display dialog "Modified iTunes.pkg saved on desktop" buttons {"Ok"}
    return
end if

然后再运行

set theAPP to choose file with prompt "Please select iTunes 12.6 app:" of type {"app"}
do shell script "sed -i '' 's/12.6.5/12.9.4/g' " & POSIX path of theAPP & "Contents/Info.plist" with administrator privileges
set question to display dialog "iTunes was patched. Open iTunes?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
    do shell script "open " & POSIX path of theAPP
    return
end if
if answer is equal to "No" then
    display dialog "Modified iTunes saved on " & (POSIX path of theAPP as text) buttons {"Ok"}
    return
end if

运行时如果 提示 iTunes Library.itl 错误,删掉就ok

sudo rm ~/Music/iTunes/iTunes\ Library.itl
参考:
https://forums.macrumors.com/threads/apples-special-version-of-itunes-that-still-has-an-app-store-currently-incompatible-with-macos-mojave.2143244/page-4#post-26592234

Mac