ios - AFNetworking 2.2.1 中的错误

标签 ios afnetworking

我手动将文件夹 AFNetworking 和 UIKit+AFNetworking 添加到我的项目中。

当我尝试编译(iOS6.1)时,我在 AFSecurifyPolicy.m 中收到以下错误

/AFNetworking/AFSecurityPolicy.m:233:5: Implicit declaration of function 'SecTrustSetPolicies' is invalid in C99  

/AFNetworking/AFSecurityPolicy.m:271:44: No visible @interface for 'NSArray' declares the selector 'firstObject'

尝试 iOS7.0 没有帮助。有人知道我何时收到这些错误吗?

更新:现在进行了清理和重建及其构建。

更新 2:错误又出现了。当我连接设备并为其构建时,就会发生这种情况。 iOS 6 和 7 设备都会发生这种情况。为模拟器构建很好。有什么想法吗?

附上一些信息:

Xcode:版本 5.0.2 (5A3005) Arch language

最佳答案

我在连接设备时发现有两个同名设备。 只有第二个构建。 从解决方案中找到Xcode 5 shows the same device twice这是由SDK6.1引起的。所以我删除了它。 现在 Xcode 只显示一个设备,并且构建良好。

请注意,部署目标设置为 iOS 6.1。到目前为止,它能够正常构建和运行。不过还没有测试它的功能。

关于ios - AFNetworking 2.2.1 中的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22451063/

相关文章:

ios - 使用 AFNetworking 2 进行 POST 请求时 cocoa 错误 3840

ios - AFNetworking 可达性状态未改变

ios - 我真的需要导航 Controller 吗?

iphone - 发布 NSTimer iPhone?

ios - 属性初始值不变

cocoa-touch - iOS header 中的 WebKit 错误域和代码?

ios - 来自 NSString 的 NSUrl?

ios - AFHTTPRequestOperationManager 是否在 operationQueue 上运行请求?

ios - 字符串和属性问题

ios - 无法从 AFNetworking 的成功 block 调用自定义委托(delegate)