我刚刚更新到Xcode 7.3.1,并且在iOS模拟器上显示启动屏幕后,我的项目崩溃并出现相同的错误.
错误是:
"无法附加到pid:"1712"无法附加"
然后我尝试运行另一个项目,我得到了:
"无法附加到pid:"2025"无法附加"
有解决方案吗
我意识到在其他问题中也提到了同样的错误(比如这里),但他们的解决方案并不适用于我.我在我的应用程序中不断出现构建失败:"没有这样的模块'Alamofire'".我按照cocoadocs安装说明(这里)安装Alamofire,它仍然无法正常工作.我确保所有内容都具有相同的部署目标.
嵌入式二进制文件和框架
这是我的podfile文本.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘9.2’
use_frameworks!
target 'MyApp' do
pod 'Alamofire', '~> 3.0'
end
target 'MyAppTests' do
end
target 'MyAppUITests' do
end
Run Code Online (Sandbox Code Playgroud)
此外,我在终端再次尝试"$ pod install"并收到此消息:
[!] The `App [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
Run Code Online (Sandbox Code Playgroud)
在遵循Sohil的建议后,XCode现在认可了Alamofire模块,但出现了22个新问题.
更新#2:所以我现在使用Xcode 7.3和Swift 2.2,但是我收到了一个新的错误,工作空间链接:"ld:框架未找到Alamofire.clang:错误:链接器命令失败,退出代码为1(使用-v看到调用)."