xcode dyld:库未加载 6.0 模拟器/6.0 设备的不同行为
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12594070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
dyld: Library not loaded different behavior for 6.0 simulator/6.0 device
提问by Jeff Grimes
My app runs fine on the iPhone 6.0 Simulator in Xcode, but when I try to run it on my 6.0 device, I get the following fatal error:
我的应用程序在 Xcode 中的 iPhone 6.0 模拟器上运行良好,但是当我尝试在我的 6.0 设备上运行它时,我收到以下致命错误:
dyld: Library not loaded: /System/Library/Frameworks/AdSupport.framework/AdSupport Referenced from: /var/mobile/Applications/26329A7C-04B0-415A-B8EB-3C59CC1EC0B1/hammerhead.app/hammerhead Reason: image not found
dyld:库未加载:/System/Library/Frameworks/AdSupport.framework/AdSupport 引用自:/var/mobile/Applications/26329A7C-04B0-415A-B8EB-3C59CC1EC0B1/hammerhead.app/hammerhead 原因:找不到图像
I am sure that my Phone has version 6.0 and is up to date. My deployment target is set to 6.0 in my project file and in my info.plist file. What should I do?
我确信我的手机有 6.0 版并且是最新的。我的项目文件和 info.plist 文件中的部署目标设置为 6.0。我该怎么办?
The problem seems to be with the AdSupport framework, which I put in my app so the new Facebook SDK (3.1) could function with iOS 6.
问题似乎出在 AdSupport 框架上,我将其放入我的应用程序中,因此新的 Facebook SDK (3.1) 可以在 iOS 6 上运行。
回答by VSN
If you're targeting iOS versions less than 6.0, you'll need to make AdSupport.framework, Social.framework, and Accounts.framework optionally-linked.
如果您的目标是低于 6.0 的 iOS 版本,则需要将 AdSupport.framework、Social.framework 和 Accounts.framework 设为可选链接。
Please have a look at the attached screenshot.
请看一下随附的屏幕截图。
Cheers!!!
干杯!!!
回答by Jeff Grimes
Solved my own problem: Set the frameworks that are giving you problems to "Optional" instead of "Required" by going to the project file Summary and scrolling down to Linked Frameworks and Libraries.
解决了我自己的问题:通过转到项目文件摘要并向下滚动到链接的框架和库,将给您带来问题的框架设置为“可选”而不是“必需”。
回答by Custom Bonbons
Same for CloudKit.framework on iOS 7 (it is for iOS8 only). Go to General > Linked Frameworks and Libraries, change CloudKit.framework to Optional. Thanks VSN.
与 iOS 7 上的 CloudKit.framework 相同(仅适用于 iOS8)。转到 General > Linked Frameworks and Libraries,将 CloudKit.framework 更改为 Optional。感谢 VSN。