本文轉(zhuǎn)載自 blog? http://www.cnblogs.com/lizzie8023/p/5558504.html
因?yàn)镃ocoPods導(dǎo)入的框架bitCode不一致導(dǎo)致的,解決方案是在Podfile后面加上
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
然后 pod install --no-repo-update
如果 pod install 報(bào)錯(cuò),報(bào)錯(cuò)如下:
[!] Invalid `Podfile` file: syntax error, unexpected tCONSTANT, expecting end-of-input
...ig.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
...? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^. Updating CocoaPods might fix the issue.
那就需要先刪除之前Podfile里面加的post_install do |installer|...... ,然后pod update, 在update之前記得給第三方框架指定一個(gè)版本(某些框架最新的可能在你項(xiàng)目無法使用,出現(xiàn)bug),升級(jí)后再次執(zhí)行上面的步驟
我也是在糾結(jié)了挺長時(shí)間之后找才用這個(gè)解決方法,所以在這里拿出來分享給大家,希望對(duì)還處在困擾中的人能夠有所幫助.