dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social

北战南征 提交于 2019-12-10 16:11:23

问题


I have the following execution problem when the application is runing on simulator:

dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
Referenced from: /Users/Development1/Library/Application Support/iPhoneSimulator/4.3.2/Applications/730C5B6A-130C-471D-B8C8-CE119B06ACF5/Emisora Atlantico.app/Emisora Atlantico
Reason: image not found

Does anyone know how to fix it?


回答1:


The Social framework was added in iOS 6.0. You can't use it under iOS 4.3 or 5.x. You need proper runtime checks to ensure that you make no attempt to access any of the classes from the framework when you run on a device (or simulator) with iOS prior to 6.0.

You also need to weak link the Social framework to your project.

See the SDK Compatibility Guide for complete details on performing proper runtime checks.




回答2:


In addition to the answer provided by rmaddy, a quick solution may be changing the library from Required to Optional in the Build Phases tab of the Target Settings in XCode.




回答3:


Xcode 11 + CryptoKit

I had the same issue here with the new CryptKit Framework which is available with iOS 13. In my case I needed to weak link the entire framework as described here to solve the issue: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html



来源:https://stackoverflow.com/questions/16156091/dyld-library-not-loaded-system-library-frameworks-social-framework-social

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