dyld: Library not loaded different behavior for 6.0 simulator/6.0 device
Asked Answered
S

3

39

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:

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

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?

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.

Sneeze answered 26/9, 2012 at 3:14 Comment(1)
I also get this error while running on the Simulator for iOS 5.1Larrikin
F
60

If you're targeting iOS versions less than 6.0, you'll need to make AdSupport.framework, Social.framework, and Accounts.framework optionally-linked.

Please have a look at the attached screenshot.

Cheers!!!enter image description here

Fascista answered 10/10, 2012 at 5:23 Comment(1)
You deserve more likes, sir. Screenshot > text.Amyloid
S
56

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.

Sneeze answered 26/9, 2012 at 4:58 Comment(0)
T
3

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.

Townsley answered 6/10, 2014 at 13:59 Comment(1)
What will happen if I need iCloud in iOS7?Baronet

© 2022 - 2024 — McMap. All rights reserved.