Просмотр исходного кода

playback controller: suppress deprecation warning as we can't use the modern replacement yet

Felix Paul Kühne 7 лет назад
Родитель
Сommit
0bd19c8cd5
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      Sources/VLCPlaybackController.m

+ 4 - 0
Sources/VLCPlaybackController.m

@@ -294,10 +294,14 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
     _playerIsSetup = NO;
     [_shuffleStack removeAllObjects];
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    /* UIApplication's replacement calls require iOS 10 or later, which we can't enforce as of yet */
     if (_errorCallback && _mediaPlayer.state == VLCMediaPlayerStateError &&  !_sessionWillRestart)
         [[UIApplication sharedApplication] openURL:_errorCallback];
     else if (_successCallback && !_sessionWillRestart)
         [[UIApplication sharedApplication] openURL:_successCallback];
+#pragma clang diagnostic pop
 
     [[self remoteControlService] unsubscribeFromRemoteCommands];