解決 XCode new build system Unable to install "xxx"

當(dāng)我們使用新版XCode創(chuàng)建項(xiàng)目時(shí),項(xiàng)目的默認(rèn)編譯方式為

image.png

當(dāng)使用cocoapods 時(shí),新版的項(xiàng)目真機(jī)運(yùn)行時(shí)會提示 Unable to install "xxx"


image.png
詳情
Details

Unable to install "xxxxx"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
--
No code signature found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
User Info: {
......

解決方案一:

Targets--> General --> Frameworks,Libraries,and Embedded Content

將 Pods_xxxxxx.framework Embed 設(shè)置為 Embed $ Sign

image.png

解決方案二:

如果方案一未生效結(jié)合方案二嘗試

https://github.com/CocoaPods/CocoaPods/issues/8151

Podfile 中添加

install! 'cocoapods', :disable_input_output_paths => true
執(zhí)行 pod install
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

source 'https://github.com/CocoaPods/Specs.git'

# New Build System
# https://github.com/CocoaPods/CocoaPods/issues/8151
install! 'cocoapods', :disable_input_output_paths => true

target 'xxxxx' do
  # Comment the next line if you don't want to use dynamic frameworks
  inhibit_all_warnings!
  use_frameworks!

  # Pods for xxxxx
pod 'Moya/RxSwift'#基于alm封裝庫

解決方案三:

以上方案都不管用的話只能使用終極解決方案->舊的編譯方式

file --> Workspace Settings... / Probject Settings...
設(shè)置成 Legacy Build System
image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容