Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS < 5 can't load twitter framework

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?

like image 898
Jay Avatar asked Apr 20 '12 15:04

Jay


1 Answers

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

like image 63
hypercrypt Avatar answered Oct 18 '22 13:10

hypercrypt