解決方案:
install! 'cocoapods', disable_input_output_paths: true
==============2019.6.2 更新=================
- UIImage imageNamed: 讀取不到圖片 發(fā)生在第二次及以后的運(yùn)行并且有個(gè)警告
Showing Recent Messages
:-1: ignoring duplicated output file: '/Users/sxd/code2018/NurseryRhyme/DerivedData/NurseryRhyme/Build/Products/Debug-iphonesimulator/NurseryRhyme.app/Assets.car' (in target 'NurseryRhyme')
原因在這里 Build System Release Notes for Xcode 10
Targets which have multiple asset catalogs that aren't in the same build phase may produce an error regarding a "duplicate output file". (39810274)
Workaround: Ensure that all asset catalogs are processed by the same build phase in the target.
你的 Build Phases 的 Copy Bundle Resources 中包含了某個(gè)xcassets场勤,而你的 [CP] Copy Pods Resource 中也包含了xcassets,所以他們生成的 Assets.car 互相覆蓋了歼跟。
解決方案:
a. 不使用 New Build System !!!
img
b. New Build System 吹得那么牛逼和媳,不使用感覺(jué)有點(diǎn)可惜啊~ 試一下全部xcassets都弄到Pod中,嘗試中... 失敗了... 因?yàn)槎挤舙od哈街,主工程讀不到 AppIcon 和 LaunchImage
c. xcassets 都放主工程留瞳,估計(jì)是可行的... 但是我不想放棄使用Pod來(lái)管理圖片
d.沒(méi)轍,等大佬解決吧~