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

微笑、不失礼 提交于 2019-11-26 20:04:42
plluke

Edited to include two possible steps you need to take:

  1. Make sure you have Foundation framework to your project. (Remove and add it again to be sure).
  2. Make sure the Foundation framework include is before CFNetwork.

There seems to be a change in which headers include what in iOS8.0 (the glextensions file, for example, is no longer in the top header). If you explicitly add Foundation framework to your project, it will build fine. Making CFNetwork optional will, of course, lead to failures and is only a solution for the build error and not a solution overall.

I had a similar issue with UIAlertAction

dyld: Symbol not found: _OBJC_CLASS_$_UIAlertAction Referenced from: /var/mobile/Applications/ ....app/ ... Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications/ ....app/ ...

Making UIKit.frameWork Optional solved my issue. In your case I am guessing, making your CFNetwork.framework optional will solve your problem too.

Re-ordering in XCode didn't do the trick; I'm using Cocoapods, which creates a Pods.xcconfig file. This has a OTHER_LDFLAGS line. I put -framework Foundation as the first entry, and that's made my project work.

OTHER_LDFLAGS = -framework Foundation -ObjC …

(Beware, this file gets re-generated each time you pod update.)

Reorder your frameworks to have Foundation before CFNetwork.

That's a temporary fix to something that is obviously a bug in Xcode 6.

I ran into this exact problem at WWDC. I spoke to a couple of Apple engineers who told me this is a bug in the SDK caused by moving some symbols between CFNetwork & Foundation, and that it would be resolved in the next release, due very soon. You can work around it in some cases by playing with the order frameworks are imported, but it won't always work.

I had the same problem using sqlite3 with Xcode 6.3 on a device running iOS 8.1.3 and so using sqlite3 v3.7.13.

The C function sqlite3_errstr() was introduced in sqlite3 v3.7.15.

My code was calling sqlite3_errstr().

The application was crashing on launch.

Setting libsqlite3.dylib as optional (rather than required) did the job.

The few times it happened with me a simple Clean (shift + cmd + K) did the trick.

Huangzy

I got some error similar: dyld: Symbol not found: _NSDictionary0 By the link: I reset my related projects' Deployment target to same value: 8.0, then it ok. May be something changed in ios9.0 and ios8.0, so if we want to make 8.0 compatible, we should make the related projects to know.

dyld: Symbol not found: ___NSDictionary0__ when using google ServiceGenerator binary with discovery docs in XCode 7 & iOS target 9.0

Make CFNetwork.framework optional it worked for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!