简体   繁体   English

代码在模拟器中运行,在设备上运行时未发现dyld符号错误(Xcode 6 beta)

[英]Code runs in simulator, dyld symbol not found error thrown when run on device (Xcode 6 beta)

I'm trying to compile some code that makes use of the CFNetwork framework, and it runs just fine in the simulator (with a deployment target of iOS 7.1), however when I attempt to run it on my iPhone 5 running iOS 7.1, it throws the following error: 我正在尝试编译一些使用CFNetwork框架的代码,并且它在模拟器中运行得很好(部署目标为iOS 7.1),但是当我尝试在运行iOS 7.1的iPhone 5上运行它时,它抛出以下错误:

dyld: Symbol not found: _NSURLAuthenticationMethodClientCertificate Referenced from: /var/mobile/Applications/...... Expected in: /System/Library/Frameworks/CFNetwork.framework/CFNetwork in /var/mobile/Applications/... dyld:找不到符号:_NSURLAuthenticationMethodClientCertificate引自:/ var / mobile / Applications / ......预期在/ var / mobile / Applications /中的/System/Library/Frameworks/CFNetwork.framework/CFNetwork

As for information about my app, it is written in Swift, and I am importing CFNetwork through Parse, which I import into my Swift code via an objective-C bridging header. 至于我的应用程序的信息,它是用Swift编写的,我通过Parse导入CFNetwork,我通过Objective-C桥接头导入到我的Swift代码中。

I am able to resolve this error, as others have suggested, by making the CFNetwork framework optional rather than required. 正如其他人所建议的那样,我可以通过使CFNetwork框架可选而不是必需来解决此错误。 However, the CFNetwork framework is required for my app to work (I'm using Parse as a backend, and it won't communicate without it). 但是,我的应用程序需要CFNetwork框架才能工作(我使用Parse作为后端,没有它就无法通信)。

As such, I am curious if anybody else has been able to resolve this issue by utilizing a method other than the above. 因此,我很好奇是否有其他人能够通过使用除上述之外的方法解决此问题。

I got this error when I was moving an application I made from one computer to another. 当我将从一台计算机制作的应用程序移动到另一台计算机时,我收到了此错误。 If you used CMake or something equivalent to generate the project files, then I have a solution: In CMake, instead of selecting XCode as the generator, I switched to Unix Makefiles. 如果您使用CMake或类似的东西来生成项目文件,那么我有一个解决方案:在CMake中,我没有选择XCode作为生成器,而是切换到Unix Makefiles。 Then all I had to do was navigate in terminal to the folder where the make files were generated and type: 然后我所要做的就是在终端导航到生成make文件的文件夹并输入:

$ make
$ sudo make install

This created the application with all of the frameworks and dynamic libraries packaged correctly in my /usr/local/bin folder. 这创建了应用程序,所有框架和动态库都正确打包在我的/ usr / local / bin文件夹中。

I know that this error is also fixable in XCode, but I spent a lot of time fidgeting with the setting without ever figuring it out. 我知道这个错误在XCode中也是可以修复的,但是我花了很多时间来设置这个设置而没有弄清楚它。 This is my solution for packaging the application; 这是我打包应用程序的解决方案; however, I still do all of my editing in XCode. 但是,我仍然在XCode中进行所有编辑。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XCode 11.2,模拟器 iOS 11 崩溃并出现错误“dyld:惰性符号绑定失败:找不到符号……” - XCode 11.2, simulator iOS 11 crashes with error “dyld: lazy symbol binding failed: Symbol not found…” 使用XCode 6-beta 2的iOS 7.1设备上的“dyld:symbol not found”错误仍然存​​在 - “dyld: symbol not found” error on iOS 7.1 devices with XCode 6-beta 2 persists 未找到dyld符号DictionaryGenerator(IOS Xcode6 Beta4) - dyld symbol not found DictionaryGenerator (IOS Xcode6 Beta4) dyld:未找到符号:__TMdVSs20_DisabledRangeIndex_ xcode 6 beta 4 - dyld: Symbol not found: __TMdVSs20_DisabledRangeIndex_ xcode 6 beta 4 iOS模拟器崩溃,设备未崩溃(模具:未找到符号) - iOS Simulator crashes, device doesn't (dyld: Symbol not found) 带有框架的iOS应用程序崩溃在设备上,dyld:未找到符号,Xcode 8 - iOS app with framework crashed on device, dyld: Symbol not found, Xcode 8 Xcode-dyld:未找到符号:__vtcOnSessionStart - Xcode - dyld: Symbol not found: __vtcOnSessionStart Xcode 8、iOS 8 模拟器崩溃:“dyld:延迟符号绑定失败:找不到符号:_objc_unsafeClaimAutoreleasedReturnValue” - Xcode 8, iOS 8 simulator with crash: "dyld: lazy symbol binding failed: Symbol not found: _objc_unsafeClaimAutoreleasedReturnValue" Xcode 6.4 Unity项目Dyld:找不到符号错误 - Xcode 6.4 Unity project dyld: symbol not found error Xcode-可以在模拟器上运行应用程序,但不能在设备上运行-错误:退出代码1失败 - Xcode - Can run app on simulator but not on device - error: Failed with exit code 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM