resting
resting

Reputation: 17467

Errors in AFNetworking 2.2.1

I added the folders AFNetworking and UIKit+AFNetworking manually to my project.

When I tried to compile (iOS6.1) I get the following errors in 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'

Trying iOS7.0 doesn't help. Anyone has any idea when I'm getting these errors?

Update: Did a clean and rebuild and its building now.

Update 2: The error is back. It happens when I connect a device and builds for it. Happens for both iOS 6 and 7 devices. Building for simulator is fine. Any ideas?

Attached some information below:

Xcode: Version 5.0.2 (5A3005) Arch language

Upvotes: 0

Views: 803

Answers (1)

resting
resting

Reputation: 17467

I noticed there are two devices of the same name when I connected the device. Only the second one builds. Found from the solution Xcode 5 shows the same device twice that it is caused by SDK6.1. So I removed that. Now Xcode only shows one device, and it builds fine.

Just a side note, deployment target is set to iOS 6.1. So far its able to build and run fine. Have not tested its functionality yet though.

Upvotes: 1

Related Questions