开发者

Can I use Objective-C blocks and still run on pre-iOS 4 devices? [duplicate]

This question already has answers here: Closed 11 开发者_StackOverflow社区years ago.

Possible Duplicate:

Can Blocks built for the iPhone 4 SDK work when deployed to iPhone OS 3.0?

Check for availability of blocks at runtime on iOS

I want to use the new Twitter support in iOS 5, but instead of using a delegate, the main Twitter controller requires clients of the class to pass in a block as a completion handler.

I love blocks and want to use them, but I've so far been able to maintain iOS 3.1.3 compatibility. If I use blocks, do I need to raise my deployment target to iOS 4 and abandon any pre-iOS 4 users? Is there any way to maintain 3.1.3 support?

If I do end up having to require iOS 4, what happens to my older users? Will they just not see the new update in their Updates tab in App Store or will the app download and fail to work? Is there any documentation on how changing the deployment target interacts with the App Store?


This is a bad idea even if you can get the blocks working. You don't know if there are any other iOS 4 specific functions in the Twitter library that might break once you get the blocks working. You should stick with the minimum OS usable between your code and the Twitter client.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜