简体   繁体   English

Afnetworking 在 IOS 中抛出错误

[英]Afnetworking throwing error in IOS

Hello Friends I am stuck with my project.你好朋友我坚持我的项目。 I am using AFNETWORKING for API hitting.我正在使用 AFNETWORKING 进行 API 命中。 I used some code for timeout我使用了一些超时代码

if (error.code == NSURLErrorTimedOut) {
  //time out error here
}

在此处输入图片说明

在此处输入图片说明

It was working fine, But I change timeout time by changing the default value from 1 minute to 1:30 minute, then problem appears.它工作正常,但我通过将默认值从 1 分钟更改为 1:30 分钟来更改超时时间,然后出现问题。 AFURLConnectionOperation file showing error AFURLConnectionOperation 文件显示错误

Use of undeclared identifier 'NSURLErrorFailingURLErrorKey'使用未声明的标识符 'NSURLErrorFailingURLErrorKey'

That affected my all afneworking related project.这影响了我所有的 afneworking 相关项目。 I changed library files but things are same.我更改了库文件,但事情是一样的。 Help me, Any one.帮助我,任何一个。

you can solve it by removing the derived data for xcode., go to您可以通过删除 xcode 的派生数据来解决它。,转到

xcode prefrence -> Locations -> derived data xcode 偏好 -> 位置 -> 派生数据

  1. now open derived data in finder现在在finder中打开派生数据

  2. force close the xcode强制关闭 xcode

  3. force close the simulator强制关闭模拟器

  4. clear all derived data清除所有派生数据

  5. relaunch your XCode project重新启动您的 XCode 项目

    the problem might be solved in the case if you have not deleted any iOS framework如果您没有删除任何iOS框架,问题可能会得到解决

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

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