diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions.podspec b/packages/cloud_functions/cloud_functions/ios/cloud_functions.podspec index 1ce70c8848da..4791baf177a6 100644 --- a/packages/cloud_functions/cloud_functions/ios/cloud_functions.podspec +++ b/packages/cloud_functions/cloud_functions/ios/cloud_functions.podspec @@ -24,10 +24,11 @@ Pod::Spec.new do |s| s.license = { :file => '../LICENSE' } s.authors = 'The Chromium Authors' s.source = { :path => '.' } - s.source_files = 'cloud_functions/Sources/cloud_functions/**/*.{h,m}' - s.public_header_files = 'cloud_functions/Sources/cloud_functions/include/*.h' + s.source_files = 'cloud_functions/Sources/**/*.swift' s.ios.deployment_target = '13.0' + s.swift_version = '5.0' + # Flutter dependencies s.dependency 'Flutter' @@ -37,7 +38,6 @@ Pod::Spec.new do |s| s.static_framework = true s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => "LIBRARY_VERSION=\\\"#{library_version}\\\" LIBRARY_NAME=\\\"flutter-fire-fn\\\"", 'DEFINES_MODULE' => 'YES' } end diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Package.swift b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Package.swift index bf2024670682..83896d3bbfce 100644 --- a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Package.swift +++ b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Package.swift @@ -104,11 +104,6 @@ let package = Package( ], resources: [ .process("Resources"), - ], - cSettings: [ - .headerSearchPath("include"), - .define("LIBRARY_VERSION", to: "\"\(library_version)\""), - .define("LIBRARY_NAME", to: "\"flutter-fire-fn\""), ] ), ] diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/Constants.swift b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/Constants.swift new file mode 100644 index 000000000000..d33b80192c40 --- /dev/null +++ b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/Constants.swift @@ -0,0 +1,6 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Auto-generated file. Do not edit. +public let versionNumber = "5.3.4" diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m deleted file mode 100644 index 88a8342f290e..000000000000 --- a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "include/FLTFirebaseFunctionsPlugin.h" - -@import FirebaseFunctions; -#if __has_include() -#import -#else -#import -#endif - -NSString *const kFLTFirebaseFunctionsChannelName = @"plugins.flutter.io/firebase_functions"; - -@interface FLTFirebaseFunctionsPlugin () -@end - -@implementation FLTFirebaseFunctionsPlugin - -#pragma mark - FlutterPlugin - -// Returns a singleton instance of the Firebase Functions plugin. -+ (instancetype)sharedInstance { - static dispatch_once_t onceToken; - static FLTFirebaseFunctionsPlugin *instance; - - dispatch_once(&onceToken, ^{ - instance = [[FLTFirebaseFunctionsPlugin alloc] init]; - // Register with the Flutter Firebase plugin registry. - [[FLTFirebasePluginRegistry sharedInstance] registerFirebasePlugin:instance]; - }); - - return instance; -} - -+ (void)registerWithRegistrar:(NSObject *)registrar { - FlutterMethodChannel *channel = - [FlutterMethodChannel methodChannelWithName:kFLTFirebaseFunctionsChannelName - binaryMessenger:[registrar messenger]]; - FLTFirebaseFunctionsPlugin *instance = [FLTFirebaseFunctionsPlugin sharedInstance]; - [registrar addMethodCallDelegate:instance channel:channel]; -} - -- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)flutterResult { - if (![@"FirebaseFunctions#call" isEqualToString:call.method]) { - flutterResult(FlutterMethodNotImplemented); - return; - } - - FLTFirebaseMethodCallErrorBlock errorBlock = - ^(NSString *_Nullable code, NSString *_Nullable message, NSDictionary *_Nullable details, - NSError *_Nullable error) { - NSMutableDictionary *httpsErrorDetails = [NSMutableDictionary dictionary]; - NSString *httpsErrorCode = [NSString stringWithFormat:@"%ld", error.code]; - NSString *httpsErrorMessage = error.localizedDescription; - // FIRFunctionsErrorDomain has been removed and replaced with Swift implementation - // https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseFunctions/Sources/FunctionsError.swift#L18 - NSString *errorDomain = @"com.firebase.functions"; - // FIRFunctionsErrorDetailsKey has been deprecated and replaced with Swift implementation - // https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseFunctions/Sources/FunctionsError.swift#L21 - NSString *detailsKey = @"details"; - // See also https://github.com/firebase/firebase-ios-sdk/pull/9569 - if ([error.domain isEqualToString:errorDomain]) { - httpsErrorCode = [self mapFunctionsErrorCodes:error.code]; - if (error.userInfo[detailsKey] != nil) { - httpsErrorDetails[@"additionalData"] = error.userInfo[detailsKey]; - } - } - httpsErrorDetails[@"code"] = httpsErrorCode; - httpsErrorDetails[@"message"] = httpsErrorMessage; - flutterResult([FlutterError errorWithCode:httpsErrorCode - message:httpsErrorMessage - details:httpsErrorDetails]); - }; - - FLTFirebaseMethodCallResult *methodCallResult = - [FLTFirebaseMethodCallResult createWithSuccess:flutterResult andErrorBlock:errorBlock]; - - [self httpsFunctionCall:call.arguments withMethodCallResult:methodCallResult]; -} - -#pragma mark - Firebase Functions API - -- (void)httpsFunctionCall:(id)arguments withMethodCallResult:(FLTFirebaseMethodCallResult *)result { - NSString *appName = arguments[@"appName"]; - NSString *functionName = arguments[@"functionName"]; - NSString *functionUri = arguments[@"functionUri"]; - NSString *origin = arguments[@"origin"]; - NSString *region = arguments[@"region"]; - NSNumber *timeout = arguments[@"timeout"]; - NSObject *parameters = arguments[@"parameters"]; - NSNumber *limitedUseAppCheckToken = arguments[@"limitedUseAppCheckToken"]; - - FIRApp *app = [FLTFirebasePlugin firebaseAppNamed:appName]; - FIRFunctions *functions = [FIRFunctions functionsForApp:app region:region]; - if (origin != nil && origin != (id)[NSNull null]) { - NSURL *url = [NSURL URLWithString:origin]; - [functions useEmulatorWithHost:[url host] port:[[url port] intValue]]; - } - - FIRHTTPSCallableOptions *options = [[FIRHTTPSCallableOptions alloc] - initWithRequireLimitedUseAppCheckTokens:[limitedUseAppCheckToken boolValue]]; - - FIRHTTPSCallable *function; - - if (![functionName isEqual:[NSNull null]]) { - function = [functions HTTPSCallableWithName:functionName options:options]; - } else if (![functionUri isEqual:[NSNull null]]) { - function = [functions HTTPSCallableWithURL:[NSURL URLWithString:functionUri] options:options]; - } else { - result.error(@"IllegalArgumentException", @"Either functionName or functionUri must be set", - nil, nil); - return; - } - if (timeout != nil && ![timeout isEqual:[NSNull null]]) { - function.timeoutInterval = timeout.doubleValue / 1000; - } - - [function callWithObject:parameters - completion:^(FIRHTTPSCallableResult *callableResult, NSError *error) { - if (error) { - result.error(nil, nil, nil, error); - } else { - result.success(callableResult.data); - } - }]; -} - -#pragma mark - Utilities - -// Map function error code objects to Strings that match error names on Android. -- (NSString *)mapFunctionsErrorCodes:(FIRFunctionsErrorCode)code { - if (code == FIRFunctionsErrorCodeAborted) { - return @"aborted"; - } else if (code == FIRFunctionsErrorCodeAlreadyExists) { - return @"already-exists"; - } else if (code == FIRFunctionsErrorCodeCancelled) { - return @"cancelled"; - } else if (code == FIRFunctionsErrorCodeDataLoss) { - return @"data-loss"; - } else if (code == FIRFunctionsErrorCodeDeadlineExceeded) { - return @"deadline-exceeded"; - } else if (code == FIRFunctionsErrorCodeFailedPrecondition) { - return @"failed-precondition"; - } else if (code == FIRFunctionsErrorCodeInternal) { - return @"internal"; - } else if (code == FIRFunctionsErrorCodeInvalidArgument) { - return @"invalid-argument"; - } else if (code == FIRFunctionsErrorCodeNotFound) { - return @"not-found"; - } else if (code == FIRFunctionsErrorCodeOK) { - return @"ok"; - } else if (code == FIRFunctionsErrorCodeOutOfRange) { - return @"out-of-range"; - } else if (code == FIRFunctionsErrorCodePermissionDenied) { - return @"permission-denied"; - } else if (code == FIRFunctionsErrorCodeResourceExhausted) { - return @"resource-exhausted"; - } else if (code == FIRFunctionsErrorCodeUnauthenticated) { - return @"unauthenticated"; - } else if (code == FIRFunctionsErrorCodeUnavailable) { - return @"unavailable"; - } else if (code == FIRFunctionsErrorCodeUnimplemented) { - return @"unimplemented"; - } else { - return @"unknown"; - } -} - -#pragma mark - FLTFirebasePlugin - -- (void)didReinitializeFirebaseCore:(void (^)(void))completion { - completion(); -} - -- (NSDictionary *_Nonnull)pluginConstantsForFIRApp:(FIRApp *)firebase_app { - return @{}; -} - -- (NSString *_Nonnull)firebaseLibraryName { - return @LIBRARY_NAME; -} - -- (NSString *_Nonnull)firebaseLibraryVersion { - return @LIBRARY_VERSION; -} - -- (NSString *_Nonnull)flutterChannelName { - return kFLTFirebaseFunctionsChannelName; -} - -@end diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift new file mode 100644 index 000000000000..66766bec71b0 --- /dev/null +++ b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift @@ -0,0 +1,179 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#if canImport(FlutterMacOS) + import FlutterMacOS +#else + import Flutter +#endif + +#if canImport(firebase_core) + import firebase_core +#else + import firebase_core_shared +#endif +import FirebaseFunctions + +let kFLTFirebaseFunctionsChannelName = "plugins.flutter.io/firebase_functions" + +public class FirebaseFunctionsPlugin: NSObject, FLTFirebasePluginProtocol, FlutterPlugin { + public func firebaseLibraryVersion() -> String { + versionNumber + } + + public func didReinitializeFirebaseCore(_ completion: @escaping () -> Void) { + completion() + } + + public func pluginConstants(for firebaseApp: FirebaseApp) -> [AnyHashable: Any] { + [:] + } + + @objc public func firebaseLibraryName() -> String { + "flutter-fire-fn" + } + + @objc public func flutterChannelName() -> String { + kFLTFirebaseFunctionsChannelName + } + + public static func register(with registrar: FlutterPluginRegistrar) { + let binaryMessenger: FlutterBinaryMessenger + + #if os(macOS) + binaryMessenger = registrar.messenger + #elseif os(iOS) + binaryMessenger = registrar.messenger() + #endif + + let channel = FlutterMethodChannel( + name: kFLTFirebaseFunctionsChannelName, + binaryMessenger: binaryMessenger + ) + let instance = FirebaseFunctionsPlugin() + registrar.addMethodCallDelegate(instance, channel: channel) + } + + public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { + guard call.method == "FirebaseFunctions#call" else { + result(FlutterMethodNotImplemented) + return + } + + guard let arguments = call.arguments as? [String: Any] else { + result(FlutterError(code: "invalid_arguments", + message: "Invalid arguments", + details: nil)) + return + } + + httpsFunctionCall(arguments: arguments) { success, error in + if let error { + result(error) + } else { + result(success) + } + } + } + + private func httpsFunctionCall(arguments: [String: Any], + completion: @escaping (Any?, FlutterError?) -> Void) { + let appName = arguments["appName"] as? String ?? "" + let functionName = arguments["functionName"] as? String + let functionUri = arguments["functionUri"] as? String + let origin = arguments["origin"] as? String + let region = arguments["region"] as? String + let timeout = arguments["timeout"] as? Double + let parameters = arguments["parameters"] + let limitedUseAppCheckToken = arguments["limitedUseAppCheckToken"] as? Bool ?? false + + let app = FLTFirebasePlugin.firebaseAppNamed(appName)! + + let functions = Functions.functions(app: app, region: region ?? "") + + if let origin, !origin.isEmpty, + let url = URL(string: origin), + let host = url.host, + let port = url.port { + functions.useEmulator(withHost: host, port: port) + } + + let options = HTTPSCallableOptions(requireLimitedUseAppCheckTokens: limitedUseAppCheckToken) + + let function: HTTPSCallable + + if let functionName, !functionName.isEmpty { + function = functions.httpsCallable(functionName, options: options) + } else if let functionUri, !functionUri.isEmpty, + let url = URL(string: functionUri) { + function = functions.httpsCallable(url, options: options) + } else { + completion(nil, FlutterError( + code: "IllegalArgumentException", + message: "Either functionName or functionUri must be set", + details: nil + )) + return + } + + // Set timeout if provided + if let timeout { + function.timeoutInterval = timeout / 1000 + } + + function.call(parameters) { result, error in + if let error { + let flutterError = self.createFlutterError(from: error) + completion(nil, flutterError) + } else { + completion(result?.data, nil) + } + } + } + + private func createFlutterError(from error: Error) -> FlutterError { + let nsError = error as NSError + var errorCode = "unknown" + var additionalDetails: [String: Any] = [:] + + // Map Firebase Functions error codes + if nsError.domain == "com.firebase.functions" { + errorCode = mapFunctionsErrorCode(nsError.code) + if let details = nsError.userInfo["details"] { + additionalDetails["additionalData"] = details + } + } + + additionalDetails["code"] = errorCode + additionalDetails["message"] = nsError.localizedDescription + + return FlutterError( + code: errorCode, + message: nsError.localizedDescription, + details: additionalDetails + ) + } + + private func mapFunctionsErrorCode(_ code: Int) -> String { + switch code { + case FunctionsErrorCode.aborted.rawValue: return "aborted" + case FunctionsErrorCode.alreadyExists.rawValue: return "already-exists" + case FunctionsErrorCode.cancelled.rawValue: return "cancelled" + case FunctionsErrorCode.dataLoss.rawValue: return "data-loss" + case FunctionsErrorCode.deadlineExceeded.rawValue: return "deadline-exceeded" + case FunctionsErrorCode.failedPrecondition.rawValue: return "failed-precondition" + case FunctionsErrorCode.internal.rawValue: return "internal" + case FunctionsErrorCode.invalidArgument.rawValue: return "invalid-argument" + case FunctionsErrorCode.notFound.rawValue: return "not-found" + case FunctionsErrorCode.OK.rawValue: return "ok" + case FunctionsErrorCode.outOfRange.rawValue: return "out-of-range" + case FunctionsErrorCode.permissionDenied.rawValue: return "permission-denied" + case FunctionsErrorCode.resourceExhausted.rawValue: return "resource-exhausted" + case FunctionsErrorCode.unauthenticated.rawValue: return "unauthenticated" + case FunctionsErrorCode.unavailable.rawValue: return "unavailable" + case FunctionsErrorCode.unimplemented.rawValue: return "unimplemented" + default: return "unknown" + } + } +} diff --git a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h b/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h deleted file mode 100644 index ee6fbb56540d..000000000000 --- a/packages/cloud_functions/cloud_functions/ios/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -#import - -#if TARGET_OS_OSX -#import -#else -#import -#endif - -#import -#if __has_include() -#import -#else -#import -#endif - -@interface FLTFirebaseFunctionsPlugin : FLTFirebasePlugin -@end diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions.podspec b/packages/cloud_functions/cloud_functions/macos/cloud_functions.podspec index 4e568d28e4ed..ca265c77aff7 100644 --- a/packages/cloud_functions/cloud_functions/macos/cloud_functions.podspec +++ b/packages/cloud_functions/cloud_functions/macos/cloud_functions.podspec @@ -15,7 +15,7 @@ else end begin - required_macos_version = "10.13" + required_macos_version = "10.15" current_target_definition = Pod::Config.instance.podfile.send(:current_target_definition) user_osx_target = current_target_definition.to_hash["platform"]["osx"] if (Gem::Version.new(user_osx_target) < Gem::Version.new(required_macos_version)) @@ -41,9 +41,11 @@ Pod::Spec.new do |s| s.license = { :file => '../LICENSE' } s.authors = 'The Chromium Authors' s.source = { :path => '.' } - s.source_files = 'cloud_functions/Sources/cloud_functions/**/*.{h,m}' + s.source_files = 'cloud_functions/Sources/**/*.swift' s.public_header_files = 'cloud_functions/Sources/cloud_functions/include/*.h' - s.platform = :osx, '10.13' + s.platform = :osx, '10.15' + + s.swift_version = '5.0' # Flutter dependencies s.dependency 'FlutterMacOS' @@ -55,7 +57,6 @@ Pod::Spec.new do |s| s.static_framework = true s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => "LIBRARY_VERSION=\\\"#{library_version}\\\" LIBRARY_NAME=\\\"flutter-fire-fn\\\"", 'DEFINES_MODULE' => 'YES' } end diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Package.swift b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Package.swift index 94ba37e78aed..e0474193ad95 100644 --- a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Package.swift +++ b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Package.swift @@ -106,11 +106,6 @@ let package = Package( ], resources: [ .process("Resources"), - ], - cSettings: [ - .headerSearchPath("include"), - .define("LIBRARY_VERSION", to: "\"\(library_version)\""), - .define("LIBRARY_NAME", to: "\"flutter-fire-fn\""), ] ), ] diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/Constants.swift b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/Constants.swift new file mode 120000 index 000000000000..d4cd1d1baf8d --- /dev/null +++ b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/Constants.swift @@ -0,0 +1 @@ +../../../../ios/cloud_functions/Sources/cloud_functions/Constants.swift \ No newline at end of file diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m deleted file mode 120000 index 6801f9eeb0ba..000000000000 --- a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m +++ /dev/null @@ -1 +0,0 @@ -../../../../ios/cloud_functions/Sources/cloud_functions/FLTFirebaseFunctionsPlugin.m \ No newline at end of file diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift new file mode 120000 index 000000000000..368778d54631 --- /dev/null +++ b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift @@ -0,0 +1 @@ +../../../../ios/cloud_functions/Sources/cloud_functions/FirebaseFunctionsPlugin.swift \ No newline at end of file diff --git a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h b/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h deleted file mode 120000 index 55897cd68cde..000000000000 --- a/packages/cloud_functions/cloud_functions/macos/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h +++ /dev/null @@ -1 +0,0 @@ -../../../../../ios/cloud_functions/Sources/cloud_functions/include/FLTFirebaseFunctionsPlugin.h \ No newline at end of file diff --git a/packages/cloud_functions/cloud_functions/pubspec.yaml b/packages/cloud_functions/cloud_functions/pubspec.yaml index 66284533e329..a07771942a98 100644 --- a/packages/cloud_functions/cloud_functions/pubspec.yaml +++ b/packages/cloud_functions/cloud_functions/pubspec.yaml @@ -36,8 +36,8 @@ flutter: package: io.flutter.plugins.firebase.functions pluginClass: FlutterFirebaseFunctionsPlugin ios: - pluginClass: FLTFirebaseFunctionsPlugin + pluginClass: FirebaseFunctionsPlugin macos: - pluginClass: FLTFirebaseFunctionsPlugin + pluginClass: FirebaseFunctionsPlugin web: default_package: cloud_functions_web diff --git a/packages/firebase_core/firebase_core/macos/firebase_core.podspec b/packages/firebase_core/firebase_core/macos/firebase_core.podspec index bb6990fea0b0..030602b6683b 100644 --- a/packages/firebase_core/firebase_core/macos/firebase_core.podspec +++ b/packages/firebase_core/firebase_core/macos/firebase_core.podspec @@ -16,7 +16,7 @@ else end begin - required_macos_version = "10.12" + required_macos_version = "10.15" current_target_definition = Pod::Config.instance.podfile.send(:current_target_definition) user_osx_target = current_target_definition.to_hash["platform"]["osx"] if (Gem::Version.new(user_osx_target) < Gem::Version.new(required_macos_version)) @@ -45,7 +45,7 @@ Pod::Spec.new do |s| s.source_files = 'firebase_core/Sources/firebase_core/**/*.{h,m}' s.public_header_files = 'firebase_core/Sources/firebase_core/include/**/*.h' - s.platform = :osx, '10.13' + s.platform = :osx, '10.15' # Flutter dependencies s.dependency 'FlutterMacOS' diff --git a/scripts/generate_versions_spm.dart b/scripts/generate_versions_spm.dart index c80ee981d233..7977465ce2d9 100644 --- a/scripts/generate_versions_spm.dart +++ b/scripts/generate_versions_spm.dart @@ -131,7 +131,7 @@ void updateVersionsPackageSwift(String firebaseiOSVersion) { void updateLibraryVersionPureSwiftPlugins() { // Packages that require updating library versions - const packages = ['firebase_ml_model_downloader', 'firebase_app_installations']; + const packages = ['firebase_ml_model_downloader', 'firebase_app_installations', 'cloud_functions']; for (final package in packages) { final pubspecPath = 'packages/$package/$package/pubspec.yaml';