“没有这样的模块'Alamofire'" Xcode不会识别Alamofire框架 [英] "No such module 'Alamofire'" Xcode won't recognize Alamofire framework

查看:1109
本文介绍了“没有这样的模块'Alamofire'" Xcode不会识别Alamofire框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到在其他问题中也提到了同样的错误(例如



更新#2:所以我现在正在使用Xcode 7.3和Swift 2.2,但是我收到了一个新的错误,工作空间链接:ld:框架未找到Alamofire.clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)。

解决方案

执行以下操作,您可以从Pods导入任何swift文件



< blockquote>

1)清理项目



2)确保所有Pods>Build Settings>Build Active $ b $ b Architecture Only设置为NO。



3)不要运行,只需构建项目。



4)现在,将任何文件从Pods导入任何swift文件



例如:import Alamofire



5)再次,构建项目,它将按预期工作。最后,你可以
访问它的属性


更新:



对于更新的问题,我希望您使用Xcode 7.3,所以请将 Alamofire 更新为Swift 2.2



希望这会有所帮助!


I realize that the same error was asked in other questions (like here), but their solutions are not working for me. I keep getting a build failure in my app: "No such module 'Alamofire'". I followed the cocoadocs installation instructions (here) for installing Alamofire and it still is not working. I made sure everything has the same deployment target.
Embedded Binaries and Frameworks

Here's my podfile text.

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

Also, I tried "$ pod install" again in Terminal and got this message:

[!] 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.

After following Sohil's suggestions, XCode now recognizes the Alamofire module, but 22 new issues have arisen.

Update #2: So I'm now on Xcode 7.3 and Swift 2.2, but I'm receiving a new error with the workspace Link: "ld: framework not found Alamofire. clang: error: linker command failed with exit code 1 (use -v to see invocation)."

解决方案

Do the following things and you can import any swift file from "Pods"

1) Clean your project

2) Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO".

3) Don't run, just build your project.

4) Now, import any file from "Pods" to any swift file

E.g.: import Alamofire

5) Again, build project and it will work as expected. Finally, you can access it properties

Update:

For the updated question, I hope you are using Xcode 7.3 so please update the Alamofire to Swift 2.2

Hope this helps!

这篇关于“没有这样的模块'Alamofire'&quot; Xcode不会识别Alamofire框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆