Question: So I'm trying to register for the MPMoviePlayerDidExitFullscreenNotification notification in my universal app (iPhone and iPad).

Problem is, OS 3.1.3 doesn't support this notification, and just crashes.

I've tried version checking, like so:

```
if ([MPMoviePlayerController instancesRespondToSelector:@selector(setShouldAutoplay:)])
{//Check for shouldSetAutoplay, this ensures that we are running at least 3.2
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDidFinish:) name:(NSString*)class2 object:[self player]];

```

Doesn't work, still crashes. How do I do this?

Answer: 
Since MPMoviePlayerDidExitFullscreenNotification is a symbol, it must be known at (dynamic) link time for any versions. Run time check doesn't help.

To solve this, you need to delay loading of this to run time. You could use `dlsym`:

```
NSString* x_MPMoviePlayerDidExitFullscreenNotification
  = dlsym(RTLD_DEFAULT, "MPMoviePlayerDidExitFullscreenNotification");
if (x_MPMoviePlayerDidExitFullscreenNotification != nil) {
  [[NSNotificationCenter defaultCenter] addObserver:self ...];
}

```

Alternatively, you may make MPMoviePlayerDidExitFullscreenNotification [a weak symbol](https://stackoverflow.com/questions/274753/how-to-make-weak-linking-work-with-gcc) so when `dyld` doesn't find that symbol, instead of crashing it will just set it to NULL.

Finally, since MPMoviePlayerDidExitFullscreenNotification is just a constant string, you could simply use

```
… name:@"MPMoviePlayerDidExitFullscreenNotification" …

```

But the content of that string is implementation detail. There's no guarantee (although rare) that Apple won't change it to something else in the later versions.
To answer your actual question:

You should be able to register for any notification without crashing. As Kenny says, it's a symbol, so the correct registration for 3.2 is;

```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDidFinish:) name:MPMoviePlayerDidExitFullscreenNotification object:[self player]];

```

For code that works in 3.13, you can assume that the symbol is just a convenience for the compiler, and use a string instead:

```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDidFinish:) name:@"MPMoviePlayerDidExitFullscreenNotification" object:[self player]];

```

You test using `shouldAutoplay` is fine, although I'd prefer to all it directly on the instance I would be using - ie `[self player]`. It's probably that your real problem is using `class2` cast to `NSString` as the notification name.