jithinroy
jithinroy

Reputation: 1885

Backward compatiblity of iOS static library

I am creating an iOS static library and trying to integrate the new iOS5 Twitter framework. So I have implemented the new Twitter framework and made the library, the static library will work on Xcode 4.2 (iOS5) without any problem. The problem with me is that, the library wont work with the older iOS SDK since the Twitter Framework are not present. I get the following error when I try to use the library in XCode 4.02 :

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TWTweetComposeViewController", referenced from: objc-class-ref in libTest.a(TestViewController.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status

Here libTest.a is the static library which I am trying to make.

So basically want I am trying to achieve is, compile a static library with Xcode 4.2 (iOS 5 SDK) and use it in Xcode < 4.2 (ie iOS SDK < 5) without causing error. ie, the static library should show the new Twitter APi in iOS-5 SDK and my own OAuth Twitter views in older iOS SDKs.

Upvotes: 2

Views: 1605

Answers (2)

Nekto
Nekto

Reputation: 17877

You can't use frameworks that were introduced in future versions of iOS

Upvotes: 0

Related Questions