开发者

How Do I Test for Existence of an External Constant NSString?

In iPhone SDK 3.2, the MediaPlayer framework was expanded. One of the constants newly defined in the framework is MPMediaPlaybackIsPreparedToPlayDidChangeNotification.

I'm building a universal app. How can I test at run time for the existence of this constant? If the constant exists, then my app can use this newer notification. If not, the app will use the older and deprecated MPMoviePlayerContentPreloadDidFinishNotification.

I'm sure this is an extremely simple question.

Just to be clear, my Base SDK is set at iPhone Device 3.2 and the iPhone OS Deployment Target is iPhone OS 3.0. As I said, this is a universal app, intended to run on the iPad and on iPhones with 3.0 or g开发者_运维知识库reater.

Thanks.


Go to Project, Edit Active Target "YourProject". Then in the General tab under Linked Libraries find the MediaPlayer framework and change its type to "Weak" (instead of "Required").

That should (hopefully) do the trick.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜