当我们使用新版XCode创建项目时,项目的默认编译方式为
![](https://img.haomeiwen.com/i4277317/f9c4d5650ac63a61.png)
当使用cocoapods 时,新版的项目真机运行时会提示 Unable to install "xxx"
![](https://img.haomeiwen.com/i4277317/d69eec8f313c2360.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 设置为 Embed $ Sign
![](https://img.haomeiwen.com/i4277317/027f4d12fbcfb110.png)
解决方案二:
如果方案一未生效结合方案二尝试
https://github.com/CocoaPods/CocoaPods/issues/8151
Podfile 中添加
install! 'cocoapods', :disable_input_output_paths => true
执行 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...
设置成 Legacy Build System
![](https://img.haomeiwen.com/i4277317/61cb57810107b8ae.png)
网友评论