具體的報(bào)錯(cuò)信息如下:
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment
target versions is 9.0 to 14.0.99. (in target 'Pods-Runner' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone X?.
很明顯是因?yàn)樘摂M機(jī)版本與項(xiàng)目中支持的版本區(qū)間不一致造成的報(bào)錯(cuò)肃晚,網(wǎng)上大部分解決方案都是在podfile文件中添加:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
end
end
end
end
經(jīng)過(guò)實(shí)測(cè)仔戈,該方案并不能解決問(wèn)題。
具體的解決方案监徘,直接在xcode中打開(kāi)項(xiàng)目,修改具體的版本參數(shù):
首先凰盔,打開(kāi)項(xiàng)目目錄下的"iOS"文件夾,雙擊Runner.xcworkspace文件打開(kāi)項(xiàng)目
-
Runner->Targets->build Settings下的iOS Devlopment Target 修改支持提示的范圍內(nèi)的版本落剪,我這里是9.0到14.0.99都可以睁本,我直接修改成了10.0**
如圖
- 為了保證所有的配置都修改完了忠怖,還需要進(jìn)行全局搜索關(guān)鍵字“8.0”查找"漏網(wǎng)之魚(yú)"
如圖,因?yàn)槲疫@里已經(jīng)修改過(guò)了枉疼,為了演示,我搜索了關(guān)鍵字10.0,只需要逐條修改成你要支持的最低版本即可骂维!