diff --git a/.gn b/.gn index 01fe1b87b1..d6f84df080 100644 --- a/.gn +++ b/.gn @@ -44,7 +44,7 @@ default_args = { mac_sdk_min = "10.12" - ios_deployment_target = "10.0" + ios_deployment_target = "12.0" # The SDK API level, in contrast, is set by build/android/AndroidManifest.xml. android32_ndk_api_level = 16 diff --git a/examples/objc/AppRTCMobile/ARDSettingsModel.m b/examples/objc/AppRTCMobile/ARDSettingsModel.m index 8b04c12f47..c628f0fde5 100644 --- a/examples/objc/AppRTCMobile/ARDSettingsModel.m +++ b/examples/objc/AppRTCMobile/ARDSettingsModel.m @@ -77,16 +77,30 @@ NS_ASSUME_NONNULL_BEGIN - (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)currentVideoCodecSettingFromStore { [self registerStoreDefaults]; NSData *codecData = [[self settingsStore] videoCodec]; - return [NSKeyedUnarchiver unarchiveObjectWithData:codecData]; + Class expectedClass = [RTC_OBJC_TYPE(RTCVideoCodecInfo) class]; + NSError *error; + RTC_OBJC_TYPE(RTCVideoCodecInfo) *videoCodecSetting = + [NSKeyedUnarchiver unarchivedObjectOfClass:expectedClass fromData:codecData error:&error]; + if (!error) { + return videoCodecSetting; + } + return nil; } - (BOOL)storeVideoCodecSetting:(RTC_OBJC_TYPE(RTCVideoCodecInfo) *)videoCodec { if (![[self availableVideoCodecs] containsObject:videoCodec]) { return NO; } - NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:videoCodec]; - [[self settingsStore] setVideoCodec:codecData]; - return YES; + + NSError *error; + NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:videoCodec + requiringSecureCoding:NO + error:&error]; + if (!error) { + [[self settingsStore] setVideoCodec:codecData]; + return YES; + } + return NO; } - (nullable NSNumber *)currentMaxBitrateSettingFromStore { @@ -165,14 +179,18 @@ NS_ASSUME_NONNULL_BEGIN } - (void)registerStoreDefaults { - NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:[self defaultVideoCodecSetting]]; - [ARDSettingsStore setDefaultsForVideoResolution:[self defaultVideoResolutionSetting] - videoCodec:codecData - bitrate:nil - audioOnly:NO - createAecDump:NO - useManualAudioConfig:YES]; + NSError *error; + NSData *codecData = [NSKeyedArchiver archivedDataWithRootObject:[self defaultVideoCodecSetting] + requiringSecureCoding:NO + error:&error]; + if (!error) { + [ARDSettingsStore setDefaultsForVideoResolution:[self defaultVideoResolutionSetting] + videoCodec:codecData + bitrate:nil + audioOnly:NO + createAecDump:NO + useManualAudioConfig:YES]; + } } - @end NS_ASSUME_NONNULL_END diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index e7d186aa4b..79b483df14 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -462,6 +462,7 @@ if (is_ios || is_mac) { "OpenGL.framework", ] } + defines = [ "GLES_SILENCE_DEPRECATION" ] deps = [ ":base_objc", @@ -499,6 +500,7 @@ if (is_ios || is_mac) { "objc/components/renderer/opengl/RTCEAGLVideoView.h", "objc/components/renderer/opengl/RTCEAGLVideoView.m", ] + defines = [ "GLES_SILENCE_DEPRECATION" ] } if (is_mac) { sources = [ diff --git a/sdk/objc/unittests/RTCAudioSessionTest.mm b/sdk/objc/unittests/RTCAudioSessionTest.mm index 805f601bdd..e2c26634b0 100644 --- a/sdk/objc/unittests/RTCAudioSessionTest.mm +++ b/sdk/objc/unittests/RTCAudioSessionTest.mm @@ -230,7 +230,7 @@ OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line){ __autoreleasing NSError **retError; [invocation getArgument:&retError atIndex:4]; *retError = [NSError errorWithDomain:@"AVAudioSession" - code:AVAudioSessionErrorInsufficientPriority + code:AVAudioSessionErrorCodeCannotInterruptOthers userInfo:nil]; BOOL failure = NO; [invocation setReturnValue:&failure]; diff --git a/tools_webrtc/ios/build_ios_libs.py b/tools_webrtc/ios/build_ios_libs.py index 3be0eb1975..a3a40b7c15 100755 --- a/tools_webrtc/ios/build_ios_libs.py +++ b/tools_webrtc/ios/build_ios_libs.py @@ -31,7 +31,7 @@ SDK_OUTPUT_DIR = os.path.join(SRC_DIR, 'out_ios_libs') SDK_FRAMEWORK_NAME = 'WebRTC.framework' DEFAULT_ARCHS = ENABLED_ARCHS = ['arm64', 'arm', 'x64', 'x86'] -IOS_DEPLOYMENT_TARGET = '10.0' +IOS_DEPLOYMENT_TARGET = '12.0' LIBVPX_BUILD_VP9 = False sys.path.append(os.path.join(SCRIPT_DIR, '..', 'libs'))