macOS 10.14 mojave安裝低版本iTunes 12.6.x

iTunes 12.6.x能管理部署app(下載.ipa包),後續的iTunes已經刪除這項功能。蘋果在最新系統10.14上再也不支持安裝12.6版本的iTunes。安裝會提示「您的系統不支持本軟件」

下面是解決方案:html

首先,下載iTunes 12.6版本(最新版本12.6.5):
support.apple.com/zh-cn/HT208…


利用腳本編輯器運行腳本安裝低版本iTunes:shell

一、關閉SIP系統完整性保護(不關會致使無操做權限)

參考百度經驗教程:jingyan.baidu.com/article/9c6…安全

二、打開腳本編輯器,將如下代碼複製到腳本編輯器運行(卸載iTunes並重裝)

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複製代碼

運行時若是 提示 iTunes Library.itl 錯誤,刪掉就ok

終端運行命令:sudo rm ~/Music/iTunes/iTunes\ Library.itlbash

三、運行如下代碼(不卸載直接覆蓋安裝)

display dialog "Please select iTunes 12.6 dmg file" 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"

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複製代碼

運行腳本卸載iTunes後,按照腳本提示選擇12.6版本iTunes的安裝包進行安裝。
app

四、從新開啓SIP

安裝完成而且iTunes能正常使用後建議開啓SIP,增長安全性仍是頗有必要的。固然你也能夠選擇無視SIP,隨你高興😄編輯器

相關文章
相關標籤/搜索