Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 499
Gabriel Goethe Avatar asked Apr 22 '13 20:04

Gabriel Goethe


3 Answers

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.

like image 76
rmaddy Avatar answered Sep 19 '22 16:09

rmaddy


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.

like image 45
lindon fox Avatar answered Sep 19 '22 16:09

lindon fox


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

like image 22
Baran Emre Avatar answered Sep 20 '22 16:09

Baran Emre