3

I am having the problem described precisely in this thread:

dyld: Symbol not found: _NSURLAuthenticationMethodClientCertificate when trying to run iOS app

However, the solution in the thread is bizarrely not working for me.

Essentially, my problem is that my code runs fine on the iOS8 simulator, but upon running it on my phone loaded with iOS 7.1, I get an error: dyld: Symbol not found: _NSURLAuthenticationMethodClientCertificate Referenced from: ...

Others have suggested solving this error by one of two options:

  1. Make CFNetwork optional.

  2. Include the Foundation framework. If you have already included it, remove it, and include it again.

1 Is not an option for me, as I require CFNetwork (using Parse, PubNub, MapBox)

2 Does not seem to work for me. No matter how I try removing and reimporting Foundation, it simple doesn't work. This is strange, as it seemed to work for other people.

Is anyone else having similar problems?

Has anyone else stumbled upon a solution other than 1 or 2? This has been a problem that has persisted for me with both X-Code 6 beta and X-Code 6 beta-2, as well as in Swift and Objective-C.

I have also tried cleaning my build folder, and deleting the project's derived data.

Community
  • 1
  • 1
Will Jack
  • 303
  • 3
  • 12
  • check the options in http://stackoverflow.com/questions/24043532/dyld-symbol-not-found-nsurlauthenticationmethodclientcertificate-when-trying – Shanti K Jun 18 '14 at 06:35
  • @ShantiK The OP posted explicitly about that SO question! – trojanfoe Jun 18 '14 at 06:37
  • @ShantiK Thanks for the suggestion, but as trojanfoe pointed out, my entire question is based upon the premise that none of the solutions in that thread are working for me, and I cannot diagnose why. – Will Jack Jun 18 '14 at 06:40
  • oops.. sorry.. my bad.. – Shanti K Jun 18 '14 at 06:57
  • The only way I could get this to work consistently was to reorder the linked frameworks so that Foundation appeared above CFNetwork in the list of linked frameworks and libraries. If I changed the order then it worked in 8, and didn't work in 7.1 – Anya Shenanigans Jun 18 '14 at 17:06
  • 1
    @Petesh I just gave that a try, but it's still not cooperating. – Will Jack Jun 18 '14 at 17:48

1 Answers1

4

I figured it out. I was using cocoapods, and as such, changing the order of the libraries in the app's "Linked Frameworks and Binaries" tab so that Foundation came before CFNetwork didn't change the order the frameworks were actually imported.

In order to change the order, I had to change the order of the imported frameworks in my Pods.xcconfig file's OTHER_LDFLAGS section so that -framework Foundation came before -framework CFNetwork

Will Jack
  • 303
  • 3
  • 12