dyld: Symbol not found: _NSURLAuthenticationMethod

2020-01-24 21:08发布

My app is crashing with the message:

dyld: Symbol not found: _NSURLAuthenticationMethodClientCertificate
Referenced from: /var/mobile/Applications/C7B596AD-FB09-4685-BDFC-7E955A5DD185/IRON TRAINERS.app/IRON TRAINERS Expected in: /System/Library/Frameworks/CFNetwork.framework/CFNetwork in /var/mobile/Applications/C7B596AD-FB09-4685-BDFC-7E955A5DD185/IRON TRAINERS.app/IRON TRAINERS (lldb)

when I try to build and Run. When I remove the CFNetwork from my project, it works, I don't know why.

I just installed Xcode6Beta and opened my project. It was working fine on Xcode5.1.

UPDATE:

It works fine on iOS simulator with Xcode 6, the problem is on my device running iOS 7.1.1.

UPDATE 2:

The selected answer below worked for me, although I already had foundation framework explicit added to my project, I had to remove it and add it again. Problem solved, at least, for now. :)

10条回答
可以哭但决不认输i
2楼-- · 2020-01-24 21:27

In my case it happened when I updated 3rd party library using CocoaPods.


Simply Clearing Build Folder helped K

查看更多
家丑人穷心不美
3楼-- · 2020-01-24 21:29

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

查看更多
我只想做你的唯一
4楼-- · 2020-01-24 21:32

Reorder your frameworks to have Foundation before CFNetwork.

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

查看更多
乱世女痞
5楼-- · 2020-01-24 21:33

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.)

查看更多
登录 后发表回答