Reputation: 7079
I'd like to add static library that requires at least iOS4 to a project that has deployment target set to 3.0 - how do I do that?
My guess is that I add binary and make it weak-linked (setting name "Optional" under target's 'Build Phases' -> 'Link Binary With Libraries' option) and ensure with run-time iOS version check (UIDevice's systemVersion property), that library's code doesn't get called on devices with iOS version lower than 4.0. Correct?
Is there anything I should do more?
Upvotes: 2
Views: 468
Reputation: 27597
If you are referring to frameworks (dynamic libraries) that your static library depends on, then you are right, those should be marked optional. Additionally, you will have to do a runtime check to prevent failures on invocation of non existent functionality.
Upvotes: 2