didReceiveRemoteNotification
为此使用委托:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
if ( application.applicationState == UIApplicationStateActive )
{
//create an audio player and play the sound
}
}