diff --git a/.github/workflows/bcny-firebase.yml b/.github/workflows/bcny-firebase.yml
new file mode 100644
index 0000000000..e4d0930c47
--- /dev/null
+++ b/.github/workflows/bcny-firebase.yml
@@ -0,0 +1,395 @@
+name: firebase
+
+on:
+ workflow_dispatch:
+
+jobs:
+ windows:
+ if: false
+
+ runs-on: windows-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: 'amd64'
+ platform: 'x64'
+ - arch: 'arm64'
+ platform: 'ARM64'
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ path: ${{ github.workspace }}/SourceCache/flatbuffers
+ ref: 99aa1ef21dd9dc3f9d4fb0eb82f4b59d0bb5e4c5
+ repository: google/flatbuffers
+
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ path: ${{ github.workspace }}/SourceCache/firebase-cpp-sdk
+ ref: refs/heads/compnerd/swift
+ repository: thebrowsercompany/firebase-cpp-sdk
+
+ - uses: compnerd/gha-setup-vsdevenv@main
+ with:
+ host_arch: amd64
+ components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
+ arch: ${{ matrix.arch }}
+
+ - uses: actions/setup-python@v4
+ id: python
+ with:
+ python-version: 3.9
+ architecture: 'x64'
+
+ - name: Install absl-py
+ run: pip install absl-py
+
+ - name: Configure flatbuffers
+ run:
+ cmake -B ${{ github.workspace }}/BinaryCache/flatbuffers `
+ -D CMAKE_BUILD_TYPE=Release `
+ -G "Visual Studio 17 2022" `
+ -A x64 `
+ -S ${{ github.workspace }}/SourceCache/flatbuffers
+ - name: Build flatc
+ run: cmake --build ${{ github.workspace }}/BinaryCache/flatbuffers --config Release --target flatc
+
+ - name: Adjust cmake build settings for debugging
+ run: powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/CMakeLists.txt
+
+ - name: Configure firebase
+ run:
+ cmake -B ${{ github.workspace }}/BinaryCache/firebase `
+ -D BUILD_SHARED_LIBS=NO `
+ -D CMAKE_BUILD_TYPE=Release `
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr `
+ -G "Visual Studio 17 2022" `
+ -A ${{ matrix.platform }} `
+ -S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
+ -D FLATBUFFERS_BUILD_FLATC=NO `
+ -D FIREBASE_CPP_BUILD_PACKAGE=YES `
+ -D FIREBASE_GITHUB_ACTION_BUILD=YES `
+ -D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
+ -D FIREBASE_INCLUDE_AUTH=YES `
+ -D FIREBASE_INCLUDE_FIRESTORE=YES `
+ -D FIREBASE_USE_BORINGSSL=YES `
+ -D MSVC_RUNTIME_LIBRARY_STATIC=NO `
+ -D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
+ -D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
+ -D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe
+
+ - name: Adjust external project build settings for debugging
+ run: |
+ $names = Get-ChildItem -Path "${{ github.workspace }}/BinaryCache/firebase" -File -Recurse -Filter CMakeLists.txt
+ foreach ($name in $names) {
+ $fullName = $name.FullName
+ powershell ${{ github.workspace }}/SourceCache/firebase-cpp-sdk/build_scripts/windows/fix_cmake_debugflags.ps1 $fullName
+ Write-Host "... fixed up debug options for ${fullName}"
+ }
+
+ - name: Configure firebase after build setting adjustments
+ run:
+ cmake -B ${{ github.workspace }}/BinaryCache/firebase `
+ -D BUILD_SHARED_LIBS=NO `
+ -D CMAKE_BUILD_TYPE=Release `
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr `
+ -G "Visual Studio 17 2022" `
+ -A ${{ matrix.platform }} `
+ -S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
+ -D FLATBUFFERS_BUILD_FLATC=NO `
+ -D FIREBASE_CPP_BUILD_PACKAGE=YES `
+ -D FIREBASE_GITHUB_ACTION_BUILD=YES `
+ -D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
+ -D FIREBASE_INCLUDE_AUTH=YES `
+ -D FIREBASE_INCLUDE_FIRESTORE=YES `
+ -D FIREBASE_USE_BORINGSSL=YES `
+ -D MSVC_RUNTIME_LIBRARY_STATIC=NO `
+ -D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded `
+ -D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
+ -D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe
+ - name: Build firebase
+ run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config RelWithDebInfo
+ - name: Install firebase
+ run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --config RelWithDebInfo --target install
+ - name: Install firebase (manual)
+ run: |
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/firestore_errors.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/firestore_errors.h"
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/geo_point.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/geo_point.h"
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/timestamp.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/timestamp.h"
+
+ Write-Host "Copying static libraries ..."
+ $source = "${{ github.workspace }}/BinaryCache/firebase"
+ $libraries = Get-ChildItem -Path $source -File -Recurse -Filter *.lib
+ foreach ($library in $libraries) {
+ $destination = Join-Path -Path "${{ github.workspace }}/BuildRoot/Library/firebase/usr/libs/windows" -ChildPath $library.Name
+ Copy-Item -Path $library.FullName -Destination $destination -Force
+ Write-Host "... copied ${destination}"
+ }
+ - uses: actions/upload-artifact@v3
+ with:
+ name: firebase-windows-${{ matrix.arch }}
+ path: ${{ github.workspace }}/BuildRoot/Library/firebase
+
+ - name: Package firebase-cpp-sdk
+ run: |
+ @"
+
+
+
+ com.google.firebase.windows.${{ matrix.arch }}
+ 0.0.0.0
+ Firebase C++ SDK
+ C++ Firebase SDK
+ Google, Inc.
+ https://firebase.google.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ "@ | Out-File -Encoding UTF8 firebase.nuspec
+ nuget pack -Properties BUILDROOT=${{ github.workspace }}\BuildRoot\Library\firebase -Suffix (git -C ${{ github.workspace }}/SourceCache/firebase-cpp-sdk log -1 --format=%h) firebase.nuspec
+ shell: pwsh
+ - uses: actions/upload-artifact@v3
+ with:
+ name: windows-${{ matrix.arch }}.nupkg
+ path: com.google.firebase.windows.${{ matrix.arch }}.*.nupkg
+
+ - name: Publish NuGet Packages
+ env:
+ NUGET_SOURCE_NAME: TheBrowserCompany
+ NUGET_SOURCE_URL: https://nuget.pkg.github.com/thebrowsercompany/index.json
+ NUGET_SOURCE_USERNAME: thebrowsercompany-bot2
+ NUGET_SOURCE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
+ NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ if ((nuget sources List | Select-String "${env:NUGET_SOURCE_NAME}").Count -gt 0) {
+ nuget sources Remove -Name "${env:NUGET_SOURCE_NAME}"
+ }
+ nuget sources Add -Name ${env:NUGET_SOURCE_NAME} -Source ${env:NUGET_SOURCE_URL} -Username ${env:NUGET_SOURCE_USERNAME} -Password ${env:NUGET_SOURCE_PASSWORD} -StorePasswordInClearText
+ nuget setApiKey ${env:NUGET_API_KEY} -Source ${env:NUGET_SOURCE_URL}
+ $pkgs = Get-ChildItem -Path com.google.firebase.windows.${{ matrix.arch }}.*.nupkg
+ nuget push $pkgs[0].Name -Source ${env:NUGET_SOURCE_URL} -SkipDuplicate
+ shell: pwsh
+
+ android:
+ runs-on: windows-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: 'aarch64'
+ platform: 'arm64-v8a'
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ path: ${{ github.workspace }}/SourceCache/flatbuffers
+ ref: 99aa1ef21dd9dc3f9d4fb0eb82f4b59d0bb5e4c5
+ repository: google/flatbuffers
+
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ path: ${{ github.workspace }}/SourceCache/firebase-cpp-sdk
+ ref: refs/heads/compnerd/swift
+ repository: thebrowsercompany/firebase-cpp-sdk
+
+ # NOTE(compnerd) we use setup-vsdevenv to get CMake and Ninja into `Path`
+ - uses: compnerd/gha-setup-vsdevenv@main
+ with:
+ host_arch: amd64
+
+ - uses: actions/setup-python@v4
+ id: python
+ with:
+ python-version: 3.9
+ architecture: 'x64'
+
+ - name: Install absl-py
+ run: pip install absl-py
+
+ - name: Configure flatbuffers
+ run:
+ cmake -B ${{ github.workspace }}/BinaryCache/flatbuffers `
+ -D CMAKE_BUILD_TYPE=Release `
+ -G "Visual Studio 17 2022" `
+ -A x64 `
+ -S ${{ github.workspace }}/SourceCache/flatbuffers
+ - name: Build flatc
+ run: cmake --build ${{ github.workspace }}/BinaryCache/flatbuffers --config Release --target flatc
+
+ - uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
+ - uses: android-actions/setup-android@v3
+
+ - name: Configure firebase
+ run: |
+ $ANDROID_NDK_ROOT = cygpath -m $env:ANDROID_NDK
+
+ cmake -B ${{ github.workspace }}/BinaryCache/firebase `
+ -D BUILD_SHARED_LIBS=NO `
+ -D CMAKE_BUILD_TYPE=RelWithDebInfo `
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/firebase/usr `
+ -D CMAKE_MAKE_PROGRAM=$((Get-Command Ninja).Source) `
+ -D CMAKE_SYSTEM_NAME=Android `
+ -D CMAKE_ANDROID_API=28 `
+ -D CMAKE_ANDROID_ARCH_ABI=${{ matrix.platform }} `
+ -D CMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT `
+ -G Ninja `
+ -S ${{ github.workspace }}/SourceCache/firebase-cpp-sdk `
+ -D FLATBUFFERS_BUILD_FLATC=NO `
+ -D FIREBASE_CPP_BUILD_PACKAGE=YES `
+ -D FIREBASE_GITHUB_ACTION_BUILD=YES `
+ -D FIREBASE_INCLUDE_LIBRARY_DEFAULT=OFF `
+ -D FIREBASE_INCLUDE_AUTH=YES `
+ -D FIREBASE_INCLUDE_FIRESTORE=YES `
+ -D FIREBASE_USE_BORINGSSL=YES `
+ -D FIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=${{ steps.python.outputs.python-path }} `
+ -D FLATBUFFERS_FLATC_EXECUTABLE=${{ github.workspace }}/BinaryCache/flatbuffers/Release/flatc.exe
+ - name: Build firebase
+ run: cmake --build ${{ github.workspace }}/BinaryCache/firebase
+ - name: Install firebase
+ run: cmake --build ${{ github.workspace }}/BinaryCache/firebase --target install
+ - name: Install firebase (manual)
+ run: |
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/firestore_errors.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/firestore_errors.h"
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/geo_point.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/geo_point.h"
+ Copy-Item "${{ github.workspace }}/BinaryCache/firebase/external/src/firestore/Firestore/core/include/firebase/firestore/timestamp.h" "${{ github.workspace }}/BuildRoot/Library/firebase/usr/include/firebase/firestore/timestamp.h"
+
+ Write-Host "Copying static libraries ..."
+ $source = "${{ github.workspace }}/BinaryCache/firebase"
+ $libraries = Get-ChildItem -Path $source -File -Recurse -Filter *.a
+ foreach ($library in $libraries) {
+ $destination = Join-Path -Path "${{ github.workspace }}/BuildRoot/Library/firebase/usr/libs/android" -ChildPath $library.Name
+ Copy-Item -Path $library.FullName -Destination $destination -Force
+ Write-Host "... copied ${destination}"
+ }
+ - uses: actions/upload-artifact@v3
+ with:
+ name: firebase-android-${{ matrix.arch }}
+ path: ${{ github.workspace }}/BuildRoot/Library/firebase
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 194618cd77..1b5ebcc2cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,10 @@
# Top level CMake file that defines the entire Firebase C++ SDK build.
+if(POLICY CMP0141)
+ cmake_policy(SET CMP0141 NEW)
+endif()
+
cmake_minimum_required (VERSION 3.1)
set (CMAKE_CXX_STANDARD 14)
diff --git a/app/src/include/firebase/future.h b/app/src/include/firebase/future.h
index 0d09fc079a..d28984e724 100644
--- a/app/src/include/firebase/future.h
+++ b/app/src/include/firebase/future.h
@@ -407,6 +407,11 @@ class Future : public FutureBase {
/// when you set up the callback.
typedef void (*TypedCompletionCallback)(const Future& result_data,
void* user_data);
+#if defined(__swift__)
+ // TODO(apple/swift#67662) indirect block parameters are unsupported
+ typedef void (*TypedCompletionCallback_SwiftWorkaround)(
+ const Future* result_data, void* user_data);
+#endif
/// Construct a future.
Future() {}
@@ -464,6 +469,16 @@ class Future : public FutureBase {
inline void OnCompletion(TypedCompletionCallback callback,
void* user_data) const;
+#if defined(__swift__)
+ // TODO(apple/swift#67662) indirect block parameters are unsupported
+ inline void OnCompletion_SwiftWorkaround(
+ TypedCompletionCallback_SwiftWorkaround callback, void* user_data) const {
+ OnCompletion([callback, user_data](const Future& future) {
+ callback(&future, user_data);
+ });
+ }
+#endif
+
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
/// Register a single callback that will be called at most once, when the
/// future is completed.
diff --git a/auth/CMakeLists.txt b/auth/CMakeLists.txt
index 5ffbc2ec71..0bc5038099 100644
--- a/auth/CMakeLists.txt
+++ b/auth/CMakeLists.txt
@@ -51,6 +51,7 @@ build_flatbuffers("${flatbuffer_schemas}"
# Common source files used by all platforms
set(common_SRCS
src/auth.cc
+ src/auth_swift.cc
src/credential.cc
src/common.cc
src/common.h
diff --git a/auth/src/auth_swift.cc b/auth/src/auth_swift.cc
new file mode 100644
index 0000000000..a6cedcd5eb
--- /dev/null
+++ b/auth/src/auth_swift.cc
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define __swift__ 50000
+#include "auth/src/include/firebase/auth.h"
+
+#if FIREBASE_PLATFORM_WINDOWS
+namespace firebase {
+namespace auth {
+Auth::Auth(const Auth &) noexcept = default;
+}
+} // namespace firebase
+#endif
diff --git a/auth/src/include/firebase/auth.h b/auth/src/include/firebase/auth.h
index 9fdab7810b..97c7ed51fa 100644
--- a/auth/src/include/firebase/auth.h
+++ b/auth/src/include/firebase/auth.h
@@ -149,6 +149,13 @@ class Auth {
~Auth();
+#if defined(__swift__)
+#if FIREBASE_PLATFORM_WINDOWS
+ // TODO(apple/swift#67288) support trivial C++ types with non-trivial dtors
+ Auth(const Auth&) noexcept;
+#endif
+#endif
+
/// Synchronously gets the cached current user, or returns an object where
/// is_valid() == false if there is none.
///
diff --git a/build_scripts/windows/fix_cmake_debugflags.ps1 b/build_scripts/windows/fix_cmake_debugflags.ps1
new file mode 100644
index 0000000000..d2591d65a0
--- /dev/null
+++ b/build_scripts/windows/fix_cmake_debugflags.ps1
@@ -0,0 +1,33 @@
+# Path to the CMakeLists.txt file
+$filePath = $args[0]
+
+# Lines to add after the line starting with "cmake_minimum_required"
+$newLines = @(
+ 'string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")',
+ 'string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")',
+ 'string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")',
+ 'string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")'
+)
+
+# Read the content of the file
+$content = Get-Content -Path $filePath
+
+# New content holder
+$newContent = @()
+
+# Flag to check if lines are added
+$linesAdded = $false
+
+foreach ($line in $content) {
+ # Add the current line to new content
+ $newContent += $line
+
+ # Check if the line starts with "cmake_minimum_required" and add new lines after it
+ if ($line -match '^cmake_minimum_required' -and -not $linesAdded) {
+ $newContent += $newLines
+ $linesAdded = $true
+ }
+}
+
+# Write the new content back to the file
+$newContent | Set-Content -Path $filePath
diff --git a/cmake/external_rules.cmake b/cmake/external_rules.cmake
index bdd38b0eda..2ce5a13e48 100644
--- a/cmake/external_rules.cmake
+++ b/cmake/external_rules.cmake
@@ -235,6 +235,10 @@ function(build_external_dependencies)
# Propagate the PIC setting, as the dependencies need to match it
set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE})
+ if(Python3_EXECUTABLE)
+ set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
+ -DPython3_EXECUTABLE=${Python3_EXECUTABLE})
+ endif()
message(STATUS "Sub-configure options: ${CMAKE_SUB_CONFIGURE_OPTIONS}")
message(STATUS "Sub-build options: ${CMAKE_SUB_BUILD_OPTIONS}")
diff --git a/firestore/CMakeLists.txt b/firestore/CMakeLists.txt
index ae22ddd8ea..9a3cc2888f 100644
--- a/firestore/CMakeLists.txt
+++ b/firestore/CMakeLists.txt
@@ -35,6 +35,7 @@ set(common_SRCS
src/common/field_path.cc
src/common/field_value.cc
src/common/firestore.cc
+ src/common/firestore_swift.cc
src/common/firestore_exceptions_common.h
src/common/futures.cc
src/common/futures.h
@@ -352,7 +353,7 @@ if(IOS)
set(FIREBASE_FIRESTORE_CORE_HEADER_DIR
${FIREBASE_POD_DIR}/Pods/FirebaseFirestoreInternal/Firestore/core/include
)
-
+
else()
# Desktop and Android get their public headers from the CMake build in
# firebase-ios-sdk.
diff --git a/firestore/src/common/firestore_swift.cc b/firestore/src/common/firestore_swift.cc
new file mode 100644
index 0000000000..7e3d25be4a
--- /dev/null
+++ b/firestore/src/common/firestore_swift.cc
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define __swift__ 50000
+#include "firestore/src/include/firebase/firestore.h"
+
+#if FIREBASE_PLATFORM_WINDOWS
+namespace firebase {
+namespace firestore {
+Firestore::Firestore(const Firestore &) noexcept = default;
+}
+} // namespace firebase
+#endif
diff --git a/firestore/src/include/firebase/firestore.h b/firestore/src/include/firebase/firestore.h
index c3cf04e07f..79de28f996 100644
--- a/firestore/src/include/firebase/firestore.h
+++ b/firestore/src/include/firebase/firestore.h
@@ -195,7 +195,15 @@ class Firestore {
* Deleted copy constructor; Firestore must be created with
* Firestore::GetInstance().
*/
+#if defined(__swift__)
+#if FIREBASE_PLATFORM_WINDOWS
+ Firestore(const Firestore& src) noexcept;
+#else
Firestore(const Firestore& src) = delete;
+#endif
+#else
+ Firestore(const Firestore& src) = delete;
+#endif
/**
* Deleted copy assignment operator; Firestore must be created with
diff --git a/firestore/src/include/firebase/firestore/map_field_value.h b/firestore/src/include/firebase/firestore/map_field_value.h
index 8c67c05a10..a63cfe70d9 100644
--- a/firestore/src/include/firebase/firestore/map_field_value.h
+++ b/firestore/src/include/firebase/firestore/map_field_value.h
@@ -31,6 +31,15 @@ using MapFieldValue = std::unordered_map;
/** @brief A map of `FieldValue`s indexed by field paths. */
using MapFieldPathValue = std::unordered_map;
+#if defined(__swift__)
+// Reference the following types so that they are included in the CXX
+// module. A workaround for deserialization cross reference compiler
+// crashes https://github.com/apple/swift/issues/70253
+using FieldValueVector = std::vector;
+using FieldValueVectorConstIterator = std::_Vector_const_iterator>>;
+using StringVectorConstIterator = std::vector::const_iterator;
+#endif
+
} // namespace firestore
} // namespace firebase
diff --git a/scripts/git/patches/boringssl/0001-disable-warnings.patch b/scripts/git/patches/boringssl/0001-disable-warnings.patch
index e8063cf487..9d4551df98 100644
--- a/scripts/git/patches/boringssl/0001-disable-warnings.patch
+++ b/scripts/git/patches/boringssl/0001-disable-warnings.patch
@@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -197,6 +197,11 @@ elseif(MSVC)
+@@ -197,6 +197,14 @@ elseif(MSVC)
# possible loss of data
"C4244" # 'function' : conversion from 'int' to 'uint8_t',
# possible loss of data
@@ -9,6 +9,9 @@
+ "C4191" # 'operator/operation' : unsafe conversion from 'type of
+ # expression' to 'type required'
+ "C5264" # 'const' variable is not used
++ "C4746" # volatile access of 'label' is subject to /volatile:
++ # setting; consider using __iso_volatile_load/store intrinsic
++ # functions
"C4267" # conversion from 'size_t' to 'int', possible loss of data
"C4371" # layout of class may have changed from a previous version of the
# compiler due to better packing of member '...'