diff --git a/FirebaseMessaging/Sources/FIRMessagingRmqManager.m b/FirebaseMessaging/Sources/FIRMessagingRmqManager.m index 6a28d1d926d..ae28e2c6a6e 100644 --- a/FirebaseMessaging/Sources/FIRMessagingRmqManager.m +++ b/FirebaseMessaging/Sources/FIRMessagingRmqManager.m @@ -501,7 +501,7 @@ - (void)openDatabase { #ifdef SQLITE_OPEN_FILEPROTECTION_NONE flags |= SQLITE_OPEN_FILEPROTECTION_NONE; #endif - int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL); + int result = sqlite3_open_v2([path UTF8String], &self->_database, flags, NULL); if (result != SQLITE_OK) { NSString *errorString = FIRMessagingStringFromSQLiteResult(result); NSString *errorMessage = [NSString @@ -522,7 +522,7 @@ - (void)openDatabase { #ifdef SQLITE_OPEN_FILEPROTECTION_NONE flags |= SQLITE_OPEN_FILEPROTECTION_NONE; #endif - int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL); + int result = sqlite3_open_v2([path UTF8String], &self->_database, flags, NULL); if (result != SQLITE_OK) { NSString *errorString = FIRMessagingStringFromSQLiteResult(result); NSString *errorMessage = diff --git a/Firestore/core/src/api/pipeline_result_change.cc b/Firestore/core/src/api/pipeline_result_change.cc index 02bf1259d38..9d6e7f0491e 100644 --- a/Firestore/core/src/api/pipeline_result_change.cc +++ b/Firestore/core/src/api/pipeline_result_change.cc @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/core/src/api/pipeline_result_change.h b/Firestore/core/src/api/pipeline_result_change.h index 5566d7b9d35..c1d9c842d24 100644 --- a/Firestore/core/src/api/pipeline_result_change.h +++ b/Firestore/core/src/api/pipeline_result_change.h @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Firestore/core/src/api/realtime_pipeline_snapshot.cc b/Firestore/core/src/api/realtime_pipeline_snapshot.cc index cffc9554ab5..14f89cd1700 100644 --- a/Firestore/core/src/api/realtime_pipeline_snapshot.cc +++ b/Firestore/core/src/api/realtime_pipeline_snapshot.cc @@ -1,5 +1,5 @@ /* - * Copyright 2025 Google + * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Package.swift b/Package.swift index d2d8a2009b2..bfc3a91aa58 100644 --- a/Package.swift +++ b/Package.swift @@ -20,6 +20,11 @@ import PackageDescription let firebaseVersion = "12.3.0" +// For private preview, Firestore must be built from source. +let shouldUseSourceFirestore = true +// Remove the above and uncomment the line below before merging Firestore to main. +// let shouldUseSourceFirestore = Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil + let package = Package( name: "Firebase", platforms: [.iOS(.v15), .macCatalyst(.v15), .macOS(.v10_15), .tvOS(.v15), .watchOS(.v7)], @@ -1400,7 +1405,7 @@ func abseilDependency() -> Package.Dependency { // If building Firestore from source, abseil will need to be built as source // as the headers in the binary version of abseil are unusable. - if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { + if shouldUseSourceFirestore { packageInfo = ( "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20240722.0" ..< "0.20240723.0" @@ -1420,7 +1425,7 @@ func grpcDependency() -> Package.Dependency { // If building Firestore from source, abseil will need to be built as source // as the headers in the binary version of abseil are unusable. - if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { + if shouldUseSourceFirestore { packageInfo = ("https://github.com/grpc/grpc-ios.git", "1.69.0" ..< "1.70.0") } else { packageInfo = ("https://github.com/google/grpc-binary.git", "1.69.0" ..< "1.70.0") @@ -1430,7 +1435,7 @@ func grpcDependency() -> Package.Dependency { } func firestoreWrapperTarget() -> Target { - if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { + if shouldUseSourceFirestore { return .target( name: "FirebaseFirestoreTarget", dependencies: [.target(name: "FirebaseFirestore", @@ -1449,7 +1454,7 @@ func firestoreWrapperTarget() -> Target { } func firestoreTargets() -> [Target] { - if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil { + if shouldUseSourceFirestore { return [ .target( name: "FirebaseFirestoreInternalWrapper",