проект Xcode 11 cra sh при запуске старого проекта:
func MusicPlay()
{
Playnow = true
self.ipv.start()
self.playButton.isHidden = true
self.pauseButton.isHidden = false//以下分别为设置路径,开始播放
var path = Bundle.main.path(forResource:music!,ofType :"mp3")
if Initial == true{
path = Bundle.main.path(forResource:music!,ofType :"mp3")
}
else{
switch music {
case "Viva La Vida":
path = Bundle.main.path(forResource:"result1",ofType :"mp3")
case "Something Just Like This":
path = Bundle.main.path(forResource:"result2",ofType :"mp3")
case "Señorita":
path = Bundle.main.path(forResource:"result3",ofType :"mp3")
default:
path = Bundle.main.path(forResource:music!,ofType :"mp3")
}//路径变为生成音乐
}
let soundUr1 = URL(fileURLWithPath: path!)
do{
try audioPlayer = AVAudioPlayer(contentsOf: soundUr1)
audioPlayer.volume = 1.0
audioPlayer.numberOfLoops = -1
audioPlayer.delegate = self
audioPlayer.play()
} catch{
print(error)
}
}
Ошибка:
AddInstanceForFactory: No factory registered for id <CFUUID 0x6000004d7120>
Все было нормально в ма c с Xcode 10.1. Но когда я запускаю его в другой ма c с Xcode 11, он создает sh.