5

I'm using the instructions here to detect the Twitter framework on iOS 5 devices. The problem is older devices don't have the Twitter library so I get the following error on iOS 4:

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

How do I make an app that can use the Twitter framework on iOS 5 and use a different API on iOS 4 and below?

Community
  • 1
  • 1
Jay
  • 9,314
  • 7
  • 33
  • 40

1 Answers1

13

You need to "weak link" it. Under "Build Phases" -> "Link Binary With Libraries" select "Optional" for the Twitter framework:

Weak Link Twitter.framework http://www.hypercrypt.net/images/SO10249170.png

hypercrypt
  • 15,389
  • 6
  • 48
  • 59