Nikolay Dyankov
Nikolay Dyankov

Reputation: 7234

iOS app Facebook integration - fallback for iOS 5.0

I'm using the native Facebook integration for my iOS app and it's working great, but my target is iOS 5.0 and above. The Facebook API is available only in iOS 6.0+, so my question is how can I "remove" the facebook integration for older iOS versions? Right now when I build I'm getting this:

dyld: Library not loaded: /System/Library/Frameworks/AdSupport.framework/AdSupport Referenced from: /Users/me/Library/Application Support/iPhone Simulator/5.0/Applications/96919EDB-C9E9-4862-ABA2-67ABAFAFB9BE/Tlipo.app/Tlipo Reason: image not found

I want to keep the FB integration only for iOS 6+ users, so I just want to remove it from iOS 5 devices. How do I remove the libraries so that my app doesn't crash in iOS 5?

Thanks! :)

Upvotes: 0

Views: 732

Answers (2)

Javier Quevedo
Javier Quevedo

Reputation: 2046

I would recommend you to use the SDK from Facebook instead of the one from Apple. The officla SDK from Facebook supports iOS 5.0 as well, and it is pretty easy to use. Have a look at https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/

Upvotes: 0

viral
viral

Reputation: 4208

  1. Click on Xcode project.
  2. Goto Build Phases
  3. Expand "Link Binary With Libraries"
  4. For (1)Social.framework(2)Account.framework(3)AdSupport.framework Select Optional (At the far right hand side, by default they will have Required as selected)

Following the above mentioned steps, You are telling your App that only load those framworks if available (means for iOS 6.0 and upwards)

It should look like this after following the steps mentioned:

enter image description here

Most probably your problem will be solved.

Let me know, whether it worked or not!

Upvotes: 2

Related Questions