From c051930567a1532a778d6e5bc35d1a4c6fe1f41d Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 6 Apr 2023 10:45:19 +0200 Subject: [PATCH] fix(app-check): fix 'Semantic Issue (Xcode): `new` is unavailable' on XCode 14.3 --- .../firebase_app_check/example/ios/Podfile | 9 +++++++++ .../firebase_app_check/ios/Classes/FLTAppCheckProvider.m | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/firebase_app_check/firebase_app_check/example/ios/Podfile b/packages/firebase_app_check/firebase_app_check/example/ios/Podfile index 313ea4a1533f..e23e51929abe 100644 --- a/packages/firebase_app_check/firebase_app_check/example/ios/Podfile +++ b/packages/firebase_app_check/firebase_app_check/example/ios/Podfile @@ -38,4 +38,13 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end + + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + end + end + end end + diff --git a/packages/firebase_app_check/firebase_app_check/ios/Classes/FLTAppCheckProvider.m b/packages/firebase_app_check/firebase_app_check/ios/Classes/FLTAppCheckProvider.m index ad5b218b6d95..5ca4c0b499ba 100644 --- a/packages/firebase_app_check/firebase_app_check/ios/Classes/FLTAppCheckProvider.m +++ b/packages/firebase_app_check/firebase_app_check/ios/Classes/FLTAppCheckProvider.m @@ -16,11 +16,11 @@ - (id)initWithApp:app { - (void)configure:(FIRApp *)app providerName:(NSString *)providerName { if ([providerName isEqualToString:@"debug"]) { - self.delegateProvider = [[FIRAppCheckDebugProvider new] initWithApp:app]; + self.delegateProvider = [[FIRAppCheckDebugProvider alloc] initWithApp:app]; } if ([providerName isEqualToString:@"deviceCheck"]) { - self.delegateProvider = [[FIRDeviceCheckProvider new] initWithApp:app]; + self.delegateProvider = [[FIRDeviceCheckProvider alloc] initWithApp:app]; } if ([providerName isEqualToString:@"appAttest"]) { @@ -28,7 +28,7 @@ - (void)configure:(FIRApp *)app providerName:(NSString *)providerName { self.delegateProvider = [[FIRAppAttestProvider alloc] initWithApp:app]; } else { // This is not a valid environment, setup debug provider. - self.delegateProvider = [[FIRAppCheckDebugProvider new] initWithApp:app]; + self.delegateProvider = [[FIRAppCheckDebugProvider alloc] initWithApp:app]; } }