views:

71

answers:

1

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 greater.

Thanks.

+1  A: 

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.

Juan
Thanks, Juan. I discovered this essential tweak long ago, but I forgot to update my question. You get the point!
Chris_K