Fix deprecated methods in AppRTCMobile.
Remove warning suppressions and update code that uses deprecated methods
to the currently supported APIs.
BUG=webrtc:5549
Review-Url: https://codereview.webrtc.org/2780433006
Cr-Commit-Position: refs/heads/master@{#17472}
diff --git a/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m b/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
index d1ae3f9..cd42514 100644
--- a/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
+++ b/webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m
@@ -35,6 +35,8 @@
}
@synthesize videoCallView = _videoCallView;
+@synthesize localVideoTrack = _localVideoTrack;
+@synthesize remoteVideoTrack = _remoteVideoTrack;
@synthesize delegate = _delegate;
- (instancetype)initForRoom:(NSString *)room
@@ -214,12 +216,18 @@
}
- (void)showAlertWithMessage:(NSString*)message {
- UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil
- message:message
- delegate:nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- [alertView show];
+ UIAlertController *alert =
+ [UIAlertController alertControllerWithTitle:nil
+ message:message
+ preferredStyle:UIAlertControllerStyleAlert];
+
+ UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK"
+ style:UIAlertActionStyleDefault
+ handler:^(UIAlertAction *action){
+ }];
+
+ [alert addAction:defaultAction];
+ [self presentViewController:alert animated:YES completion:nil];
}
@end