0

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

resting
  • 16,287
  • 16
  • 59
  • 90
  • consider posting the solution as an answer and mark it as accepted. – Gabriele Petronella Mar 17 '14 at 09:55
  • Which xcode version do you use ? Which compiler and language version is set ? No visible @interface for 'NSArray' declares the selector 'firstObject has been added quite a while ago now... And consider moving to cocoa pods, it's great and might solve your issue. – Antzi Mar 18 '14 at 02:29

1 Answers1

1

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.

Community
  • 1
  • 1
resting
  • 16,287
  • 16
  • 59
  • 90