From a445b9bca72606e55970135f0f1023e7c486d31e Mon Sep 17 00:00:00 2001 From: magjed Date: Mon, 20 Feb 2017 07:56:53 -0800 Subject: [PATCH] Fix partial availability warnings on Mac AppRTCMobile The partial availability problem aries from the fact that the minimum supported OSX version is set to 10.9, but AppRTCMobile is using functions available only in 10.10 and later. The minimum OSX version is set as a declare_args() in build/config/mac/mac_sdk.gni, which makes it difficult to override for just the AppRTCMobile target in WebRTC. Instead, this CL solves the problem for now by removing the usage of the 10.10 function, which is trivial. Also, the flag: 'extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]' is removed since it has no effect. BUG=webrtc:4695 Review-Url: https://codereview.webrtc.org/2710493002 Cr-Commit-Position: refs/heads/master@{#16726} --- webrtc/examples/BUILD.gn | 9 --------- .../objc/AppRTCMobile/mac/APPRTCViewController.m | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn index 1eca3171de..0098d69781 100644 --- a/webrtc/examples/BUILD.gn +++ b/webrtc/examples/BUILD.gn @@ -196,9 +196,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) { "-Wno-sign-compare", "-Wno-unused-variable", ] - if (is_mac) { - cflags += [ "-Wno-partial-availability" ] - } } rtc_static_library("apprtc_signaling") { @@ -368,8 +365,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) { mac_app_bundle("AppRTCMobile") { output_name = "AppRTCMobile" - extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ] - sources = [ "objc/AppRTCMobile/mac/main.m", ] @@ -409,10 +404,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) { # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396 "-Wno-unused-result", ] - - if (is_mac) { - cflags += [ "-Wno-partial-availability" ] - } } rtc_static_library("socketrocket") { diff --git a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m index 353e105c1d..176ea19da8 100644 --- a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m +++ b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m @@ -242,7 +242,7 @@ static NSUInteger const kBottomViewHeight = 200; _roomField = [[NSTextField alloc] initWithFrame:NSZeroRect]; [_roomField setTranslatesAutoresizingMaskIntoConstraints:NO]; - _roomField.placeholderString = @"Enter AppRTC room id"; + [[_roomField cell] setPlaceholderString: @"Enter AppRTC room id"]; [_actionItemsView addSubview:_roomField]; [_roomField setEditable:YES];