Chris_K
Chris_K

Reputation: 51

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

Thanks.

Upvotes: 1

Views: 268

Answers (1)

Juan
Juan

Reputation: 1426

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.

Upvotes: 1

Related Questions