gpt4 book ai didi

ios - 无法调用 Alamofire.request(...)

转载 作者:搜寻专家 更新时间:2023-11-01 06:01:33 25 4
gpt4 key购买 nike

这是我的 Pod 文件...

# Uncomment the next line to define a global platform for your project
platform :ios, '11.2'

target 'Karaweik' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Alamofire'
# Pods for Karaweik

end

而且我只接到调用 AlamofireVersionNumber:

enter image description here

最佳答案

这是关于此库的问题,但如果您添加所需的代码,它将起作用。为 Alamofire 添加此代码并运行:

Alamofire.request("http://api.androidhive.info/contacts/").responseData { (response) -> Void in

let responseJson = String(data : response.result.value!, encoding : String.Encoding.utf8)
print(responseJson)
}

关于ios - 无法调用 Alamofire.request(...),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48656986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com