简体   繁体   English

不能在Xcode9 Swift4中使用alamofire类和方法

[英]can't use alamofire class and method in Xcode9 Swift4

I am a beginner but I usually don't have an issue implementing pods to Xcode project. 我是一个初学者,但是我通常不会在将Pod应用于Xcode项目时遇到问题。 I can use alamofire seamlessly in Xcode8, but recently i just upgrade to Xcode9 and Swift4, but I don't know why Xcode doesn't recognize Alamofire class and methods, 我可以在Xcode8中无缝使用alamofire,但是最近我只是升级到Xcode9和Swift4,但是我不知道为什么Xcode无法识别Alamofire类和方法,

the podfile to install alamofire is like this 安装alamofire的podfile是这样的

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'alamofireTestApp' do
pod 'Alamofire', '~> 4.5'
end

I have tried to ctrl+B but the problem is still there, I can import Alamofire , but I can't find the method and its class, it just shows Alamofireversionnumber , here is the screenshot 我尝试使用ctrl + B,但是问题仍然存在,我可以import Alamofire ,但是找不到方法及其类,它仅显示Alamofireversionnumber ,这是屏幕截图

ibb.co/mHdZRb

what went wrong in here? 这里出了什么问题?

Yes I noticed that only Alamofireversionnumber is shown in y project too when I installed it using pods 是的,我注意到当我使用Pod安装y项目时,它也只显示Alamofireversionnumber

Simple solution is just 简单的解决方案就是

-> write Alamofire ScreenShot 1 -> 编写Alamofire ScreenShot 1

在此处输入图片说明

-> Alamofire. -> Alamofire。

在此处输入图片说明

-> Alamofire.re then suggestion will appear -> Alamofire.re,然后会出现建议

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM