From 50fca519a40035830830b04aa6ea94230bb7eef6 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 18:03:33 -0400 Subject: [PATCH 01/93] Remove the patch to enable Snappy support --- cmake/external/firestore.cmake | 63 +-- cmake/external/firestore_patch.py | 119 +++++ cmake/external/firestore_patch_test.py | 162 ++++++ cmake/external/firestore_snappy.patch.txt | 619 ---------------------- 4 files changed, 296 insertions(+), 667 deletions(-) create mode 100644 cmake/external/firestore_patch.py create mode 100644 cmake/external/firestore_patch_test.py delete mode 100644 cmake/external/firestore_snappy.patch.txt diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index d94c6681e3..af34fe9a0e 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,59 +13,26 @@ # limitations under the License. include(ExternalProject) +include(FindPythonInterp) if(TARGET firestore) return() endif() -function(GetReleasedDep version) - message("Getting released firebase-ios-sdk @ ${version}") - ExternalProject_Add( - firestore +ExternalProject_Add( + firestore - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - URL https://github.com/firebase/firebase-ios-sdk/archive/${version}.tar.gz + DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} + GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk + GIT_TAG 582b384c99a5dd24331161d436fdb6fd088fa833 + GIT_SHALLOW ON - PREFIX ${PROJECT_BINARY_DIR} - - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt - HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" - ) -endfunction() - -function(GetTag t) - message("Getting firebase-ios-sdk from ${t}") - ExternalProject_Add( - firestore - - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - GIT_REPOSITORY "https://github.com/firebase/firebase-ios-sdk.git" - GIT_TAG ${t} - GIT_SHALLOW "ON" - - PREFIX ${PROJECT_BINARY_DIR} - - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt - HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" - ) -endfunction() - -if((NOT FIRESTORE_DEP_SOURCE) OR (FIRESTORE_DEP_SOURCE STREQUAL "RELEASED")) - # Get from released dependency by default - GetReleasedDep("CocoaPods-8.12.1") -else() - if(FIRESTORE_DEP_SOURCE STREQUAL "TIP") - GetTag("origin/master") - else() - GetTag(${FIRESTORE_DEP_SOURCE}) - endif() -endif() + PREFIX ${PROJECT_BINARY_DIR} + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" +) diff --git a/cmake/external/firestore_patch.py b/cmake/external/firestore_patch.py new file mode 100644 index 0000000000..f25e46e1da --- /dev/null +++ b/cmake/external/firestore_patch.py @@ -0,0 +1,119 @@ +# Copyright 2022 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. + +""" +Modify the version in leveldb.cmake from the Firebase iOS SDK to match the +version from this C++ SDK. +""" + +import argparse +import dataclasses +import os +import pathlib +import re +from typing import Iterable, Sequence + + +VERSION_PATTERN = r"\s*set\s*\(\s*version\s+([^)\s]+)\s*\)\s*" +VERSION_EXPR = re.compile(VERSION_PATTERN, re.IGNORECASE) + + +def main() -> None: + args = parse_args() + leveldb_version = load_leveldb_version(args.leveldb_cmake_src_file) + set_leveldb_version(args.leveldb_cmake_dest_file, leveldb_version) + + +@dataclasses.dataclass(frozen=True) +class ParsedArgs: + leveldb_cmake_src_file: pathlib.Path + leveldb_cmake_dest_file: pathlib.Path + + +def parse_args() -> ParsedArgs: + arg_parser = argparse.ArgumentParser() + arg_parser.add_argument("--leveldb-version-from", required=True) + arg_parser.add_argument("--leveldb-version-to") + + parsed_args = arg_parser.parse_args() + + leveldb_cmake_src_file = pathlib.Path(parsed_args.leveldb_version_from) + + if parsed_args.leveldb_version_to: + leveldb_cmake_dest_file = pathlib.Path(parsed_args.leveldb_version_to) + else: + leveldb_cmake_dest_file = pathlib.Path.cwd() \ + / "cmake" / "external" / "leveldb.cmake" + + return ParsedArgs( + leveldb_cmake_src_file=leveldb_cmake_src_file, + leveldb_cmake_dest_file=leveldb_cmake_dest_file, + ) + + +def load_leveldb_version(cmake_file: pathlib.Path) -> str: + version = None + version_line = None + version_line_number = None + + with cmake_file.open("rt", encoding="utf8") as f: + for (line_number, line) in enumerate(f, start=1): + match = VERSION_EXPR.fullmatch(line) + if match: + if version is not None: + raise LevelDbVersionLineError( + f"Multiple lines matching regex {VERSION_EXPR.pattern} found in " + f"{cmake_file}: line {version_line_number}, {version_line.strip()} " + f"and line {line_number}, {line.strip()}") + version = match.group(1).strip() + version_line = line + version_line_number = line_number + + if version is None: + raise LevelDbVersionLineError( + f"No line matching regex {VERSION_EXPR.pattern} found in {cmake_file}") + + return version + + +def set_leveldb_version(cmake_file: pathlib.Path, version: str) -> str: + with cmake_file.open("rt", encoding="utf8") as f: + lines = list(f) + + version_lines_found = [] + for (i, line) in enumerate(lines): + match = VERSION_EXPR.fullmatch(line) + if match: + lines[i] = line[:match.start(1)] + version + line[match.end(1):] + version_lines_found.append(i) + + if len(version_lines_found) == 0: + raise LevelDbVersionLineError( + f"No line matching regex {VERSION_EXPR.pattern} found in {cmake_file}") + elif len(version_lines_found) > 1: + raise LevelDbVersionLineError( + f"Multiple lines matching regex {VERSION_EXPR.pattern} found in " + f"{cmake_file}: {', '.join(str(i+1) for i in version_lines_found)}") + + with cmake_file.open("wt", encoding="utf8") as f: + f.writelines(lines) + + +class LevelDbVersionLineError(Exception): + pass + + + +if __name__ == "__main__": + main() diff --git a/cmake/external/firestore_patch_test.py b/cmake/external/firestore_patch_test.py new file mode 100644 index 0000000000..3b289259f3 --- /dev/null +++ b/cmake/external/firestore_patch_test.py @@ -0,0 +1,162 @@ +# Copyright 2022 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. + +import firestore_patch +import pathlib +import shutil +import tempfile +import unittest + + +class LoadLevelDbVersionTest(unittest.TestCase): + + def setUp(self): + super().setUp() + temp_dir = pathlib.Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, temp_dir) + self.temp_file = temp_dir / "temp_file.txt" + + def test_loads_correct_version(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("blah1", file=f) + print("set(version 1.23)", file=f) + print("blah2", file=f) + + version = firestore_patch.load_leveldb_version(self.temp_file) + + self.assertEqual(version, "1.23") + + def test_ignores_whitespace(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print(" set ( version 1.23 ) ", file=f) + + version = firestore_patch.load_leveldb_version(self.temp_file) + + self.assertEqual(version, "1.23") + + def test_case_insensitive(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("SeT(vErSiOn 1.23)", file=f) + + version = firestore_patch.load_leveldb_version(self.temp_file) + + self.assertEqual(version, "1.23") + + def test_version_not_found_raises_error(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("aaa", file=f) + print("bbb", file=f) + + with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: + firestore_patch.load_leveldb_version(self.temp_file) + + self.assertIn("no line matching", str(cm.exception).lower()) + self.assertIn(str(self.temp_file), str(cm.exception)) + + def test_multiple_version_lines_found_raises_error(self): + with self.temp_file.open("wt", encoding="utf8") as f: + for i in range(100): + print(f"line {i+1}", file=f) + print("set(version aaa)", file=f) + print("set(version bbb)", file=f) + + with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: + firestore_patch.load_leveldb_version(self.temp_file) + + self.assertIn("multiple lines matching", str(cm.exception).lower()) + self.assertIn(str(self.temp_file), str(cm.exception)) + self.assertIn("line 101", str(cm.exception)) + self.assertIn("line 102", str(cm.exception)) + self.assertIn("aaa", str(cm.exception)) + self.assertIn("bbb", str(cm.exception)) + + +class SetLevelDbVersionTest(unittest.TestCase): + + def setUp(self): + super().setUp() + temp_dir = pathlib.Path(tempfile.mkdtemp()) + self.addCleanup(shutil.rmtree, temp_dir) + self.temp_file = temp_dir / "temp_file.txt" + + def test_saves_correct_version(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("set(version asdfasdf)", file=f) + + firestore_patch.set_leveldb_version(self.temp_file, "1.2.3") + + new_version = firestore_patch.load_leveldb_version(self.temp_file) + self.assertEqual(new_version, "1.2.3") + + def test_case_insensitivity(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("sEt(vErSiOn asdfasdf)", file=f) + + firestore_patch.set_leveldb_version(self.temp_file, "1.2.3") + + new_version = firestore_patch.load_leveldb_version(self.temp_file) + self.assertEqual(new_version, "1.2.3") + + def test_leaves_whitespace_alone(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print(" set ( version 1.2.3.4 ) ", file=f) + temp_file_contents = self.temp_file.read_text(encoding="utf8") + + firestore_patch.set_leveldb_version(self.temp_file, "a.b.c.d") + + temp_file_contents_after = self.temp_file.read_text(encoding="utf8") + expected_temp_file_contents = temp_file_contents.replace("1.2.3.4", "a.b.c.d") + self.assertEqual(temp_file_contents_after, expected_temp_file_contents) + + def test_does_not_touch_other_lines(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("blah1", file=f) + print("set(version 1.2.3.4)", file=f) + print("blah2", file=f) + temp_file_contents = self.temp_file.read_text(encoding="utf8") + + firestore_patch.set_leveldb_version(self.temp_file, "a.b.c.d") + + temp_file_contents_after = self.temp_file.read_text(encoding="utf8") + expected_temp_file_contents = temp_file_contents.replace("1.2.3.4", "a.b.c.d") + self.assertEqual(temp_file_contents_after, expected_temp_file_contents) + + def test_version_not_found_raises_error(self): + with self.temp_file.open("wt", encoding="utf8") as f: + print("aaa", file=f) + print("bbb", file=f) + + with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: + firestore_patch.set_leveldb_version(self.temp_file, "a.b.c") + + self.assertIn("no line matching", str(cm.exception).lower()) + self.assertIn(str(self.temp_file), str(cm.exception)) + + def test_multiple_version_lines_found_raises_error(self): + with self.temp_file.open("wt", encoding="utf8") as f: + for i in range(100): + print(f"line {i+1}", file=f) + print("set(version aaa)", file=f) + print("set(version bbb)", file=f) + + with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: + firestore_patch.set_leveldb_version(self.temp_file, "a.b.c") + + self.assertIn("multiple lines matching", str(cm.exception).lower()) + self.assertIn(str(self.temp_file), str(cm.exception)) + self.assertIn("101, 102", str(cm.exception)) + + +if __name__ == "__main__": + unittest.main() diff --git a/cmake/external/firestore_snappy.patch.txt b/cmake/external/firestore_snappy.patch.txt deleted file mode 100644 index 5a50404302..0000000000 --- a/cmake/external/firestore_snappy.patch.txt +++ /dev/null @@ -1,619 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 29458bf13..7be37691d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -227,6 +227,12 @@ if(NOT ZLIB_FOUND) - endif() - - -+# Snappy -+set(SNAPPY_BUILD_TESTS OFF CACHE BOOL "Firestore disabled") -+set(SNAPPY_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled") -+add_external_subdirectory(snappy) -+firebase_ios_add_alias(Snappy::Snappy snappy) -+ - # LevelDB - set(LEVELDB_BUILD_TESTS OFF CACHE BOOL "Firestore disabled") - set(LEVELDB_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled") -diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt -index 2179633a8..c1de37b6d 100644 ---- a/cmake/external/CMakeLists.txt -+++ b/cmake/external/CMakeLists.txt -@@ -30,6 +30,7 @@ include(c-ares) - include(googletest) - include(GoogleUtilities) - include(grpc) -+include(snappy) - include(leveldb) - include(libfuzzer) - include(nanopb) -diff --git a/cmake/external/leveldb.cmake b/cmake/external/leveldb.cmake -index b71a77535..2556d7041 100644 ---- a/cmake/external/leveldb.cmake -+++ b/cmake/external/leveldb.cmake -@@ -13,20 +13,27 @@ - # limitations under the License. - - include(ExternalProject) -+include(FindPythonInterp) - - if(TARGET leveldb) - return() - endif() - --set(version 1.22) -+set(version 1.23) -+ -+ExternalProject_Get_property(snappy SOURCE_DIR) -+set(snappy_source_dir "${SOURCE_DIR}") -+ExternalProject_Get_property(snappy BINARY_DIR) -+set(snappy_binary_dir "${BINARY_DIR}") - - ExternalProject_Add( - leveldb - -+ DEPENDS snappy -+ - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - DOWNLOAD_NAME leveldb-${version}.tar.gz - URL https://github.com/google/leveldb/archive/${version}.tar.gz -- URL_HASH SHA256=55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2 - - PREFIX ${PROJECT_BINARY_DIR} - -@@ -34,6 +41,7 @@ ExternalProject_Add( - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -+ PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/leveldb_patch.py --snappy-source-dir ${snappy_source_dir} --snappy-binary-dir ${snappy_binary_dir} - - HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" - ) -diff --git a/cmake/external/leveldb_patch.py b/cmake/external/leveldb_patch.py -new file mode 100644 -index 000000000..51a62d54a ---- /dev/null -+++ b/cmake/external/leveldb_patch.py -@@ -0,0 +1,144 @@ -+# Copyright 2022 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. -+ -+""" -+Modify the CMakeLists.txt from LevelDb to staticly link Snappy compression -+support. -+""" -+ -+import argparse -+import dataclasses -+import os -+import pathlib -+from typing import Iterable, Sequence -+ -+ -+def main() -> None: -+ arg_parser = argparse.ArgumentParser() -+ arg_parser.add_argument("--snappy-source-dir", required=True) -+ arg_parser.add_argument("--snappy-binary-dir", required=True) -+ parsed_args = arg_parser.parse_args() -+ del arg_parser -+ snappy_source_dir = pathlib.Path(parsed_args.snappy_source_dir) -+ snappy_binary_dir = pathlib.Path(parsed_args.snappy_binary_dir) -+ del parsed_args -+ -+ cmakelists_txt_file = pathlib.Path("CMakeLists.txt") -+ with cmakelists_txt_file.open("rt", encoding="utf8") as f: -+ lines = tuple(f) -+ -+ patcher = CMakeListsPatcher( -+ lines, -+ os.path.abspath(__file__), -+ snappy_source_dir, -+ snappy_binary_dir, -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ with cmakelists_txt_file.open("wt", encoding="utf8") as f: -+ f.writelines(patched_lines) -+ -+ -+@dataclasses.dataclass(frozen=True) -+class LineComponents: -+ full: str -+ indent: str -+ line: str -+ eol: str -+ -+ -+class CMakeListsPatcher: -+ -+ SNAPPY_DETECT_LINE = \ -+ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""" -+ SNAPPY_INCLUDE_LINE = \ -+ "target_include_directories(leveldb" -+ SNAPPY_LINK_LINE = \ -+ "target_link_libraries(leveldb snappy)" -+ -+ def __init__( -+ self, -+ lines: Sequence[str], -+ script_name: str, -+ snappy_source_dir: pathlib.Path, -+ snappy_binary_dir: pathlib.Path) -> None: -+ self.i = 0 -+ self.lines = lines -+ self.script_name = script_name -+ self.snappy_source_dir_str = snappy_source_dir.as_posix() -+ self.snappy_binary_dir_str = snappy_binary_dir.as_posix() -+ -+ def patch(self) -> Iterable[str]: -+ while self.i < len(self.lines): -+ full_line = self.lines[self.i] -+ line = self._split_line(full_line) -+ self.i += 1 -+ -+ if line.line == self.SNAPPY_DETECT_LINE: -+ yield from self._on_snappy_detect_line(line) -+ elif line.line == self.SNAPPY_INCLUDE_LINE: -+ yield full_line -+ yield from self._on_leveldb_include_start() -+ elif line.line == self.SNAPPY_LINK_LINE: -+ yield from self._on_leveldb_snappy_link_line(line) -+ else: -+ yield full_line -+ -+ def _begin_mod_line(self, mod_name: str) -> str: -+ return f"# BEGIN: {mod_name} modification by {self.script_name}" -+ -+ def _end_mod_line(self, mod_name: str) -> str: -+ return f"# END: {mod_name} modification by {self.script_name}" -+ -+ def _on_snappy_detect_line(self, line: LineComponents) -> Iterable[str]: -+ yield self._begin_mod_line("snappy_detect_line") + line.eol -+ yield line.indent + "# " + line.line + line.eol -+ yield line.indent + """set(HAVE_SNAPPY ON CACHE BOOL "")""" + line.eol -+ yield self._end_mod_line("snappy_detect_line") + line.eol -+ -+ def _on_leveldb_include_start(self) -> Iterable[str]: -+ line1 = self._split_line(self.lines[self.i]) -+ line2 = self._split_line(self.lines[self.i + 1]) -+ begin_mod_line = self._begin_mod_line("leveldb_include_start") -+ -+ if line1.line == begin_mod_line: -+ return -+ -+ yield begin_mod_line + line1.eol -+ yield line1.indent + "PRIVATE" + line1.eol -+ yield line2.indent + self.snappy_source_dir_str + line2.eol -+ yield line2.indent + self.snappy_binary_dir_str + line2.eol -+ yield self._end_mod_line("leveldb_include_start") + line1.eol -+ -+ def _on_leveldb_snappy_link_line(self, line: LineComponents) -> Iterable[str]: -+ yield self._begin_mod_line("leveldb_snappy_link_line") + line.eol -+ yield line.indent + "# " + line.line + line.eol -+ yield line.indent + f"target_link_libraries(leveldb Snappy::Snappy)" + line.eol -+ yield self._end_mod_line("leveldb_snappy_link_line") + line.eol -+ -+ def _split_line(self, line: str) -> LineComponents: -+ line_rstripped = line.rstrip() -+ eol = line[len(line_rstripped):] -+ line_stripped = line_rstripped.strip() -+ indent = line_rstripped[:len(line_rstripped) - len(line_stripped)] -+ return LineComponents(full=line, indent=indent, line=line_stripped, eol=eol) -+ -+ -+class LeveDbPatchException(Exception): -+ pass -+ -+ -+if __name__ == "__main__": -+ main() -diff --git a/cmake/external/leveldb_patch_test.py b/cmake/external/leveldb_patch_test.py -new file mode 100644 -index 000000000..b1d62526b ---- /dev/null -+++ b/cmake/external/leveldb_patch_test.py -@@ -0,0 +1,328 @@ -+# Copyright 2022 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. -+ -+import leveldb_patch -+import pathlib -+import unittest -+ -+ -+class CMakeListsPatcherTest(unittest.TestCase): -+ -+ def setUp(self): -+ super().setUp() -+ self.sample_snappy_source_dir = pathlib.Path("a/b/snappy_source_dir") -+ self.sample_snappy_binary_dir = pathlib.Path("a/b/snappy_binary_dir") -+ -+ def test_snappy_detect_line_is_commented_and_replaced(self): -+ lines = ( -+ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ "MyCoolScript", -+ self.sample_snappy_source_dir, -+ self.sample_snappy_binary_dir, -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "# BEGIN: snappy_detect_line modification by MyCoolScript", -+ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ """set(HAVE_SNAPPY ON CACHE BOOL "")""", -+ "# END: snappy_detect_line modification by MyCoolScript", -+ ]) -+ -+ def test_snappy_detect_line_has_indent_and_eol_preserved(self): -+ lines = ( -+ """ check_library_exists(snappy snappy_compress "" HAVE_SNAPPY) \n""", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ "MyCoolScript", -+ self.sample_snappy_source_dir, -+ self.sample_snappy_binary_dir, -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "# BEGIN: snappy_detect_line modification by MyCoolScript \n", -+ """ # check_library_exists(snappy snappy_compress "" HAVE_SNAPPY) \n""", -+ """ set(HAVE_SNAPPY ON CACHE BOOL "") \n""", -+ "# END: snappy_detect_line modification by MyCoolScript \n", -+ ]) -+ -+ def test_snappy_detect_line_does_not_affect_surrounding_lines(self): -+ lines = ( -+ "aaa", -+ "bbb", -+ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ "ccc", -+ "ddd", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ "MyCoolScript", -+ self.sample_snappy_source_dir, -+ self.sample_snappy_binary_dir, -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "aaa", -+ "bbb", -+ "# BEGIN: snappy_detect_line modification by MyCoolScript", -+ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ """set(HAVE_SNAPPY ON CACHE BOOL "")""", -+ "# END: snappy_detect_line modification by MyCoolScript", -+ "ccc", -+ "ddd", -+ ]) -+ -+ def test_snappy_include_is_amended(self): -+ lines = ( -+ "target_include_directories(leveldb", -+ "PUBLIC", -+ "path1", -+ "path2", -+ ")", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "target_include_directories(leveldb", -+ "# BEGIN: leveldb_include_start modification by MyCoolSript", -+ "PRIVATE", -+ "a/b", -+ "c/d", -+ "# END: leveldb_include_start modification by MyCoolSript", -+ "PUBLIC", -+ "path1", -+ "path2", -+ ")", -+ ]) -+ -+ def test_snappy_include_lines_adopt_indenting_and_eol_convention(self): -+ lines = ( -+ "target_include_directories(leveldb\n", -+ " PUBLIC \n", -+ " path1 \n", -+ " path2 \n", -+ ")\n", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "target_include_directories(leveldb\n", -+ "# BEGIN: leveldb_include_start modification by MyCoolSript \n", -+ " PRIVATE \n", -+ " a/b \n", -+ " c/d \n", -+ "# END: leveldb_include_start modification by MyCoolSript \n", -+ " PUBLIC \n", -+ " path1 \n", -+ " path2 \n", -+ ")\n", -+ ]) -+ -+ def test_snappy_include_line_does_not_affect_surrounding_lines(self): -+ lines = ( -+ "aaa", -+ "bbb", -+ "target_include_directories(leveldb", -+ "PUBLIC", -+ "path1", -+ "path2", -+ ")", -+ "ccc", -+ "ddd", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "aaa", -+ "bbb", -+ "target_include_directories(leveldb", -+ "# BEGIN: leveldb_include_start modification by MyCoolSript", -+ "PRIVATE", -+ "a/b", -+ "c/d", -+ "# END: leveldb_include_start modification by MyCoolSript", -+ "PUBLIC", -+ "path1", -+ "path2", -+ ")", -+ "ccc", -+ "ddd", -+ ]) -+ -+ def test_leveldb_snappy_link_line_is_commented_and_replaced(self): -+ lines = ( -+ "target_link_libraries(leveldb snappy)", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", -+ "# target_link_libraries(leveldb snappy)", -+ "target_link_libraries(leveldb Snappy::Snappy)", -+ "# END: leveldb_snappy_link_line modification by MyCoolSript", -+ ]) -+ -+ def test_leveldb_snappy_link_line_has_indent_and_eol_preserved(self): -+ lines = ( -+ " target_link_libraries(leveldb snappy) \n", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript \n", -+ " # target_link_libraries(leveldb snappy) \n", -+ " target_link_libraries(leveldb Snappy::Snappy) \n", -+ "# END: leveldb_snappy_link_line modification by MyCoolSript \n", -+ ]) -+ -+ def test_leveldb_snappy_link_line_does_not_affect_surrounding_lines(self): -+ lines = ( -+ "aaa", -+ "bbb", -+ "target_link_libraries(leveldb snappy)", -+ "ccc", -+ "ddd", -+ ) -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "aaa", -+ "bbb", -+ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", -+ "# target_link_libraries(leveldb snappy)", -+ "target_link_libraries(leveldb Snappy::Snappy)", -+ "# END: leveldb_snappy_link_line modification by MyCoolSript", -+ "ccc", -+ "ddd", -+ ]) -+ -+ def test_all_patches_combined(self): -+ lines = ( -+ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ "target_include_directories(leveldb", -+ "PUBLIC", -+ "path1", -+ ")", -+ "target_link_libraries(leveldb snappy)", -+ ) -+ -+ patcher = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ patched_lines = tuple(patcher.patch()) -+ -+ self.assertSequenceEqual(patched_lines, [ -+ "# BEGIN: snappy_detect_line modification by MyCoolSript", -+ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", -+ """set(HAVE_SNAPPY ON CACHE BOOL "")""", -+ "# END: snappy_detect_line modification by MyCoolSript", -+ "target_include_directories(leveldb", -+ "# BEGIN: leveldb_include_start modification by MyCoolSript", -+ "PRIVATE", -+ "a/b", -+ "c/d", -+ "# END: leveldb_include_start modification by MyCoolSript", -+ "PUBLIC", -+ "path1", -+ ")", -+ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", -+ "# target_link_libraries(leveldb snappy)", -+ "target_link_libraries(leveldb Snappy::Snappy)", -+ "# END: leveldb_snappy_link_line modification by MyCoolSript", -+ ]) -+ -+ def test_idempotence(self): -+ lines = ( -+ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)\n""", -+ "target_include_directories(leveldb", -+ "PUBLIC", -+ "path1", -+ ")", -+ "target_link_libraries(leveldb snappy)", -+ ) -+ -+ patcher1 = leveldb_patch.CMakeListsPatcher( -+ lines, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ patched_lines1 = tuple(patcher1.patch()) -+ patcher2 = leveldb_patch.CMakeListsPatcher( -+ patched_lines1, -+ script_name="MyCoolSript", -+ snappy_source_dir=pathlib.Path("a/b"), -+ snappy_binary_dir=pathlib.Path("c/d"), -+ ) -+ patched_lines2 = tuple(patcher2.patch()) -+ -+ self.assertSequenceEqual(patched_lines1, patched_lines2) -+ -+ -+if __name__ == "__main__": -+ unittest.main() -diff --git a/cmake/external/snappy.cmake b/cmake/external/snappy.cmake -new file mode 100644 -index 000000000..9f25c03d0 ---- /dev/null -+++ b/cmake/external/snappy.cmake -@@ -0,0 +1,40 @@ -+# Copyright 2022 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. -+ -+include(ExternalProject) -+ -+if(TARGET snappy) -+ return() -+endif() -+ -+set(version 1.1.9) -+ -+ExternalProject_Add( -+ snappy -+ -+ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} -+ DOWNLOAD_NAME snappy-${version}.tar.gz -+ URL https://github.com/google/snappy/archive/refs/tags/${version}.tar.gz -+ URL_HASH SHA256=75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7 -+ -+ PREFIX ${PROJECT_BINARY_DIR} -+ -+ CONFIGURE_COMMAND "" -+ BUILD_COMMAND "" -+ INSTALL_COMMAND "" -+ TEST_COMMAND "" -+ PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/snappy.patch -+ -+ HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" -+) -diff --git a/cmake/external/snappy.patch b/cmake/external/snappy.patch -new file mode 100644 -index 000000000..28bfb0837 ---- /dev/null -+++ b/cmake/external/snappy.patch -@@ -0,0 +1,12 @@ -+diff -Naur snappy/snappy.cc snappy_patched/snappy.cc -+--- snappy/snappy.cc 2022-04-12 20:44:55.000000000 -0400 -++++ snappy_patched/snappy.cc 2022-04-12 20:47:05.000000000 -0400 -+@@ -1014,7 +1014,7 @@ -+ } -+ -+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE -+-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { -++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { -+ const uint8_t*& ip = *ip_p; -+ // This section is crucial for the throughput of the decompression loop. -+ // The latency of an iteration is fundamentally constrained by the From 13222be982a8a5aa48246523d8877b9f945e4a6c Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 20:20:35 -0400 Subject: [PATCH 02/93] firestore_patch.py: also copy the URL_HASH --- cmake/external/firestore_patch.py | 117 +++++----- cmake/external/firestore_patch_test.py | 297 +++++++++++++++++-------- cmake/external/leveldb.cmake | 1 + 3 files changed, 261 insertions(+), 154 deletions(-) diff --git a/cmake/external/firestore_patch.py b/cmake/external/firestore_patch.py index f25e46e1da..b5b50a258e 100644 --- a/cmake/external/firestore_patch.py +++ b/cmake/external/firestore_patch.py @@ -18,30 +18,29 @@ """ import argparse -import dataclasses import os import pathlib import re -from typing import Iterable, Sequence +from typing import List, Tuple VERSION_PATTERN = r"\s*set\s*\(\s*version\s+([^)\s]+)\s*\)\s*" VERSION_EXPR = re.compile(VERSION_PATTERN, re.IGNORECASE) +URL_HASH_PATTERN = r"\s*URL_HASH\s+([0-9a-zA-Z=]+)\s*" +URL_HASH_EXPR = re.compile(URL_HASH_PATTERN, re.IGNORECASE) def main() -> None: - args = parse_args() - leveldb_version = load_leveldb_version(args.leveldb_cmake_src_file) - set_leveldb_version(args.leveldb_cmake_dest_file, leveldb_version) + (src_file, dest_file) = parse_args() + leveldb_version = load_value(src_file, VERSION_EXPR) + url_hash = load_value(src_file, URL_HASH_EXPR) -@dataclasses.dataclass(frozen=True) -class ParsedArgs: - leveldb_cmake_src_file: pathlib.Path - leveldb_cmake_dest_file: pathlib.Path + set_value(dest_file, VERSION_EXPR, leveldb_version) + set_value(dest_file, URL_HASH_EXPR, url_hash) -def parse_args() -> ParsedArgs: +def parse_args() -> Tuple[pathlib.Path, pathlib.Path]: arg_parser = argparse.ArgumentParser() arg_parser.add_argument("--leveldb-version-from", required=True) arg_parser.add_argument("--leveldb-version-to") @@ -56,64 +55,68 @@ def parse_args() -> ParsedArgs: leveldb_cmake_dest_file = pathlib.Path.cwd() \ / "cmake" / "external" / "leveldb.cmake" - return ParsedArgs( - leveldb_cmake_src_file=leveldb_cmake_src_file, - leveldb_cmake_dest_file=leveldb_cmake_dest_file, - ) + return (leveldb_cmake_src_file, leveldb_cmake_dest_file) -def load_leveldb_version(cmake_file: pathlib.Path) -> str: - version = None - version_line = None - version_line_number = None +def load_value(file_: pathlib.Path, expr: re.Pattern) -> str: + value = None + value_line = None + value_line_number = None - with cmake_file.open("rt", encoding="utf8") as f: + with file_.open("rt", encoding="utf8") as f: for (line_number, line) in enumerate(f, start=1): - match = VERSION_EXPR.fullmatch(line) - if match: - if version is not None: - raise LevelDbVersionLineError( - f"Multiple lines matching regex {VERSION_EXPR.pattern} found in " - f"{cmake_file}: line {version_line_number}, {version_line.strip()} " - f"and line {line_number}, {line.strip()}") - version = match.group(1).strip() - version_line = line - version_line_number = line_number - - if version is None: - raise LevelDbVersionLineError( - f"No line matching regex {VERSION_EXPR.pattern} found in {cmake_file}") - - return version - - -def set_leveldb_version(cmake_file: pathlib.Path, version: str) -> str: - with cmake_file.open("rt", encoding="utf8") as f: + match = expr.fullmatch(line) + if not match: + continue + elif value is not None: + raise RegexMatchError( + f"Multiple lines matching regex {expr.pattern} found in " + f"{file_}: line {value_line_number}, {value_line.strip()} " + f"and line {line_number}, {line.strip()}") + + value = match.group(1).strip() + value_line = line + value_line_number = line_number + + if value is None: + raise RegexMatchError( + f"No line matching regex {expr.pattern} found in {file_}") + + return value + + +def set_value(file_: pathlib.Path, expr: re.Pattern, version: str) -> None: + with file_.open("rt", encoding="utf8") as f: lines = list(f) - version_lines_found = [] - for (i, line) in enumerate(lines): - match = VERSION_EXPR.fullmatch(line) - if match: - lines[i] = line[:match.start(1)] + version + line[match.end(1):] - version_lines_found.append(i) - - if len(version_lines_found) == 0: - raise LevelDbVersionLineError( - f"No line matching regex {VERSION_EXPR.pattern} found in {cmake_file}") - elif len(version_lines_found) > 1: - raise LevelDbVersionLineError( - f"Multiple lines matching regex {VERSION_EXPR.pattern} found in " - f"{cmake_file}: {', '.join(str(i+1) for i in version_lines_found)}") - - with cmake_file.open("wt", encoding="utf8") as f: + matching_line = None + matching_line_number = None + + for (line_number, line) in enumerate(lines, start=1): + match = expr.fullmatch(line) + if not match: + continue + elif matching_line is not None: + raise RegexMatchError( + f"Multiple lines matching regex {expr.pattern} found in " + f"{file_}: line {matching_line_number}, {matching_line.strip()} " + f"and line {line_number}, {line.strip()}") + + lines[line_number - 1] = line[:match.start(1)] + version + line[match.end(1):] + matching_line = line + matching_line_number = line_number + + if matching_line is None: + raise RegexMatchError( + f"No line matching regex {expr.pattern} found in {file_}") + + with file_.open("wt", encoding="utf8") as f: f.writelines(lines) -class LevelDbVersionLineError(Exception): +class RegexMatchError(Exception): pass - if __name__ == "__main__": main() diff --git a/cmake/external/firestore_patch_test.py b/cmake/external/firestore_patch_test.py index 3b289259f3..bf739be555 100644 --- a/cmake/external/firestore_patch_test.py +++ b/cmake/external/firestore_patch_test.py @@ -12,150 +12,253 @@ # See the License for the specific language governing permissions and # limitations under the License. -import firestore_patch +import os import pathlib +import re import shutil import tempfile +from typing import Iterable import unittest +import unittest.mock + +import firestore_patch + + +class TestUtilsMixin: + + def create_temp_file_with_lines(self, lines: Iterable[str]) -> pathlib.Path: + (handle, path_str) = tempfile.mkstemp() + os.close(handle) + path = pathlib.Path(path_str) + self.addCleanup(path.unlink, missing_ok=True) # pytype: disable=attribute-error + + with path.open("wt", encoding="utf8") as f: + for line in lines: + print(line, file=f) + + return path + + def create_temp_file_with_line(self, line: str) -> pathlib.Path: + return self.create_temp_file_with_lines([line]) + +class MainTest(TestUtilsMixin, unittest.TestCase): -class LoadLevelDbVersionTest(unittest.TestCase): + def test(self): + src_file = self.create_temp_file_with_lines([ + "aaa", + "bbb", + "set(version 1.2.3)", + "URL_HASH SHA256=abcdef", + "ccc", + "ddd", + ]) + dest_file = self.create_temp_file_with_lines([ + "aaa", + "bbb", + "set(version 4.5.6)", + "URL_HASH SHA256=ghijkl", + "ccc", + "ddd", + ]) + dest_file_contents_before = dest_file.read_text(encoding="utf8") + patcher = unittest.mock.patch.object( + firestore_patch, + "parse_args", + spec_set=True, + autospec=True, + return_value=(src_file, dest_file) + ) - def setUp(self): - super().setUp() - temp_dir = pathlib.Path(tempfile.mkdtemp()) - self.addCleanup(shutil.rmtree, temp_dir) - self.temp_file = temp_dir / "temp_file.txt" + with patcher: + firestore_patch.main() - def test_loads_correct_version(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("blah1", file=f) - print("set(version 1.23)", file=f) - print("blah2", file=f) + dest_file_contents_after = dest_file.read_text(encoding="utf8") + self.assertEqual( + dest_file_contents_after, + dest_file_contents_before + .replace("4.5.6", "1.2.3") + .replace("ghijkl", "abcdef") + ) - version = firestore_patch.load_leveldb_version(self.temp_file) - self.assertEqual(version, "1.23") +class VersionExprTest(TestUtilsMixin, unittest.TestCase): + + def test_matches_semantic_version(self): + path = self.create_temp_file_with_line("set(version 1.2.3)") + + value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) + + self.assertEqual(value, "1.2.3") + + def test_matches_sha1(self): + path = self.create_temp_file_with_line("set(version fd054fa01)") + + value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) + + self.assertEqual(value, "fd054fa01") def test_ignores_whitespace(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print(" set ( version 1.23 ) ", file=f) + path = self.create_temp_file_with_line(" set ( version 1.2.3 ) ") - version = firestore_patch.load_leveldb_version(self.temp_file) + value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - self.assertEqual(version, "1.23") + self.assertEqual(value, "1.2.3") def test_case_insensitive(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("SeT(vErSiOn 1.23)", file=f) + path = self.create_temp_file_with_line("sEt(vErSiOn 1.2.3)") - version = firestore_patch.load_leveldb_version(self.temp_file) + value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - self.assertEqual(version, "1.23") + self.assertEqual(value, "1.2.3") - def test_version_not_found_raises_error(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("aaa", file=f) - print("bbb", file=f) - with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: - firestore_patch.load_leveldb_version(self.temp_file) +class UrlHashExprTest(TestUtilsMixin, unittest.TestCase): - self.assertIn("no line matching", str(cm.exception).lower()) - self.assertIn(str(self.temp_file), str(cm.exception)) + def test_matches_sha256(self): + path = self.create_temp_file_with_line("URL_HASH SHA256=abc123def456") - def test_multiple_version_lines_found_raises_error(self): - with self.temp_file.open("wt", encoding="utf8") as f: - for i in range(100): - print(f"line {i+1}", file=f) - print("set(version aaa)", file=f) - print("set(version bbb)", file=f) + value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) - with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: - firestore_patch.load_leveldb_version(self.temp_file) + self.assertEqual(value, "SHA256=abc123def456") - self.assertIn("multiple lines matching", str(cm.exception).lower()) - self.assertIn(str(self.temp_file), str(cm.exception)) - self.assertIn("line 101", str(cm.exception)) - self.assertIn("line 102", str(cm.exception)) - self.assertIn("aaa", str(cm.exception)) - self.assertIn("bbb", str(cm.exception)) + def test_ignores_whitespace(self): + path = self.create_temp_file_with_line(" URL_HASH abc123def456 ") + + value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) + + self.assertEqual(value, "abc123def456") + + def test_case_insensitive(self): + path = self.create_temp_file_with_line("UrL_hAsH Sha256=abc123def456") + + value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) + + self.assertEqual(value, "Sha256=abc123def456") + + +class LoadValueTest(TestUtilsMixin, unittest.TestCase): + + def test_loads_the_value(self): + path = self.create_temp_file_with_line("aaa1234ccc") + expr = re.compile(r"\D+(\d+)\D+") + value = firestore_patch.load_value(path, expr) -class SetLevelDbVersionTest(unittest.TestCase): + self.assertEqual(value, "1234") - def setUp(self): - super().setUp() - temp_dir = pathlib.Path(tempfile.mkdtemp()) - self.addCleanup(shutil.rmtree, temp_dir) - self.temp_file = temp_dir / "temp_file.txt" + def test_loads_the_value_ignoring_non_matching_lines(self): + path = self.create_temp_file_with_lines([ + "blah", + "blah", + "aaa1234cccc", + "blah", + "blah", + ]) + expr = re.compile(r"\D+(\d+)\D+") - def test_saves_correct_version(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("set(version asdfasdf)", file=f) + value = firestore_patch.load_value(path, expr) - firestore_patch.set_leveldb_version(self.temp_file, "1.2.3") + self.assertEqual(value, "1234") - new_version = firestore_patch.load_leveldb_version(self.temp_file) - self.assertEqual(new_version, "1.2.3") + def test_raises_error_if_no_matching_line_found(self): + path = self.create_temp_file_with_lines([ + "blah", + "blah", + "blah", + "blah", + ]) + expr = re.compile(r"\D+(\d+)\D+") - def test_case_insensitivity(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("sEt(vErSiOn asdfasdf)", file=f) + with self.assertRaises(firestore_patch.RegexMatchError) as cm: + firestore_patch.load_value(path, expr) + + self.assertIn("no line matching", str(cm.exception).lower()) + self.assertIn(expr.pattern, str(cm.exception)) + self.assertIn(str(path), str(cm.exception)) + + def test_raises_error_if_multiple_matching_lines_found(self): + lines = ["blah"] * 100 + lines.append("aaa123bbb") + lines.append("ccc456ddd") + path = self.create_temp_file_with_lines(lines) + expr = re.compile(r"\D+(\d+)\D+") + + with self.assertRaises(firestore_patch.RegexMatchError) as cm: + firestore_patch.load_value(path, expr) + + self.assertIn("multiple lines matching", str(cm.exception).lower()) + self.assertIn(str(path), str(cm.exception)) + self.assertIn(expr.pattern, str(cm.exception)) + self.assertIn("line 101", str(cm.exception)) + self.assertIn("line 102", str(cm.exception)) + self.assertIn("123", str(cm.exception)) + self.assertIn("456", str(cm.exception)) - firestore_patch.set_leveldb_version(self.temp_file, "1.2.3") - new_version = firestore_patch.load_leveldb_version(self.temp_file) - self.assertEqual(new_version, "1.2.3") +class SaveValueTest(TestUtilsMixin, unittest.TestCase): - def test_leaves_whitespace_alone(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print(" set ( version 1.2.3.4 ) ", file=f) - temp_file_contents = self.temp_file.read_text(encoding="utf8") + def test_saves_the_value(self): + path = self.create_temp_file_with_line("aaa1234ccc") + expr = re.compile(r"\D+(\d+)\D+") - firestore_patch.set_leveldb_version(self.temp_file, "a.b.c.d") + firestore_patch.set_value(path, expr, "9876") - temp_file_contents_after = self.temp_file.read_text(encoding="utf8") - expected_temp_file_contents = temp_file_contents.replace("1.2.3.4", "a.b.c.d") - self.assertEqual(temp_file_contents_after, expected_temp_file_contents) + new_value = firestore_patch.load_value(path, expr) + self.assertEqual(new_value, "9876") - def test_does_not_touch_other_lines(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("blah1", file=f) - print("set(version 1.2.3.4)", file=f) - print("blah2", file=f) - temp_file_contents = self.temp_file.read_text(encoding="utf8") + def test_saves_the_value_ignoring_non_matching_lines(self): + path = self.create_temp_file_with_lines([ + "blah", + "blah", + "aaa1234cccc", + "blah", + "blah", + ]) + expr = re.compile(r"\D+(\d+)\D+") + file_contents_before = path.read_text(encoding="utf8") - firestore_patch.set_leveldb_version(self.temp_file, "a.b.c.d") + firestore_patch.set_value(path, expr, "9876") - temp_file_contents_after = self.temp_file.read_text(encoding="utf8") - expected_temp_file_contents = temp_file_contents.replace("1.2.3.4", "a.b.c.d") - self.assertEqual(temp_file_contents_after, expected_temp_file_contents) + file_contents_after = path.read_text(encoding="utf8") + self.assertEqual( + file_contents_after, + file_contents_before.replace("1234", "9876"), + ) - def test_version_not_found_raises_error(self): - with self.temp_file.open("wt", encoding="utf8") as f: - print("aaa", file=f) - print("bbb", file=f) + def test_raises_error_if_no_matching_line_found(self): + path = self.create_temp_file_with_lines([ + "blah", + "blah", + "blah", + "blah", + ]) + expr = re.compile(r"\D+(\d+)\D+") - with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: - firestore_patch.set_leveldb_version(self.temp_file, "a.b.c") + with self.assertRaises(firestore_patch.RegexMatchError) as cm: + firestore_patch.set_value(path, expr, "") self.assertIn("no line matching", str(cm.exception).lower()) - self.assertIn(str(self.temp_file), str(cm.exception)) + self.assertIn(expr.pattern, str(cm.exception)) + self.assertIn(str(path), str(cm.exception)) - def test_multiple_version_lines_found_raises_error(self): - with self.temp_file.open("wt", encoding="utf8") as f: - for i in range(100): - print(f"line {i+1}", file=f) - print("set(version aaa)", file=f) - print("set(version bbb)", file=f) + def test_raises_error_if_multiple_matching_lines_found(self): + lines = ["blah"] * 100 + lines.append("aaa123bbb") + lines.append("ccc456ddd") + path = self.create_temp_file_with_lines(lines) + expr = re.compile(r"\D+(\d+)\D+") - with self.assertRaises(firestore_patch.LevelDbVersionLineError) as cm: - firestore_patch.set_leveldb_version(self.temp_file, "a.b.c") + with self.assertRaises(firestore_patch.RegexMatchError) as cm: + firestore_patch.set_value(path, expr, "") self.assertIn("multiple lines matching", str(cm.exception).lower()) - self.assertIn(str(self.temp_file), str(cm.exception)) - self.assertIn("101, 102", str(cm.exception)) + self.assertIn(str(path), str(cm.exception)) + self.assertIn(expr.pattern, str(cm.exception)) + self.assertIn("line 101", str(cm.exception)) + self.assertIn("line 102", str(cm.exception)) + self.assertIn("123", str(cm.exception)) + self.assertIn("456", str(cm.exception)) if __name__ == "__main__": diff --git a/cmake/external/leveldb.cmake b/cmake/external/leveldb.cmake index 18970659a4..a8a154bb4e 100644 --- a/cmake/external/leveldb.cmake +++ b/cmake/external/leveldb.cmake @@ -26,6 +26,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} DOWNLOAD_NAME leveldb-${version}.tar.gz URL https://github.com/google/leveldb/archive/${version}.tar.gz + URL_HASH SHA256=9a37f8a6174f09bd622bc723b55881dc541cd50747cbd08831c2a82d620f6d76 PREFIX ${PROJECT_BINARY_DIR} From 47a256270f19aab8d666b32acdc5efeae3bba7d7 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 20:38:27 -0400 Subject: [PATCH 03/93] query_main.h: fix build error due to Filter being renamed to FieldFilter. --- firestore/src/main/query_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/src/main/query_main.h b/firestore/src/main/query_main.h index bc430aae9b..9993777c8a 100644 --- a/firestore/src/main/query_main.h +++ b/firestore/src/main/query_main.h @@ -182,7 +182,7 @@ class QueryInternal { kEndAt, }; - using Operator = core::Filter::Operator; + using Operator = core::FieldFilter::Operator; Query Where(const FieldPath& field, Operator op, From fa99004bb56f2d0d9780902d23df0bc864135b46 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 21:08:40 -0400 Subject: [PATCH 04/93] user_data_converter_main.cc: fix build error when calling NullValue(), which now just returns a google_firestore_v1_Value instead of a Message --- firestore/src/main/user_data_converter_main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/src/main/user_data_converter_main.cc b/firestore/src/main/user_data_converter_main.cc index a87ae70c42..0de008dcce 100644 --- a/firestore/src/main/user_data_converter_main.cc +++ b/firestore/src/main/user_data_converter_main.cc @@ -315,7 +315,7 @@ nanopb::Message UserDataConverter::ParseArray( for (size_t i = 0; i != input.size(); ++i) { auto parsed = ParseData(input[i], context.ChildContext(i)); if (!parsed) { - parsed = NullValue(); + parsed = Message(NullValue()); } result->array_value.values[i] = *parsed->release(); } From 555a406b8da2bae6efb207a59ee6c78c32137aa2 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 21:09:53 -0400 Subject: [PATCH 05/93] Merge in https://github.com/firebase/firebase-cpp-sdk/pull/896 (leveldb_snappy_test.cc: run the test on iOS as well, and other improvements) --- .../integration_test_internal/CMakeLists.txt | 7 + .../src/leveldb_snappy_test.cc | 144 ++++++++++++------ 2 files changed, 106 insertions(+), 45 deletions(-) diff --git a/firestore/integration_test_internal/CMakeLists.txt b/firestore/integration_test_internal/CMakeLists.txt index d9d7d20849..96c76bd824 100644 --- a/firestore/integration_test_internal/CMakeLists.txt +++ b/firestore/integration_test_internal/CMakeLists.txt @@ -333,6 +333,13 @@ else() ${FIREBASE_INTEGRATION_TEST_SRCS} ) + # Set a preprocessor define so that tests can distinguish between having been + # built by Xcode vs. cmake. + target_compile_definitions(${integration_test_target_name} + PRIVATE + FIREBASE_TESTS_BUILT_BY_CMAKE + ) + if(APPLE) set(ADDITIONAL_LIBS gssapi_krb5 diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index 33f2247cd8..4d82878691 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include "Firestore/core/src/util/filesystem.h" #include "Firestore/core/src/util/path.h" -#include "firebase_test_framework.h" #include "gtest/gtest.h" #include "leveldb/db.h" @@ -49,36 +49,109 @@ using ::firebase::firestore::util::Path; // with reason "corruption". Path CreateLevelDbDatabaseThatUsesSnappyCompression(); -// This test ensures that we don't accidentally regress having added in Snappy -// compression support (https://github.com/firebase/firebase-ios-sdk/pull/9596). -TEST(LevelDbSnappy, LevelDbHasSnappySupportCompiledIn) { - // Do not run this test on iOS because LevelDb in iOS does not support Snappy. - SKIP_TEST_ON_IOS; +// Creates and opens a LevelDb database that contains at least one block that +// is compressed with Snappy compression, then iterates over it, invoking the +// given callback with the status at each point in the iteration. Once the +// callback is invoked with a `status` where `status.ok()` is not true, then +// iteration will stop and the callback will not be invoked again. +void IterateOverLevelDbDatabaseThatUsesSnappyCompression( + std::function); - Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); - if (HasFatalFailure()) return; +#if FIREBASE_TESTS_BUILT_BY_CMAKE - leveldb::Options options; - options.create_if_missing = false; +// Ensure that LevelDb is compiled with Snappy compression support. +// See https://github.com/firebase/firebase-ios-sdk/pull/9596 for details. +TEST(LevelDbSnappy, LevelDbSupportsSnappy) { + IterateOverLevelDbDatabaseThatUsesSnappyCompression( + [](const leveldb::Status& status) { + ASSERT_TRUE(status.ok()) << ConvertStatus(status); + }); +} + +#else // FIREBASE_TESTS_BUILT_BY_CMAKE + +// Ensure that LevelDb is NOT compiled with Snappy compression support. +TEST(LevelDbSnappy, LevelDbDoesNotSupportSnappy) { + bool got_failed_status = false; + IterateOverLevelDbDatabaseThatUsesSnappyCompression( + [&](const leveldb::Status& status) { + if (!status.ok()) { + got_failed_status = true; + ASSERT_TRUE(status.IsCorruption()) << ConvertStatus(status); + } + }); + if (!HasFailure()) { + ASSERT_TRUE(got_failed_status) + << "Reading a Snappy-compressed LevelDb database was successful; " + "however, it should NOT have been successful " + "since Snappy support is expected to NOT be available."; + } +} + +#endif // FIREBASE_TESTS_BUILT_BY_CMAKE + +void IterateOverLevelDbDatabaseThatUsesSnappyCompression( + std::function callback) { std::unique_ptr db; { + Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); + if (leveldb_path.empty()) { + return; + } + + leveldb::Options options; + options.create_if_missing = false; + leveldb::DB* db_ptr; leveldb::Status status = leveldb::DB::Open(options, leveldb_path.ToUtf8String(), &db_ptr); - ASSERT_TRUE(status.ok()); + + ASSERT_TRUE(status.ok()) + << "Opening LevelDb database " << leveldb_path.ToUtf8String() + << " failed: " << ConvertStatus(status); + db.reset(db_ptr); } - // One of the assertions below will fail when LevelDb attempts to read a block - // that is compressed with Snappy and Snappy compression support is not - // compiled in. std::unique_ptr it( db->NewIterator(leveldb::ReadOptions())); for (it->SeekToFirst(); it->Valid(); it->Next()) { - ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); + callback(it->status()); + if (!it->status().ok()) { + return; + } + } + + // Invoke the callback on the final status. + callback(it->status()); +} + +template +void WriteFile(const Path& dir, + const std::string& file_name, + const T& data_array) { + Filesystem* fs = Filesystem::Default(); + { + auto status = fs->RecursivelyCreateDir(dir); + if (!status.ok()) { + FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" + << status.error_message() << ")"; + } + } + + Path file = dir.AppendUtf8(file_name); + std::ofstream out_file(file.native_value(), std::ios::binary); + if (!out_file) { + FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); + } + + out_file.write(reinterpret_cast(data_array.data()), + data_array.size()); + out_file.close(); + if (!out_file) { + FAIL() << "Writing to file failed: " << file.ToUtf8String(); } - ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); } const std::array LevelDbSnappyFile_000005_ldb{ @@ -196,47 +269,27 @@ const std::array LevelDbSnappyFile_MANIFEST_000084{ 0x04, 0x0D, }; -template -void WriteFile(const Path& dir, - const std::string& file_name, - const T& data_array) { - Filesystem* fs = Filesystem::Default(); - { - auto status = fs->RecursivelyCreateDir(dir); - if (!status.ok()) { - FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" - << status.error_message() << ")"; - } - } - - Path file = dir.AppendUtf8(file_name); - std::ofstream out_file(file.native_value(), std::ios::binary); - if (!out_file) { - FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); - } - - out_file.write(reinterpret_cast(data_array.data()), - data_array.size()); - out_file.close(); - if (!out_file) { - FAIL() << "Writing to file failed: " << file.ToUtf8String(); - } -} - Path LevelDbDir() { Filesystem* fs = Filesystem::Default(); - Path dir = fs->TempDir().AppendUtf8("PersistenceTesting"); + Path dir = fs->TempDir().AppendUtf8("LevelDbSnappyTest"); // Delete the directory first to ensure isolation between runs. auto status = fs->RecursivelyRemove(dir); - EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in dir " + EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in directory " << dir.ToUtf8String() << ": " << status.ToString(); + if (!status.ok()) { + return {}; + } return dir; } Path CreateLevelDbDatabaseThatUsesSnappyCompression() { Path leveldb_dir = LevelDbDir(); + if (leveldb_dir.empty()) { + return {}; + } + WriteFile(leveldb_dir, "000005.ldb", LevelDbSnappyFile_000005_ldb); WriteFile(leveldb_dir, "000017.ldb", LevelDbSnappyFile_000017_ldb); WriteFile(leveldb_dir, "000085.ldb", LevelDbSnappyFile_000085_ldb); @@ -244,6 +297,7 @@ Path CreateLevelDbDatabaseThatUsesSnappyCompression() { WriteFile(leveldb_dir, "LOG.old", LevelDbSnappyFile_LOG_old); WriteFile(leveldb_dir, "LOG", LevelDbSnappyFile_LOG); WriteFile(leveldb_dir, "MANIFEST-000084", LevelDbSnappyFile_MANIFEST_000084); + return leveldb_dir; } From 2564279509f7bbaddbf992a37aadcddb904780e7 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 21:19:01 -0400 Subject: [PATCH 06/93] leveldb_snappy_test.cc: re-use the test from the iOS SDK instead of re-writing it. --- .../src/leveldb_snappy_test.cc | 287 +----------------- 1 file changed, 5 insertions(+), 282 deletions(-) diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index 4d82878691..b5d88b74f3 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -20,285 +20,8 @@ #error "This test should not be included in Android." #endif -#include -#include -#include -#include -#include -#include - -#include "Firestore/core/src/local/leveldb_util.h" -#include "Firestore/core/src/util/filesystem.h" -#include "Firestore/core/src/util/path.h" - -#include "gtest/gtest.h" -#include "leveldb/db.h" - -// TODO(dconeybe) Reference this test in the iOS SDK instead of making a -// copy of it here in the C++ SDK. - -namespace { - -using ::firebase::firestore::local::ConvertStatus; -using ::firebase::firestore::util::Filesystem; -using ::firebase::firestore::util::Path; - -// Creates a LevelDb database that uses Snappy compression for at least one of -// its blocks. Attempting to iterate over this database using a LevelDb library -// that does not have Snappy compression compiled in will return a failed status -// with reason "corruption". -Path CreateLevelDbDatabaseThatUsesSnappyCompression(); - -// Creates and opens a LevelDb database that contains at least one block that -// is compressed with Snappy compression, then iterates over it, invoking the -// given callback with the status at each point in the iteration. Once the -// callback is invoked with a `status` where `status.ok()` is not true, then -// iteration will stop and the callback will not be invoked again. -void IterateOverLevelDbDatabaseThatUsesSnappyCompression( - std::function); - -#if FIREBASE_TESTS_BUILT_BY_CMAKE - -// Ensure that LevelDb is compiled with Snappy compression support. -// See https://github.com/firebase/firebase-ios-sdk/pull/9596 for details. -TEST(LevelDbSnappy, LevelDbSupportsSnappy) { - IterateOverLevelDbDatabaseThatUsesSnappyCompression( - [](const leveldb::Status& status) { - ASSERT_TRUE(status.ok()) << ConvertStatus(status); - }); -} - -#else // FIREBASE_TESTS_BUILT_BY_CMAKE - -// Ensure that LevelDb is NOT compiled with Snappy compression support. -TEST(LevelDbSnappy, LevelDbDoesNotSupportSnappy) { - bool got_failed_status = false; - IterateOverLevelDbDatabaseThatUsesSnappyCompression( - [&](const leveldb::Status& status) { - if (!status.ok()) { - got_failed_status = true; - ASSERT_TRUE(status.IsCorruption()) << ConvertStatus(status); - } - }); - - if (!HasFailure()) { - ASSERT_TRUE(got_failed_status) - << "Reading a Snappy-compressed LevelDb database was successful; " - "however, it should NOT have been successful " - "since Snappy support is expected to NOT be available."; - } -} - -#endif // FIREBASE_TESTS_BUILT_BY_CMAKE - -void IterateOverLevelDbDatabaseThatUsesSnappyCompression( - std::function callback) { - std::unique_ptr db; - { - Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); - if (leveldb_path.empty()) { - return; - } - - leveldb::Options options; - options.create_if_missing = false; - - leveldb::DB* db_ptr; - leveldb::Status status = - leveldb::DB::Open(options, leveldb_path.ToUtf8String(), &db_ptr); - - ASSERT_TRUE(status.ok()) - << "Opening LevelDb database " << leveldb_path.ToUtf8String() - << " failed: " << ConvertStatus(status); - - db.reset(db_ptr); - } - - std::unique_ptr it( - db->NewIterator(leveldb::ReadOptions())); - for (it->SeekToFirst(); it->Valid(); it->Next()) { - callback(it->status()); - if (!it->status().ok()) { - return; - } - } - - // Invoke the callback on the final status. - callback(it->status()); -} - -template -void WriteFile(const Path& dir, - const std::string& file_name, - const T& data_array) { - Filesystem* fs = Filesystem::Default(); - { - auto status = fs->RecursivelyCreateDir(dir); - if (!status.ok()) { - FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" - << status.error_message() << ")"; - } - } - - Path file = dir.AppendUtf8(file_name); - std::ofstream out_file(file.native_value(), std::ios::binary); - if (!out_file) { - FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); - } - - out_file.write(reinterpret_cast(data_array.data()), - data_array.size()); - out_file.close(); - if (!out_file) { - FAIL() << "Writing to file failed: " << file.ToUtf8String(); - } -} - -const std::array LevelDbSnappyFile_000005_ldb{ - 0x84, 0x03, 0x80, 0x00, 0x42, 0x00, 0x85, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5F, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8B, 0x43, 0x6F, - 0x6C, 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, 0x6C, 0x42, - 0x01, 0x0A, 0x68, 0x42, 0x7C, 0x66, 0x3A, 0x7C, 0x6F, 0x62, 0x3A, 0x5F, - 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x5F, 0x61, 0x73, 0x63, 0x00, 0x01, - 0x8C, 0x82, 0x80, 0x01, 0x07, 0x00, 0x05, 0x01, 0x08, 0x01, 0x13, 0x50, - 0x11, 0x3E, 0x01, 0x16, 0x00, 0x0A, 0x05, 0x15, 0xF0, 0x3C, 0x00, 0x08, - 0x02, 0x20, 0x05, 0x32, 0x4A, 0x12, 0x48, 0x70, 0x72, 0x6F, 0x6A, 0x65, - 0x63, 0x74, 0x73, 0x2F, 0x54, 0x65, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6D, - 0x69, 0x6E, 0x61, 0x74, 0x65, 0x2F, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x73, 0x2F, 0x28, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, - 0x29, 0x2F, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x01, - 0x7B, 0x3E, 0x85, 0x00, 0x0C, 0x0D, 0x07, 0x50, 0x08, 0x15, 0x5A, 0x00, - 0x03, 0xFE, 0x5A, 0x00, 0x2E, 0x5A, 0x00, 0x38, 0x07, 0x12, 0x06, 0x5F, - 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x00, 0x01, 0x80, 0x01, 0x0B, 0x11, - 0x65, 0x1C, 0x10, 0x05, 0x20, 0x01, 0x12, 0x07, 0x06, 0x09, 0x15, 0x10, - 0x00, 0x03, 0x01, 0x10, 0x04, 0x00, 0x01, 0x09, 0x10, 0x24, 0x01, 0x12, - 0x01, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x01, 0x35, 0x00, 0x06, - 0x09, 0x15, 0x10, 0x37, 0x0C, 0x07, 0x01, 0x05, 0x09, 0x0B, 0x10, 0x36, - 0x0C, 0x07, 0x01, 0x04, 0x09, 0x0B, 0x10, 0x35, 0x0C, 0x07, 0x01, 0x03, - 0x09, 0x0B, 0x4C, 0x34, 0x0C, 0x07, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x2C, 0x6E, 0xE0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0xC0, 0xF2, 0xA1, 0xB0, 0x00, 0x09, 0x03, 0x86, 0x01, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x87, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC2, 0x94, 0x06, 0x8C, 0x02, 0x08, - 0x99, 0x02, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x57, 0xFB, 0x80, 0x8B, 0x24, 0x75, 0x47, 0xDB, -}; -const std::array LevelDbSnappyFile_000017_ldb{ - 0x00, 0x14, 0x50, 0x85, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, - 0x8C, 0x82, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x02, 0x20, 0x0A, 0x32, 0x4A, 0x12, 0x48, 0x70, 0x72, 0x6F, 0x6A, 0x65, - 0x63, 0x74, 0x73, 0x2F, 0x54, 0x65, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6D, - 0x69, 0x6E, 0x61, 0x74, 0x65, 0x2F, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x73, 0x2F, 0x28, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, - 0x29, 0x2F, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x2F, - 0x43, 0x6F, 0x6C, 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, - 0x6C, 0x42, 0x2F, 0x44, 0x6F, 0x63, 0x42, 0x07, 0x12, 0x06, 0x5F, 0x67, - 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x00, 0x01, 0x80, 0x01, 0x0D, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x10, 0x0A, 0x20, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xCD, 0xE0, 0x39, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF2, 0xA1, 0xB0, - 0x00, 0x09, 0x03, 0x86, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x8A, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0xE4, 0xA7, 0x7E, 0x74, 0x8F, 0x01, 0x08, 0x9C, 0x01, 0x17, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xFB, 0x80, 0x8B, - 0x24, 0x75, 0x47, 0xDB, -}; -const std::array LevelDbSnappyFile_000085_ldb{}; -const std::array LevelDbSnappyFile_CURRENT{ - 0x4D, 0x41, 0x4E, 0x49, 0x46, 0x45, 0x53, 0x54, - 0x2D, 0x30, 0x30, 0x30, 0x30, 0x38, 0x34, 0x0A, -}; -const std::array LevelDbSnappyFile_LOG_old{ - 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, 0x31, - 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x32, 0x35, 0x37, 0x32, - 0x35, 0x31, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, 0x33, - 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x52, 0x65, 0x63, 0x6F, 0x76, 0x65, - 0x72, 0x69, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x67, 0x20, 0x23, 0x38, 0x31, - 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, - 0x31, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x33, 0x30, 0x34, - 0x35, 0x35, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, - 0x33, 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, - 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x33, 0x20, 0x23, 0x38, 0x30, - 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, - 0x31, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x33, 0x30, 0x35, - 0x30, 0x36, 0x34, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, - 0x33, 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, - 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x30, 0x20, 0x23, 0x38, 0x31, - 0x0A, -}; -const std::array LevelDbSnappyFile_LOG{ - 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, 0x31, - 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x34, 0x39, 0x33, 0x31, - 0x34, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, 0x32, - 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x52, 0x65, 0x63, 0x6F, 0x76, 0x65, - 0x72, 0x69, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x67, 0x20, 0x23, 0x38, 0x33, - 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, - 0x31, 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x35, 0x33, 0x34, - 0x37, 0x34, 0x35, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, - 0x32, 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, - 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x33, 0x20, 0x23, 0x38, 0x32, - 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, - 0x31, 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x35, 0x33, 0x35, - 0x32, 0x34, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, - 0x32, 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, - 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x30, 0x20, 0x23, 0x38, 0x33, - 0x0A, -}; -const std::array LevelDbSnappyFile_MANIFEST_000084{ - 0x45, 0x63, 0x9F, 0xDD, 0xAC, 0x00, 0x01, 0x01, 0x1A, 0x6C, 0x65, 0x76, - 0x65, 0x6C, 0x64, 0x62, 0x2E, 0x42, 0x79, 0x74, 0x65, 0x77, 0x69, 0x73, - 0x65, 0x43, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6F, 0x72, 0x07, - 0x00, 0x05, 0xE5, 0x02, 0x42, 0x85, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5F, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8B, 0x43, 0x6F, 0x6C, - 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, 0x6C, 0x42, 0x2F, - 0x44, 0x6F, 0x63, 0x42, 0x7C, 0x66, 0x3A, 0x7C, 0x6F, 0x62, 0x3A, 0x5F, - 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x5F, 0x61, 0x73, 0x63, 0x00, 0x01, - 0x8C, 0x82, 0x80, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x85, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x00, 0x01, 0x80, 0x01, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x11, 0xE8, 0x01, - 0x14, 0x85, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8C, 0x82, - 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x85, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x5F, 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, - 0x00, 0x01, 0x80, 0x01, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB1, - 0x03, 0xAC, 0xBA, 0x08, 0x00, 0x01, 0x02, 0x55, 0x09, 0x00, 0x03, 0x56, - 0x04, 0x0D, -}; - -Path LevelDbDir() { - Filesystem* fs = Filesystem::Default(); - Path dir = fs->TempDir().AppendUtf8("LevelDbSnappyTest"); - - // Delete the directory first to ensure isolation between runs. - auto status = fs->RecursivelyRemove(dir); - EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in directory " - << dir.ToUtf8String() << ": " << status.ToString(); - if (!status.ok()) { - return {}; - } - - return dir; -} - -Path CreateLevelDbDatabaseThatUsesSnappyCompression() { - Path leveldb_dir = LevelDbDir(); - if (leveldb_dir.empty()) { - return {}; - } - - WriteFile(leveldb_dir, "000005.ldb", LevelDbSnappyFile_000005_ldb); - WriteFile(leveldb_dir, "000017.ldb", LevelDbSnappyFile_000017_ldb); - WriteFile(leveldb_dir, "000085.ldb", LevelDbSnappyFile_000085_ldb); - WriteFile(leveldb_dir, "CURRENT", LevelDbSnappyFile_CURRENT); - WriteFile(leveldb_dir, "LOG.old", LevelDbSnappyFile_LOG_old); - WriteFile(leveldb_dir, "LOG", LevelDbSnappyFile_LOG); - WriteFile(leveldb_dir, "MANIFEST-000084", LevelDbSnappyFile_MANIFEST_000084); - - return leveldb_dir; -} - -} // namespace +// Just re-use the unit test from the iOS SDK. +// TODO(dconeybe) Import ALL the unit tests from the iOS SDK by adding them +// to the CMakeLists.txt in the parent directory of this file. That way we can +// run all of the tests from the iOS SDK on each platform targeted by this repo. +#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" \ No newline at end of file From 19e0b72ff9ecede2cca27c2365b9d49c07b375d7 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 21:27:49 -0400 Subject: [PATCH 07/93] leveldb_snappy_test.cc: add a newline at the end of the file. --- firestore/integration_test_internal/src/leveldb_snappy_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index b5d88b74f3..781481b763 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -24,4 +24,4 @@ // TODO(dconeybe) Import ALL the unit tests from the iOS SDK by adding them // to the CMakeLists.txt in the parent directory of this file. That way we can // run all of the tests from the iOS SDK on each platform targeted by this repo. -#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" \ No newline at end of file +#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" From 16605a9911b97bc51f85b074d4d601ecc2339bce Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 14 Apr 2022 22:12:07 -0400 Subject: [PATCH 08/93] query_main.h: add missing #include "Firestore/core/src/core/field_filter.h" --- firestore/src/main/query_main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/firestore/src/main/query_main.h b/firestore/src/main/query_main.h index 9993777c8a..17d13d8dfd 100644 --- a/firestore/src/main/query_main.h +++ b/firestore/src/main/query_main.h @@ -23,6 +23,7 @@ #include "Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h" #include "Firestore/core/src/api/query_core.h" #include "Firestore/core/src/core/bound.h" +#include "Firestore/core/src/core/field_filter.h" #include "Firestore/core/src/core/order_by.h" #include "Firestore/core/src/core/query.h" #include "Firestore/core/src/nanopb/message.h" From 4e823e1ac09368d01530e4511fa29080679bda3f Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 00:25:36 -0400 Subject: [PATCH 09/93] Set the FIRESTORE_INCLUDE_OBJC cmake cache var to NO to avoid building Objective-C parts of the iOS SDK This fixes the following build error: ``` FIRFirestore.h:147:20: error: unknown attribute 'swift_async' ignored [-Werror,-Wunknown-attributes] __attribute__((swift_async(none))); // Disable async import due to #9426. ^ 1 error generated. ``` which was introduced by https://github.com/firebase/firebase-ios-sdk/pull/9502 --- CMakeLists.txt | 4 ++++ cmake/external/firestore.cmake | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa12462c8b..6ca6fa75b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,6 +215,10 @@ if(FIREBASE_INCLUDE_FIRESTORE AND DESKTOP) set(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD ON) endif() +# Disable compiling the Objective-C (and Swift) stuff from the +# firebase-ios-sdk since it's not needed and can sometimes fail to build. +set(FIRESTORE_INCLUDE_OBJC NO) + if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD) # Quote meta characters in ${CMAKE_CURRENT_LIST_DIR} so we can # match it in a regex. diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index af34fe9a0e..55d8268270 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -24,7 +24,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 582b384c99a5dd24331161d436fdb6fd088fa833 + GIT_TAG d57360f1bf2dd7ecb85a768e8912d0045b00b88d GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} From 56553d996678430e756fa2eed6b469aaa8baf299 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 01:01:04 -0400 Subject: [PATCH 10/93] external/pip_requirements.txt: add six This is an attempt to fix the following build error: ``` Traceback (most recent call last): File "Firestore/Protos/tmphmjWeu.py", line 25, in import nanopb_generator as nanopb File "nanopb/generator/nanopb_generator.py", line 25, in import google.protobuf.text_format as text_format File "protobuf/python/google/protobuf/text_format.py", line 51, in import six ImportError: No module named six ``` e.g. https://github.com/firebase/firebase-cpp-sdk/runs/6034310890 --- external/pip_requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/external/pip_requirements.txt b/external/pip_requirements.txt index 5aaa75d727..946e204ddd 100644 --- a/external/pip_requirements.txt +++ b/external/pip_requirements.txt @@ -1,2 +1,3 @@ absl-py protobuf +six From c6346fd6c2153d3f04fb35b6da5192a2d70938b2 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 10:11:16 -0400 Subject: [PATCH 11/93] Improve FIREBASE_PYTHON_EXECUTABLE cmake cache var and make its usage ubiquitous --- CMakeLists.txt | 17 +++++++++++++++-- cmake/external/firestore.cmake | 3 +-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ca6fa75b8..8fd36b37ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,8 +86,21 @@ if (NOT FIREBASE_ANDROID_STL STREQUAL "") set(ANDROID_STL ${FIREBASE_ANDROID_STL}) endif() -set(FIREBASE_PYTHON_EXECUTABLE "python" CACHE FILEPATH - "The Python interpreter to use, such as one from a venv") +# Find a Python interpreter using the best available mechanism. +if(${CMAKE_VERSION} VERSION_LESS "3.12") + include(FindPythonInterp) + set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") +else() + find_package(Python3 COMPONENTS Interpreter) + set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") +endif() + +set( + FIREBASE_PYTHON_EXECUTABLE + "${DEFAULT_FIREBASE_PYTHON_EXECUTABLE}" + CACHE FILEPATH + "The Python interpreter to use" +) set(FIREBASE_XCODE_TARGET_FORMAT "frameworks" CACHE STRING "Format to output, 'frameworks' or 'libraries'") diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 55d8268270..5c1e2b82a5 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,7 +13,6 @@ # limitations under the License. include(ExternalProject) -include(FindPythonInterp) if(TARGET firestore) return() @@ -33,6 +32,6 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + PATCH_COMMAND ${FIREBASE_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) From 5a8038d173167ce8f286d516c798e5d77b03e2aa Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 10:15:16 -0400 Subject: [PATCH 12/93] firestore.cmake: bump pinned commit --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 5c1e2b82a5..e9e700f3f0 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -23,7 +23,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG d57360f1bf2dd7ecb85a768e8912d0045b00b88d + GIT_TAG 3c718c3982a9c5e482a37213c8d8faf6a92ce8aa GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} From b0ff4e87d1b95cc386050a72fa12dc41cfb596be Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 10:15:30 -0400 Subject: [PATCH 13/93] Revert "external/pip_requirements.txt: add six" since it didn't fix the problem. This reverts commit 56553d996678430e756fa2eed6b469aaa8baf299. --- external/pip_requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/external/pip_requirements.txt b/external/pip_requirements.txt index 946e204ddd..5aaa75d727 100644 --- a/external/pip_requirements.txt +++ b/external/pip_requirements.txt @@ -1,3 +1,2 @@ absl-py protobuf -six From 05efff1a821b195667dcc14c6ece844fe3914de3 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 10:19:18 -0400 Subject: [PATCH 14/93] firestore.cmake: fix pinned commit --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index e9e700f3f0..e934eda75c 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -23,7 +23,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 3c718c3982a9c5e482a37213c8d8faf6a92ce8aa + GIT_TAG 0ed860a0360735c28a26aad9cbe899695009a236 GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} From 48a76809a2697aa6f79058e5d6394e31e5576613 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 17:29:14 -0400 Subject: [PATCH 15/93] Revert "Improve FIREBASE_PYTHON_EXECUTABLE cmake cache var and make its usage ubiquitous" It seemed to cause problems with the build. There is a better way in the iOS SDK anyways. This reverts commit c6346fd6c2153d3f04fb35b6da5192a2d70938b2. --- CMakeLists.txt | 17 ++--------------- cmake/external/firestore.cmake | 3 ++- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fd36b37ee..6ca6fa75b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,21 +86,8 @@ if (NOT FIREBASE_ANDROID_STL STREQUAL "") set(ANDROID_STL ${FIREBASE_ANDROID_STL}) endif() -# Find a Python interpreter using the best available mechanism. -if(${CMAKE_VERSION} VERSION_LESS "3.12") - include(FindPythonInterp) - set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") -else() - find_package(Python3 COMPONENTS Interpreter) - set(DEFAULT_FIREBASE_PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") -endif() - -set( - FIREBASE_PYTHON_EXECUTABLE - "${DEFAULT_FIREBASE_PYTHON_EXECUTABLE}" - CACHE FILEPATH - "The Python interpreter to use" -) +set(FIREBASE_PYTHON_EXECUTABLE "python" CACHE FILEPATH + "The Python interpreter to use, such as one from a venv") set(FIREBASE_XCODE_TARGET_FORMAT "frameworks" CACHE STRING "Format to output, 'frameworks' or 'libraries'") diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index e934eda75c..530f78b4e1 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,6 +13,7 @@ # limitations under the License. include(ExternalProject) +include(FindPythonInterp) if(TARGET firestore) return() @@ -32,6 +33,6 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND ${FIREBASE_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) From bd56ad5445151a8c375ae14d04b50cbb12240a2e Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 17:31:31 -0400 Subject: [PATCH 16/93] firestore.cmake: update pinned commit --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 530f78b4e1..b21da9275d 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -24,7 +24,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 0ed860a0360735c28a26aad9cbe899695009a236 + GIT_TAG 865162a0355a788728edf6798bcca5218dd50734 GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} From 7e229e835a69943ad94c24aac82e4e00469f619b Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 15 Apr 2022 19:54:46 -0400 Subject: [PATCH 17/93] CMakeLists.txt: Set FIRESTORE_INCLUDE_OBJC as a cache variable so it actually works --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ca6fa75b8..5d3410f251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,7 @@ endif() # Disable compiling the Objective-C (and Swift) stuff from the # firebase-ios-sdk since it's not needed and can sometimes fail to build. -set(FIRESTORE_INCLUDE_OBJC NO) +set(FIRESTORE_INCLUDE_OBJC OFF CACHE BOOL "Disabled for the CPP SDK") if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD) # Quote meta characters in ${CMAKE_CURRENT_LIST_DIR} so we can From bf8bffd8bac7ae32005853470a864c21742f857a Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Sat, 16 Apr 2022 00:34:51 -0400 Subject: [PATCH 18/93] query_main.cc: IsBefore(BoundPosition) -> IsInclusive(BoundPosition) This fixes several test failures due to incorrect handling of startAfter and endBefore resulting from a change in core::Bound from "before" to "inclusive" in https://github.com/firebase/firebase-ios-sdk/pull/9519 Namely, this fixes the following failure: ``` cursor_test.cc:250: Failure Expected equality of these values: std::vector({"c", "f", "b", "e"}) Which is: { "c", "f", "b", "e" } QuerySnapshotToIds(snapshot) Which is: { "c", "f" } [ FAILED ] FirestoreIntegrationTest.TimestampsCanBePassedToQueriesAsLimits ``` e.g. https://github.com/firebase/firebase-cpp-sdk/runs/6044737005 --- firestore/src/main/query_main.cc | 10 +++++----- firestore/src/main/query_main.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firestore/src/main/query_main.cc b/firestore/src/main/query_main.cc index 9ce4060fcc..d11c14002f 100644 --- a/firestore/src/main/query_main.cc +++ b/firestore/src/main/query_main.cc @@ -227,7 +227,7 @@ core::Bound QueryInternal::ToBound( components->values[i] = *DeepClone(*value).release(); } - return core::Bound::FromValue(std::move(components), IsBefore(bound_pos)); + return core::Bound::FromValue(std::move(components), IsInclusive(bound_pos)); } core::Bound QueryInternal::ToBound( @@ -261,7 +261,7 @@ core::Bound QueryInternal::ToBound( } } - return core::Bound::FromValue(std::move(components), IsBefore(bound_pos)); + return core::Bound::FromValue(std::move(components), IsInclusive(bound_pos)); } Message QueryInternal::ConvertDocumentId( @@ -327,14 +327,14 @@ api::Query QueryInternal::CreateQueryWithBound(BoundPosition bound_pos, FIRESTORE_UNREACHABLE(); } -bool QueryInternal::IsBefore(BoundPosition bound_pos) { +bool QueryInternal::IsInclusive(BoundPosition bound_pos) { switch (bound_pos) { case BoundPosition::kStartAt: - case BoundPosition::kEndBefore: + case BoundPosition::kEndAt: return true; case BoundPosition::kStartAfter: - case BoundPosition::kEndAt: + case BoundPosition::kEndBefore: return false; } diff --git a/firestore/src/main/query_main.h b/firestore/src/main/query_main.h index 17d13d8dfd..4f3e89016d 100644 --- a/firestore/src/main/query_main.h +++ b/firestore/src/main/query_main.h @@ -201,7 +201,7 @@ class QueryInternal { const nanopb::Message& from, const core::Query& internal_query) const; - static bool IsBefore(BoundPosition bound_pos); + static bool IsInclusive(BoundPosition bound_pos); core::Bound ToBound(BoundPosition bound_pos, const DocumentSnapshot& public_snapshot) const; From 3de38380765a64801ac4963c50ca837a43d6f75c Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Sat, 16 Apr 2022 00:41:08 -0400 Subject: [PATCH 19/93] firestore.cmake: update pinned commit --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index b21da9275d..28774952c1 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -24,7 +24,7 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 865162a0355a788728edf6798bcca5218dd50734 + GIT_TAG 70aa8b82a2ed36dd14448174bea0fd7e575d4d49 GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} From c1f3e89f3bd41c60fb5da0df49e137e3b67b755b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 11:36:13 -0700 Subject: [PATCH 20/93] Use staging repo and update to 9.0 podfiles. Add Swift headers from 9.0.0 zip release. --- .github/workflows/update-dependencies.yml | 19 + CMakeLists.txt | 8 +- admob/integration_test/Podfile | 3 +- analytics/integration_test/Podfile | 5 +- app/integration_test/Podfile | 3 +- auth/integration_test/Podfile | 5 +- build_scripts/ios/build.sh | 2 +- database/integration_test/Podfile | 9 +- dynamic_links/integration_test/Podfile | 3 +- firestore/integration_test/Podfile | 9 +- functions/CMakeLists.txt | 3 +- functions/integration_test/Podfile | 9 +- functions/src/ios/callable_reference_ios.h | 2 +- functions/src/ios/callable_reference_ios.mm | 4 +- functions/src/ios/functions_ios.h | 2 +- functions/src/ios/functions_ios.mm | 16 +- installations/integration_test/Podfile | 5 +- ios_pod/Podfile | 27 +- .../FirebaseAnalyticsSwift-Swift.h | 215 ++++++ .../FirebaseCoreInternal-Swift.h | 268 +++++++ .../FirebaseDatabaseSwift-Swift.h | 218 ++++++ .../FirebaseFirestoreSwift-Swift.h | 231 ++++++ .../swift_headers/FirebaseFunctions-Swift.h | 372 ++++++++++ .../FirebaseInAppMessagingSwift-Swift.h | 215 ++++++ .../FirebaseMLModelDownloader-Swift.h | 217 ++++++ .../FirebaseRemoteConfigSwift-Swift.h | 218 ++++++ .../swift_headers/FirebaseSharedSwift-Swift.h | 215 ++++++ ios_pod/swift_headers/FirebaseStorage-Swift.h | 678 ++++++++++++++++++ ios_pod/swift_headers/SwiftProtobuf-Swift.h | 215 ++++++ messaging/integration_test/Podfile | 5 +- remote_config/integration_test/Podfile | 5 +- storage/CMakeLists.txt | 1 + storage/integration_test/Podfile | 9 +- storage/src/ios/controller_ios.h | 6 +- storage/src/ios/controller_ios.mm | 6 +- storage/src/ios/listener_ios.h | 4 +- storage/src/ios/metadata_ios.h | 3 +- storage/src/ios/metadata_ios.mm | 2 +- storage/src/ios/storage_ios.h | 13 +- storage/src/ios/storage_ios.mm | 2 +- storage/src/ios/storage_reference_ios.h | 7 +- storage/src/ios/storage_reference_ios.mm | 7 +- storage/src/ios/util_ios.mm | 2 +- 43 files changed, 3186 insertions(+), 82 deletions(-) create mode 100644 ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseCoreInternal-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseFunctions-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseSharedSwift-Swift.h create mode 100644 ios_pod/swift_headers/FirebaseStorage-Swift.h create mode 100644 ios_pod/swift_headers/SwiftProtobuf-Swift.h diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 6200df50d6..036845919e 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -122,6 +122,25 @@ jobs: cd - rm -rf "${podtmp}" fi + + // Download the zip distribution and get the Swift header files. + core_version=$(grep "pod 'Firebase/Core'" ios_pod/Podfile | sed "s/.*'\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)'.*/\1/") + echo "Getting Swift header files from Firebase iOS SDK ${core_version} zip distribution" + ziptmp="$(mktemp -d)" + curl https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip -o ${ziptmp}/Firebase.zip + cd ${ziptmp} + unzip -q Firebase.zip + cd - + // Copy all *-Swift.h header files into ios_pod/swift_headers/ + find ${ziptmp} -name '*-Swift.h' | xargs -n 1 -j REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ + copyright_line="// Copyright $(date +%Y) Google LLC\n" + # Add a note to each file about its source. + for ios_header in ios_pod/swift_headers/*.h; do + sed -i~ "s|^/// @file|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n/// @file|" "${ios_header}" + python ../../scripts/format_code.py --f "${ios_header}" + done + rm -rf ${ziptmp} + elif [[ ${{ github.event.inputs.updateAndroid }} -eq 1 ]]; then # Update Android only echo "Updating Android dependencies only" diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d3410f251..4f4266a152 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ option(FIREBASE_INCLUDE_LIBRARY_DEFAULT "Should each library be included by default." ON) # Different options to enable/disable each library being included during # configuration. -option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." - ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) +option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." OFF) +# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_ANALYTICS "Include the Google Analytics for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) @@ -41,8 +41,8 @@ option(FIREBASE_INCLUDE_DYNAMIC_LINKS "Include the Firebase Dynamic Links library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FIRESTORE - "Include the Cloud Firestore library." - ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) + "Include the Cloud Firestore library." OFF) +# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FUNCTIONS "Include the Cloud Functions for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) diff --git a/admob/integration_test/Podfile b/admob/integration_test/Podfile index 183825bcc8..8ee8f378df 100644 --- a/admob/integration_test/Podfile +++ b/admob/integration_test/Podfile @@ -1,10 +1,11 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase AdMob test application. use_frameworks! :linkage => :static target 'integration_test' do - pod 'Firebase/Analytics', '8.15.0' + pod 'Firebase/Analytics', '9.0.0' pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' end diff --git a/analytics/integration_test/Podfile b/analytics/integration_test/Podfile index ef5bbc6d68..eacd58f9fe 100644 --- a/analytics/integration_test/Podfile +++ b/analytics/integration_test/Podfile @@ -1,3 +1,4 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Analytics test application. @@ -5,12 +6,12 @@ use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Analytics', '8.15.0' + pod 'Firebase/Analytics', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Analytics', '8.15.0' + pod 'Firebase/Analytics', '9.0.0' end post_install do |installer| diff --git a/app/integration_test/Podfile b/app/integration_test/Podfile index 9cd0677407..a87b4c431f 100644 --- a/app/integration_test/Podfile +++ b/app/integration_test/Podfile @@ -1,10 +1,11 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase App test application. use_frameworks! :linkage => :static target 'integration_test' do - pod 'Firebase/Analytics', '8.15.0' + pod 'Firebase/Analytics', '9.0.0' end post_install do |installer| diff --git a/auth/integration_test/Podfile b/auth/integration_test/Podfile index 020c91abcb..4029193e88 100644 --- a/auth/integration_test/Podfile +++ b/auth/integration_test/Podfile @@ -1,15 +1,16 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Auth test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| diff --git a/build_scripts/ios/build.sh b/build_scripts/ios/build.sh index 56061317f2..0ac71db2c4 100755 --- a/build_scripts/ios/build.sh +++ b/build_scripts/ios/build.sh @@ -27,7 +27,7 @@ readonly SUPPORTED_PLATFORMS=(device simulator) readonly SUPPORTED_ARCHITECTURES=(arm64 armv7 x86_64 i386) readonly DEVICE_ARCHITECTURES=(arm64 armv7) readonly SIMULATOR_ARCHITECTURES=(arm64 x86_64 i386) -readonly SUPPORTED_TARGETS=(firebase_admob firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) +readonly SUPPORTED_TARGETS=(firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) # build default value buildpath="ios_build" diff --git a/database/integration_test/Podfile b/database/integration_test/Podfile index 1e68beb204..2407373b24 100644 --- a/database/integration_test/Podfile +++ b/database/integration_test/Podfile @@ -1,17 +1,18 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Realtime Database test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Database', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Database', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Database', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Database', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| diff --git a/dynamic_links/integration_test/Podfile b/dynamic_links/integration_test/Podfile index 239c1153e5..36a1794069 100644 --- a/dynamic_links/integration_test/Podfile +++ b/dynamic_links/integration_test/Podfile @@ -1,10 +1,11 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Dynamic Links test application. use_frameworks! :linkage => :static target 'integration_test' do - pod 'Firebase/DynamicLinks', '8.15.0' + pod 'Firebase/DynamicLinks', '9.0.0' end post_install do |installer| diff --git a/firestore/integration_test/Podfile b/firestore/integration_test/Podfile index efafbe060d..6f189a0926 100644 --- a/firestore/integration_test/Podfile +++ b/firestore/integration_test/Podfile @@ -1,17 +1,18 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Realtime Firestore test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Firestore', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Firestore', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Firestore', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Firestore', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| diff --git a/functions/CMakeLists.txt b/functions/CMakeLists.txt index f5230a1b71..8636729f88 100644 --- a/functions/CMakeLists.txt +++ b/functions/CMakeLists.txt @@ -75,6 +75,7 @@ target_include_directories(firebase_functions ${CMAKE_CURRENT_LIST_DIR}/src/include PRIVATE ${FIREBASE_CPP_SDK_ROOT_DIR} + ${FIREBASE_CPP_SDK_ROOT_DIR}/ios_pod/swift_headers ) target_compile_definitions(firebase_functions PRIVATE @@ -96,7 +97,7 @@ elseif(IOS) target_link_libraries(firebase_functions PUBLIC "-fembed-bitcode") - setup_pod_headers( +setup_pod_headers( firebase_functions POD_NAMES FirebaseCore diff --git a/functions/integration_test/Podfile b/functions/integration_test/Podfile index 8b58661dfb..acaa8d30fa 100644 --- a/functions/integration_test/Podfile +++ b/functions/integration_test/Podfile @@ -1,17 +1,18 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Functions for Firebase test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Functions', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Functions', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Functions', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Functions', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| diff --git a/functions/src/ios/callable_reference_ios.h b/functions/src/ios/callable_reference_ios.h index c130d814e0..080b0bd8c3 100644 --- a/functions/src/ios/callable_reference_ios.h +++ b/functions/src/ios/callable_reference_ios.h @@ -22,8 +22,8 @@ #include "functions/src/ios/functions_ios.h" #ifdef __OBJC__ -#import "FIRFunctions.h" @class FIRHTTPSCallableResult; +@class FIRHTTPSCallable; #endif // __OBJC__ // This defines the class FIRHTTPSCallablePointer, which is a C++-compatible diff --git a/functions/src/ios/callable_reference_ios.mm b/functions/src/ios/callable_reference_ios.mm index 7ee0022f88..9276e21d43 100644 --- a/functions/src/ios/callable_reference_ios.mm +++ b/functions/src/ios/callable_reference_ios.mm @@ -14,13 +14,13 @@ #include "functions/src/ios/callable_reference_ios.h" -#import "FIRFunctions.h" -#import "FIRHTTPSCallable.h" #include "app/src/util_ios.h" #include "functions/src/include/firebase/functions.h" #include "functions/src/include/firebase/functions/common.h" #include "functions/src/ios/functions_ios.h" +#import "FirebaseFunctions-Swift.h" + namespace firebase { namespace functions { namespace internal { diff --git a/functions/src/ios/functions_ios.h b/functions/src/ios/functions_ios.h index 89adfd2a2f..09a358d766 100644 --- a/functions/src/ios/functions_ios.h +++ b/functions/src/ios/functions_ios.h @@ -27,7 +27,7 @@ #include "functions/src/include/firebase/functions/callable_reference.h" #ifdef __OBJC__ -#import "FIRFunctions.h" +@class FIRFunctions; #endif // __OBJC__ // This defines the class FIRFunctionsPointer, which is a C++-compatible wrapper diff --git a/functions/src/ios/functions_ios.mm b/functions/src/ios/functions_ios.mm index 95ab992eea..f0ca0e25c7 100644 --- a/functions/src/ios/functions_ios.mm +++ b/functions/src/ios/functions_ios.mm @@ -14,7 +14,6 @@ #include "functions/src/ios/functions_ios.h" -#import "FIRFunctions.h" #include "app/memory/unique_ptr.h" #include "app/src/app_ios.h" #include "app/src/include/firebase/app.h" @@ -22,6 +21,8 @@ #include "app/src/reference_counted_future_impl.h" #include "functions/src/ios/callable_reference_ios.h" +#import "FirebaseFunctions-Swift.h" + namespace firebase { namespace functions { namespace internal { @@ -48,7 +49,18 @@ } void FunctionsInternal::UseFunctionsEmulator(const char* origin) { - [impl_.get()->get() useFunctionsEmulatorOrigin:@(origin)]; + std::string origin_str(origin); + // origin is in the format localhost:5005 + size_t pos = origin_str.rfind(":"); + if (pos == std::string::npos) { + LogError("Functions::UseFunctionsEmulator: You must specify host:port"); + return; + } + + std::string host = origin_str.substr(0, pos); + std::string port_str = origin_str.substr(pos+1, std::string::npos); + int port = atoi(port_str.c_str()); + [impl_.get()->get() useEmulatorWithHost:@(host.c_str()) port:port]; } } // namespace internal diff --git a/installations/integration_test/Podfile b/installations/integration_test/Podfile index 1694a4c74b..40879f519a 100644 --- a/installations/integration_test/Podfile +++ b/installations/integration_test/Podfile @@ -1,11 +1,12 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Installations test application. use_frameworks! :linkage => :static target 'integration_test' do - pod 'Firebase/Analytics', '8.15.0' - pod 'Firebase/Installations', '8.15.0' + pod 'Firebase/Analytics', '9.0.0' + pod 'Firebase/Installations', '9.0.0' end post_install do |installer| diff --git a/ios_pod/Podfile b/ios_pod/Podfile index 699b3f88fb..1dd8808c8b 100644 --- a/ios_pod/Podfile +++ b/ios_pod/Podfile @@ -1,21 +1,22 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' use_frameworks! target 'GetPods' do - pod 'Firebase/Core', '8.15.0' + pod 'Firebase/Core', '9.0.0' - pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' - pod 'Firebase/Analytics', '8.15.0' - pod 'Firebase/Auth', '8.15.0' - pod 'Firebase/Crashlytics', '8.15.0' - pod 'Firebase/Database', '8.15.0' - pod 'Firebase/DynamicLinks', '8.15.0' - pod 'Firebase/Firestore', '8.15.0' - pod 'Firebase/Functions', '8.15.0' - pod 'Firebase/Installations', '8.15.0' - pod 'Firebase/Messaging', '8.15.0' - pod 'Firebase/RemoteConfig', '8.15.0' - pod 'Firebase/Storage', '8.15.0' + #pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' + pod 'Firebase/Analytics', '9.0.0' + pod 'Firebase/Auth', '9.0.0' + pod 'Firebase/Crashlytics', '9.0.0' + pod 'Firebase/Database', '9.0.0' + pod 'Firebase/DynamicLinks', '9.0.0' + pod 'Firebase/Firestore', '9.0.0' + pod 'Firebase/Functions', '9.0.0' + pod 'Firebase/Installations', '9.0.0' + pod 'Firebase/Messaging', '9.0.0' + pod 'Firebase/RemoteConfig', '9.0.0' + pod 'Firebase/Storage', '9.0.0' end diff --git a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h new file mode 100644 index 0000000000..e4e74d2e01 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h @@ -0,0 +1,215 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEANALYTICSSWIFT_SWIFT_H +#define FIREBASEANALYTICSSWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseAnalyticsSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h new file mode 100644 index 0000000000..341833df08 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h @@ -0,0 +1,268 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASECOREINTERNAL_SWIFT_H +#define FIREBASECOREINTERNAL_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import ObjectiveC; +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseCoreInternal",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + + +@class NSString; +@class FIRHeartbeatsPayload; + +/// An object that provides API to log and flush heartbeats from a synchronized storage container. +SWIFT_CLASS_NAMED("_ObjC_HeartbeatController") +@interface FIRHeartbeatController : NSObject +/// Public initializer. +/// \param id The id to associate this controller’s heartbeat storage with. +/// +- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER; +/// Asynchronously logs a new heartbeat, if needed. +/// note: +/// This API is thread-safe. +/// \param agent The string agent (i.e. Firebase User Agent) to associate the logged heartbeat with. +/// +- (void)log:(NSString * _Nonnull)agent; +/// Synchronously flushes heartbeats from storage into a heartbeats payload. +/// note: +/// This API is thread-safe. +/// +/// returns: +/// A heartbeats payload for the flushed heartbeat(s). +- (FIRHeartbeatsPayload * _Nonnull)flush SWIFT_WARN_UNUSED_RESULT; +/// Synchronously flushes the heartbeat for today. +/// If no heartbeat was logged today, the returned payload is empty. +/// note: +/// This API is thread-safe. +/// +/// returns: +/// A heartbeats payload for the flushed heartbeat. +- (FIRHeartbeatsPayload * _Nonnull)flushHeartbeatFromToday SWIFT_WARN_UNUSED_RESULT; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +@class NSNumber; + +/// A model object representing a payload of heartbeat data intended for sending in network requests. +SWIFT_CLASS_NAMED("_ObjC_HeartbeatsPayload") +@interface FIRHeartbeatsPayload : NSObject +/// Returns a processed payload string intended for use in a HTTP header. +/// +/// returns: +/// A string value from the heartbeats payload. +- (NSString * _Nonnull)headerValue SWIFT_WARN_UNUSED_RESULT; +/// A Boolean value indicating whether the payload is empty. +@property (nonatomic, readonly) BOOL isEmpty; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h new file mode 100644 index 0000000000..eea2480795 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h @@ -0,0 +1,218 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEDATABASESWIFT_SWIFT_H +#define FIREBASEDATABASESWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseDatabaseSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h new file mode 100644 index 0000000000..c0d44f4ec9 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h @@ -0,0 +1,231 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEFIRESTORESWIFT_SWIFT_H +#define FIREBASEFIRESTORESWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseFirestoreSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + + + + + + + + + + + + + + + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseFunctions-Swift.h b/ios_pod/swift_headers/FirebaseFunctions-Swift.h new file mode 100644 index 0000000000..99767ab43a --- /dev/null +++ b/ios_pod/swift_headers/FirebaseFunctions-Swift.h @@ -0,0 +1,372 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEFUNCTIONS_SWIFT_H +#define FIREBASEFUNCTIONS_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Foundation; +@import ObjectiveC; +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseFunctions",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +@class FIRApp; +@class NSString; +@class FIRHTTPSCallable; +@class NSURL; +@class NSNumber; + +/// Functions is the client for Cloud Functions for a Firebase project. +SWIFT_CLASS_NAMED("Functions") +@interface FIRFunctions : NSObject +/// Creates a Cloud Functions client or returns a pre-existing instance if it already exists. ++ (FIRFunctions * _Nonnull)functions SWIFT_WARN_UNUSED_RESULT; +/// Creates a Cloud Functions client with the given app, or returns a pre-existing +/// instance if one already exists. +/// @param app The app for the Firebase project. ++ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app SWIFT_WARN_UNUSED_RESULT; +/// Creates a Cloud Functions client with the default app and given region. +/// @param region The region for the http trigger, such as “us-central1”. ++ (FIRFunctions * _Nonnull)functionsForRegion:(NSString * _Nonnull)region SWIFT_WARN_UNUSED_RESULT; +/// Creates a Cloud Functions client with the given app and region, or returns a pre-existing +/// instance if one already exists. +/// @param customDomain A custom domain for the http trigger, such as “https://mydomain.com”. ++ (FIRFunctions * _Nonnull)functionsForCustomDomain:(NSString * _Nonnull)customDomain SWIFT_WARN_UNUSED_RESULT; +/// Creates a Cloud Functions client with the given app and region, or returns a pre-existing +/// instance if one already exists. +/// @param app The app for the Firebase project. +/// @param region The region for the http trigger, such as “us-central1”. ++ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app region:(NSString * _Nonnull)region SWIFT_WARN_UNUSED_RESULT; +/// Creates a Cloud Functions client with the given app and region, or returns a pre-existing +/// instance if one already exists. +/// @param app The app for the Firebase project. +/// @param customDomain A custom domain for the http trigger, such as “https://mydomain.com”. ++ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app customDomain:(NSString * _Nonnull)customDomain SWIFT_WARN_UNUSED_RESULT; +/// Creates a reference to the Callable HTTPS trigger with the given name. +/// @param name The name of the Callable HTTPS trigger. +- (FIRHTTPSCallable * _Nonnull)HTTPSCallableWithName:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT; +- (FIRHTTPSCallable * _Nonnull)HTTPSCallableWithURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; +/// Changes this instance to point to a Cloud Functions emulator running locally. +/// See https://firebase.google.com/docs/functions/local-emulator +/// @param host The host of the local emulator, such as “localhost”. +/// @param port The port of the local emulator, for example 5005. +- (void)useEmulatorWithHost:(NSString * _Nonnull)host port:(NSInteger)port; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +/// The set of error status codes that can be returned from a Callable HTTPS tigger. These are the +/// canonical error codes for Google APIs, as documented here: +/// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L26 +typedef SWIFT_ENUM_NAMED(NSInteger, FIRFunctionsErrorCode, "FunctionsErrorCode", open) { +/// The operation completed successfully. + FIRFunctionsErrorCodeOK = 0, +/// The operation was cancelled (typically by the caller). + FIRFunctionsErrorCodeCancelled = 1, +/// Unknown error or an error from a different error domain. + FIRFunctionsErrorCodeUnknown = 2, +/// Client specified an invalid argument. Note that this differs from FailedPrecondition. +/// InvalidArgument indicates arguments that are problematic regardless of the state of the +/// system (e.g., an invalid field name). + FIRFunctionsErrorCodeInvalidArgument = 3, +/// Deadline expired before operation could complete. For operations that change the state of the +/// system, this error may be returned even if the operation has completed successfully. For +/// example, a successful response from a server could have been delayed long enough for the +/// deadline to expire. + FIRFunctionsErrorCodeDeadlineExceeded = 4, +/// Some requested document was not found. + FIRFunctionsErrorCodeNotFound = 5, +/// Some document that we attempted to create already exists. + FIRFunctionsErrorCodeAlreadyExists = 6, +/// The caller does not have permission to execute the specified operation. + FIRFunctionsErrorCodePermissionDenied = 7, +/// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system +/// is out of space. + FIRFunctionsErrorCodeResourceExhausted = 8, +/// Operation was rejected because the system is not in a state required for the operation’s +/// execution. + FIRFunctionsErrorCodeFailedPrecondition = 9, +/// The operation was aborted, typically due to a concurrency issue like transaction aborts, etc. + FIRFunctionsErrorCodeAborted = 10, +/// Operation was attempted past the valid range. + FIRFunctionsErrorCodeOutOfRange = 11, +/// Operation is not implemented or not supported/enabled. + FIRFunctionsErrorCodeUnimplemented = 12, +/// Internal errors. Means some invariant expected by underlying system has been broken. If you +/// see one of these errors, something is very broken. + FIRFunctionsErrorCodeInternal = 13, +/// The service is currently unavailable. This is a most likely a transient condition and may be +/// corrected by retrying with a backoff. + FIRFunctionsErrorCodeUnavailable = 14, +/// Unrecoverable data loss or corruption. + FIRFunctionsErrorCodeDataLoss = 15, +/// The request does not have valid authentication credentials for the operation. + FIRFunctionsErrorCodeUnauthenticated = 16, +}; + +@class FIRHTTPSCallableResult; + +/// A HTTPSCallable is reference to a particular Callable HTTPS trigger in Cloud Functions. +SWIFT_CLASS_NAMED("HTTPSCallable") +@interface FIRHTTPSCallable : NSObject +/// The timeout to use when calling the function. Defaults to 70 seconds. +@property (nonatomic) NSTimeInterval timeoutInterval; +/// Executes this Callable HTTPS trigger asynchronously. +/// The data passed into the trigger can be any of the following types: +///
    +///
  • +/// NSNull +///
  • +///
  • +/// NSString +///
  • +///
  • +/// NSNumber +///
  • +///
  • +/// NSArray, where the contained objects are also one of these types. +///
  • +///
  • +/// NSDictionary, where the values are also one of these types. +///
  • +///
+/// The request to the Cloud Functions backend made by this method automatically includes a +/// Firebase Installations ID token to identify the app instance. If a user is logged in with +/// Firebase Auth, an auth ID token for the user is also automatically included. +/// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information +/// regarding the app instance. To stop this, see Messaging.deleteData(). It +/// resumes with a new FCM Token the next time you call this method. +/// @param data Parameters to pass to the trigger. +/// @param completion The block to call when the HTTPS request has completed. +- (void)callWithObject:(id _Nullable)data completion:(void (^ _Nonnull)(FIRHTTPSCallableResult * _Nullable, NSError * _Nullable))completion; +/// Executes this Callable HTTPS trigger asynchronously. This API should only be used from Objective C +/// The request to the Cloud Functions backend made by this method automatically includes a +/// Firebase Installations ID token to identify the app instance. If a user is logged in with +/// Firebase Auth, an auth ID token for the user is also automatically included. +/// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information +/// regarding the app instance. To stop this, see Messaging.deleteData(). It +/// resumes with a new FCM Token the next time you call this method. +/// @param completion The block to call when the HTTPS request has completed. +- (void)callWithCompletion:(void (^ _Nonnull)(FIRHTTPSCallableResult * _Nullable, NSError * _Nullable))completion; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// A HTTPSCallableResult contains the result of calling a HTTPSCallable. +SWIFT_CLASS_NAMED("HTTPSCallableResult") +@interface FIRHTTPSCallableResult : NSObject +/// The data that was returned from the Callable HTTPS trigger. +/// The data is in the form of native objects. For example, if your trigger returned an +/// array, this object would be an NSArray. If your trigger returned a JavaScript object with +/// keys and values, this object would be an NSDictionary. +@property (nonatomic, readonly) id _Nonnull data; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h new file mode 100644 index 0000000000..28f6cc54cd --- /dev/null +++ b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h @@ -0,0 +1,215 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H +#define FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseInAppMessagingSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h new file mode 100644 index 0000000000..ae908df85f --- /dev/null +++ b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h @@ -0,0 +1,217 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEMLMODELDOWNLOADER_SWIFT_H +#define FIREBASEMLMODELDOWNLOADER_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseMLModelDownloader",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h new file mode 100644 index 0000000000..66771efb69 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h @@ -0,0 +1,218 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASEREMOTECONFIGSWIFT_SWIFT_H +#define FIREBASEREMOTECONFIGSWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseRemoteConfigSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + + + + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h new file mode 100644 index 0000000000..ea253b6fa1 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h @@ -0,0 +1,215 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASESHAREDSWIFT_SWIFT_H +#define FIREBASESHAREDSWIFT_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseSharedSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/FirebaseStorage-Swift.h b/ios_pod/swift_headers/FirebaseStorage-Swift.h new file mode 100644 index 0000000000..1b08db5dc2 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseStorage-Swift.h @@ -0,0 +1,678 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef FIREBASESTORAGE_SWIFT_H +#define FIREBASESTORAGE_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +@import Dispatch; +@import Foundation; +@import ObjectiveC; +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseStorage",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +@class NSString; +@class FIRApp; +@class FIRStorageReference; +@class NSNumber; + +/// FirebaseStorage is a service that supports uploading and downloading binary objects, +/// such as images, videos, and other files to Google Cloud Storage. +/// If you call FirebaseStorage.storage(), the instance will initialize with the default FirebaseApp, +/// FirebaseApp.app(), and the storage location will come from the provided +/// GoogleService-Info.plist. +/// If you provide a custom instance of FirebaseApp, +/// the storage location will be specified via the FirebaseOptions#storageBucket property. +SWIFT_CLASS_NAMED("Storage") +@interface FIRStorage : NSObject +/// An instance of FirebaseStorage, configured with the default FirebaseApp. +/// @return the FirebaseStorage instance, configured with the default FirebaseApp. ++ (FIRStorage * _Nonnull)storage SWIFT_WARN_UNUSED_RESULT; +/// An instance of FirebaseStorage, configured with a custom storage bucket @a url. +/// @param url The gs:// url to your Firebase Storage Bucket. +/// @return the FirebaseStorage instance, configured with the custom FirebaseApp. ++ (FIRStorage * _Nonnull)storageWithURL:(NSString * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; +/// Creates an instance of FirebaseStorage, configured with the custom FirebaseApp @a app. +/// @param app The custom FirebaseApp used for initialization. +/// @return the FirebaseStorage instance, configured with the custom FirebaseApp. ++ (FIRStorage * _Nonnull)storageForApp:(FIRApp * _Nonnull)app SWIFT_WARN_UNUSED_RESULT; +/// Creates an instance of FirebaseStorage, configured with a custom FirebaseApp @a app and a custom storage +/// bucket @a url. +/// @param app The custom FirebaseApp used for initialization. +/// @param url The gs:// url to your Firebase Storage Bucket. +/// @return the FirebaseStorage instance, configured with the custom FirebaseApp. ++ (FIRStorage * _Nonnull)storageForApp:(FIRApp * _Nonnull)app URL:(NSString * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; +/// The Firebase App associated with this Firebase Storage instance. +@property (nonatomic, readonly, strong) FIRApp * _Nonnull app; +/// Maximum time in seconds to retry an upload if a failure occurs. +/// Defaults to 10 minutes (600 seconds). +@property (nonatomic) NSTimeInterval maxUploadRetryTime; +/// Maximum time in seconds to retry a download if a failure occurs. +/// Defaults to 10 minutes (600 seconds). +@property (nonatomic) NSTimeInterval maxDownloadRetryTime; +/// Maximum time in seconds to retry operations other than upload and download if a failure occurs. +/// Defaults to 2 minutes (120 seconds). +@property (nonatomic) NSTimeInterval maxOperationRetryTime; +/// Queue that all developer callbacks are fired on. Defaults to the main queue. +@property (nonatomic, strong) dispatch_queue_t _Nonnull callbackQueue; +/// Creates a StorageReference initialized at the root Firebase Storage location. +/// @return An instance of StorageReference initialized at the root. +- (FIRStorageReference * _Nonnull)reference SWIFT_WARN_UNUSED_RESULT; +/// Creates a StorageReference given a gs:// or https:// URL pointing to a Firebase Storage +/// location. For example, you can pass in an https:// download URL retrieved from +/// [StorageReference downloadURLWithCompletion] or the gs:// URI from +/// [StorageReference description]. +/// @param string A gs:// or https:// URL to initialize the reference with. +/// @return An instance of StorageReference at the given child path. +/// @throws Throws an exception if passed in URL is not associated with the FirebaseApp used to initialize +/// this FirebaseStorage. +- (FIRStorageReference * _Nonnull)referenceForURL:(NSString * _Nonnull)string SWIFT_WARN_UNUSED_RESULT; +/// Creates a StorageReference initialized at a child Firebase Storage location. +/// @param string A relative path from the root to initialize the reference with, +/// for instance @“path/to/object”. +/// @return An instance of StorageReference at the given child path. +- (FIRStorageReference * _Nonnull)referenceWithPath:(NSString * _Nonnull)string SWIFT_WARN_UNUSED_RESULT; +/// Configures the Storage SDK to use an emulated backend instead of the default remote backend. +- (void)useEmulatorWithHost:(NSString * _Nonnull)host port:(NSInteger)port; +- (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly) NSUInteger hash; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + +/// Defines task operations such as pause, resume, cancel, and enqueue for all tasks. +/// All tasks are required to implement enqueue, which begins the task, and may optionally +/// implement pause, resume, and cancel, which operate on the task to pause, resume, and cancel +/// operations. +SWIFT_PROTOCOL_NAMED("StorageTaskManagement") +@protocol FIRStorageTaskManagement +/// Prepares a task and begins execution. +- (void)enqueue; +@optional +/// Pauses a task currently in progress. +- (void)pause; +/// Pauses a task currently in progress. +- (void)cancel; +/// Pauses a task currently in progress. +- (void)resume; +@end + +@class FIRStorageTaskSnapshot; + +/// A superclass to all Storage*Tasks, including StorageUploadTask +/// and StorageDownloadTask, to provide state transitions, event raising, and common storage +/// or metadata and errors. +/// Callbacks are always fired on the developer specified callback queue. +/// If no queue is specified by the developer, it defaults to the main queue. +/// Currently not thread safe, so only call methods on the main thread. +SWIFT_CLASS_NAMED("StorageTask") +@interface FIRStorageTask : NSObject +/// An immutable view of the task and associated metadata, progress, error, etc. +@property (nonatomic, readonly, strong) FIRStorageTaskSnapshot * _Nonnull snapshot; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +enum FIRStorageTaskStatus : NSInteger; + +/// Extends FIRStorageTask to provide observable semantics such as adding and removing observers. +/// Observers produce a FIRStorageHandle, which is used to keep track of and remove specific +/// observers at a later date. +/// This class is currently not thread safe and can only be called on the main thread. +SWIFT_CLASS_NAMED("StorageObservableTask") +@interface FIRStorageObservableTask : FIRStorageTask +/// Observes changes in the upload status: Resume, Pause, Progress, Success, and Failure. +/// @param status The StorageTaskStatus change to observe. +/// @param handler A callback that fires every time the status event occurs, +/// returns a StorageTaskSnapshot containing the state of the task. +/// @return A task handle that can be used to remove the observer at a later date. +- (NSString * _Nonnull)observeStatus:(enum FIRStorageTaskStatus)status handler:(void (^ _Nonnull)(FIRStorageTaskSnapshot * _Nonnull))handler; +/// Removes the single observer with the provided handle. +/// @param handle The handle of the task to remove. +- (void)removeObserverWithHandle:(NSString * _Nonnull)handle; +/// Removes all observers for a single status. +/// @param status A StorageTaskStatus to remove listeners for. +- (void)removeAllObserversForStatus:(enum FIRStorageTaskStatus)status; +/// Removes all observers. +- (void)removeAllObservers; +@end + + +/// StorageDownloadTask implements resumable downloads from an object in Firebase Storage. +/// Downloads can be returned on completion with a completion handler, and can be monitored +/// by attaching observers, or controlled by calling StorageTask#pause, StorageTask#resume, +/// or FIRIMPLStorageTask#cancel. +/// Downloads can currently be returned as Data in memory, or as an URL to a file on disk. +/// Downloads are performed on a background queue, and callbacks are raised on the developer +/// specified callbackQueue in Storage, or the main queue if left unspecified. +/// Currently all uploads must be initiated and managed on the main queue. +SWIFT_CLASS_NAMED("StorageDownloadTask") +@interface FIRStorageDownloadTask : FIRStorageObservableTask +/// Prepares a task and begins execution. +- (void)enqueue; +/// Pauses a task currently in progress. +- (void)pause; +/// Pauses a task currently in progress. +- (void)cancel; +/// Pauses a task currently in progress. +- (void)resume; +@end + +typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageErrorCode, "StorageErrorCode", open) { + FIRStorageErrorCodeUnknown = -13000, + FIRStorageErrorCodeObjectNotFound = -13010, + FIRStorageErrorCodeBucketNotFound = -13011, + FIRStorageErrorCodeProjectNotFound = -13012, + FIRStorageErrorCodeQuotaExceeded = -13013, + FIRStorageErrorCodeUnauthenticated = -13020, + FIRStorageErrorCodeUnauthorized = -13021, + FIRStorageErrorCodeRetryLimitExceeded = -13030, + FIRStorageErrorCodeNonMatchingChecksum = -13031, + FIRStorageErrorCodeDownloadSizeExceeded = -13032, + FIRStorageErrorCodeCancelled = -13040, + FIRStorageErrorCodeInvalidArgument = -13050, +}; + + +/// Contains the prefixes and items returned by a StorageReference.list() call. +SWIFT_CLASS_NAMED("StorageListResult") +@interface FIRStorageListResult : NSObject +/// The prefixes (folders) returned by the list() operation. +/// @return A list of prefixes (folders). +@property (nonatomic, readonly, copy) NSArray * _Nonnull prefixes; +/// Returns a token that can be used to resume a previous list() operation. nil +/// indicates that there are no more results. +/// @return A page token if more results are available. +@property (nonatomic, readonly, copy) NSArray * _Nonnull items; +/// Returns a token that can be used to resume a previous list() operation. nil +/// indicates that there are no more results. +/// @return A page token if more results are available. +@property (nonatomic, readonly, copy) NSString * _Nullable pageToken; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +@class NSDate; + +/// Class which represents the metadata on an object in Firebase Storage. This metadata is +/// returned on successful operations, and can be used to retrieve download URLs, content types, +/// and a Storage reference to the object in question. Full documentation can be found at the GCS +/// Objects#resource docs. +/// @see https://cloud.google.com/storage/docs/json_api/v1/objects#resource +SWIFT_CLASS_NAMED("StorageMetadata") +@interface FIRStorageMetadata : NSObject +/// The name of the bucket containing this object. +@property (nonatomic, readonly, copy) NSString * _Nonnull bucket; +/// Cache-Control directive for the object data. +@property (nonatomic, copy) NSString * _Nullable cacheControl; +/// Content-Disposition of the object data. +@property (nonatomic, copy) NSString * _Nullable contentDisposition; +/// Content-Encoding of the object data. +@property (nonatomic, copy) NSString * _Nullable contentEncoding; +/// Content-Language of the object data. +@property (nonatomic, copy) NSString * _Nullable contentLanguage; +/// Content-Type of the object data. +@property (nonatomic, copy) NSString * _Nullable contentType; +/// MD5 hash of the data; encoded using base64. +@property (nonatomic, readonly, copy) NSString * _Nullable md5Hash; +/// The content generation of this object. Used for object versioning. +@property (nonatomic, readonly) int64_t generation; +/// User-provided metadata, in key/value pairs. +@property (nonatomic, copy) NSDictionary * _Nullable customMetadata; +/// The version of the metadata for this object at this generation. Used +/// for preconditions and for detecting changes in metadata. A metageneration number is only +/// meaningful in the context of a particular generation of a particular object. +@property (nonatomic, readonly) int64_t metageneration; +/// The name of this object, in gs://bucket/path/to/object.txt, this is object.txt. +@property (nonatomic, readonly, copy) NSString * _Nullable name; +/// The full path of this object, in gs://bucket/path/to/object.txt, this is path/to/object.txt. +@property (nonatomic, readonly, copy) NSString * _Nullable path; +/// Content-Length of the data in bytes. +@property (nonatomic, readonly) int64_t size; +/// The creation time of the object in RFC 3339 format. +@property (nonatomic, readonly, copy) NSDate * _Nullable timeCreated; +/// The modification time of the object metadata in RFC 3339 format. +@property (nonatomic, readonly, copy) NSDate * _Nullable updated; +/// A reference to the object in Firebase Storage. +@property (nonatomic, readonly, strong) FIRStorageReference * _Nullable storageReference; +/// Creates a Dictionary from the contents of the metadata. +/// @return A Dictionary that represents the contents of the metadata. +- (NSDictionary * _Nonnull)dictionaryRepresentation SWIFT_WARN_UNUSED_RESULT; +/// Determines if the current metadata represents a “file”. +@property (nonatomic, readonly) BOOL isFile; +/// Determines if the current metadata represents a “folder”. +@property (nonatomic, readonly) BOOL isFolder; +- (nonnull instancetype)init; +/// Creates an instance of StorageMetadata from the contents of a dictionary. +/// @return An instance of StorageMetadata that represents the contents of a dictionary. +- (nonnull instancetype)initWithDictionary:(NSDictionary * _Nonnull)dictionary; +@end + + +@class NSData; +@class FIRStorageUploadTask; +@class NSURL; + +/// StorageReference represents a reference to a Google Cloud Storage object. Developers can +/// upload and download objects, as well as get/set object metadata, and delete an object at the +/// path. +/// @see https://cloud.google.com/storage/ +SWIFT_CLASS_NAMED("StorageReference") +@interface FIRStorageReference : NSObject +/// The Storage service object which created this reference. +@property (nonatomic, readonly, strong) FIRStorage * _Nonnull storage; +/// The name of the Google Cloud Storage bucket associated with this reference, +/// in gs://bucket/path/to/object.txt, the bucket would be: ‘bucket’ +@property (nonatomic, readonly, copy) NSString * _Nonnull bucket; +/// The full path to this object, not including the Google Cloud Storage bucket. +/// In gs://bucket/path/to/object.txt, the full path would be: ‘path/to/object.txt’ +@property (nonatomic, readonly, copy) NSString * _Nonnull fullPath; +/// The short name of the object associated with this reference, +/// in gs://bucket/path/to/object.txt, the name of the object would be: ‘object.txt’ +@property (nonatomic, readonly, copy) NSString * _Nonnull name; +/// Creates a new StorageReference pointing to the root object. +/// @return A new StorageReference pointing to the root object. +- (FIRStorageReference * _Nonnull)root SWIFT_WARN_UNUSED_RESULT; +/// Creates a new StorageReference pointing to the parent of the current reference +/// or nil if this instance references the root location. +/// For example: +/// path = foo/bar/baz parent = foo/bar +/// path = foo parent = (root) +/// path = (root) parent = nil +/// @return A new StorageReference pointing to the parent of the current reference. +- (FIRStorageReference * _Nullable)parent SWIFT_WARN_UNUSED_RESULT; +/// Creates a new StorageReference pointing to a child object of the current reference. +/// path = foo child = bar newPath = foo/bar +/// path = foo/bar child = baz ntask.impl.snapshotwPath = foo/bar/baz +/// All leading and trailing slashes will be removed, and consecutive slashes will be +/// compressed to single slashes. For example: +/// child = /foo/bar newPath = foo/bar +/// child = foo/bar/ newPath = foo/bar +/// child = foo///bar newPath = foo/bar +/// @param path Path to append to the current path. +/// @return A new StorageReference pointing to a child location of the current reference. +- (FIRStorageReference * _Nonnull)child:(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT; +/// Asynchronously uploads data to the currently specified StorageReference, +/// without additional metadata. +/// This is not recommended for large files, and one should instead upload a file from disk. +/// @param uploadData The Data to upload. +/// @param metadata StorageMetadata containing additional information (MIME type, etc.) +/// about the object being uploaded. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata; +/// Asynchronously uploads data to the currently specified StorageReference. +/// This is not recommended for large files, and one should instead upload a file from disk. +/// @param uploadData The Data to upload. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData; +/// Asynchronously uploads data to the currently specified StorageReference. +/// This is not recommended for large files, and one should instead upload a file from disk. +/// @param uploadData The Data to upload. +/// @param metadata StorageMetadata containing additional information (MIME type, etc.) +/// about the object being uploaded. +/// @param completion A completion block that either returns the object metadata on success, +/// or an error on failure. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +/// Asynchronously uploads a file to the currently specified StorageReference. +/// @param fileURL A URL representing the system file path of the object to be uploaded. +/// @param metadata StorageMetadata containing additional information (MIME type, etc.) +/// about the object being uploaded. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata; +/// Asynchronously uploads a file to the currently specified StorageReference, +/// without additional metadata. +/// @param fileURL A URL representing the system file path of the object to be uploaded. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL; +/// Asynchronously uploads a file to the currently specified StorageReference. +/// @param fileURL A URL representing the system file path of the object to be uploaded. +/// @param metadata StorageMetadata containing additional information (MIME type, etc.) +/// about the object being uploaded. +/// @param completion A completion block that either returns the object metadata on success, +/// or an error on failure. +/// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. +- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +/// Asynchronously downloads the object at the StorageReference to an Data object in memory. +/// An Data of the provided max size will be allocated, so ensure that the device has enough free +/// memory to complete the download. For downloading large files, writeToFile may be a better option. +/// @param maxSize The maximum size in bytes to download. If the download exceeds this size, +/// the task will be cancelled and an error will be returned. +/// @param completion A completion block that either returns the object data on success, +/// or an error on failure. +/// @return An StorageDownloadTask that can be used to monitor or manage the download. +- (FIRStorageDownloadTask * _Nonnull)dataWithMaxSize:(int64_t)maxSize completion:(void (^ _Nonnull)(NSData * _Nullable, NSError * _Nullable))completion; +/// Asynchronously retrieves a long lived download URL with a revokable token. +/// This can be used to share the file with others, but can be revoked by a developer +/// in the Firebase Console. +/// @param completion A completion block that either returns the URL on success, +/// or an error on failure. +- (void)downloadURLWithCompletion:(void (^ _Nonnull)(NSURL * _Nullable, NSError * _Nullable))completion; +/// Asynchronously downloads the object at the current path to a specified system filepath. +/// @param fileURL A file system URL representing the path the object should be downloaded to. +/// @return An StorageDownloadTask that can be used to monitor or manage the download. +- (FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL; +/// Asynchronously downloads the object at the current path to a specified system filepath. +/// @param fileURL A file system URL representing the path the object should be downloaded to. +/// @param completion A completion block that fires when the file download completes. +/// Returns an URL pointing to the file path of the downloaded file on success, +/// or an error on failure. +/// @return An StorageDownloadTask that can be used to monitor or manage the download. +- (FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL completion:(void (^ _Nullable)(NSURL * _Nullable, NSError * _Nullable))completion; +/// List all items (files) and prefixes (folders) under this StorageReference. +/// This is a helper method for calling list() repeatedly until there are no more results. +/// Consistency of the result is not guaranteed if objects are inserted or removed while this +/// operation is executing. All results are buffered in memory. +/// listAll(completion:) is only available for projects using Firebase Rules Version 2. +/// @param completion A completion handler that will be invoked with all items and prefixes under +/// the current StorageReference. +- (void)listAllWithCompletion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; +/// List up to maxResults items (files) and prefixes (folders) under this StorageReference. +/// “/” is treated as a path delimiter. Firebase Storage does not support unsupported object +/// paths that end with “/” or contain two consecutive “/“s. All invalid objects in GCS will be +/// filtered. +/// list(maxResults:completion:) is only available for projects using Firebase Rules Version 2. +/// @param maxResults The maximum number of results to return in a single page. Must be greater +/// than 0 and at most 1000. +/// @param completion A completion handler that will be invoked with up to maxResults items and +/// prefixes under the current StorageReference. +- (void)listWithMaxResults:(int64_t)maxResults completion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; +/// Resumes a previous call to list(maxResults:completion:)`, starting after a pagination token. +/// Returns the next set of items (files) and prefixes (folders) under this StorageReference. +/// “/” is treated as a path delimiter. Firebase Storage does not support unsupported object +/// paths that end with “/” or contain two consecutive “/“s. All invalid objects in GCS will be +/// filtered. +/// list(maxResults:pageToken:completion:)is only available for projects using Firebase Rules +/// Version 2. +/// @param maxResults The maximum number of results to return in a single page. Must be greater +/// than 0 and at most 1000. +/// @param pageToken A page token from a previous call to list. +/// @param completion A completion handler that will be invoked with the next items and prefixes +/// under the current StorageReference. +- (void)listWithMaxResults:(int64_t)maxResults pageToken:(NSString * _Nonnull)pageToken completion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; +/// Retrieves metadata associated with an object at the current path. +/// @param completion A completion block which returns the object metadata on success, +/// or an error on failure. +- (void)metadataWithCompletion:(void (^ _Nonnull)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +/// Updates the metadata associated with an object at the current path. +/// @param metadata An StorageMetadata object with the metadata to update. +/// @param completion A completion block which returns the StorageMetadata on success, +/// or an error on failure. +- (void)updateMetadata:(FIRStorageMetadata * _Nonnull)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +/// Deletes the object at the current path. +/// @param completion A completion block which returns nil on success, or an error on failure. +- (void)deleteWithCompletion:(void (^ _Nullable)(NSError * _Nullable))completion; +- (FIRStorageReference * _Nonnull)copy:(struct _NSZone * _Nonnull)zone SWIFT_WARN_UNUSED_RESULT; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +@property (nonatomic, readonly) NSUInteger hash; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + + + + + +@class NSProgress; + +/// StorageTaskSnapshot represents an immutable view of a task. +/// A Snapshot contains a task, storage reference, metadata (if it exists), +/// progress, and an error (if one occurred). +SWIFT_CLASS_NAMED("StorageTaskSnapshot") +@interface FIRStorageTaskSnapshot : NSObject +/// Subclass of StorageTask this snapshot represents. +@property (nonatomic, readonly, strong) FIRStorageTask * _Nonnull task; +/// Metadata returned by the task, or nil if no metadata returned. +@property (nonatomic, readonly, strong) FIRStorageMetadata * _Nullable metadata; +/// StorageReference this task is operates on. +@property (nonatomic, readonly, strong) FIRStorageReference * _Nonnull reference; +/// Progress object which tracks the progress of an upload or download. +@property (nonatomic, readonly, strong) NSProgress * _Nullable progress; +/// Error during task execution, or nil if no error occurred. +@property (nonatomic, readonly) NSError * _Nullable error; +/// Status of the task. +@property (nonatomic, readonly) enum FIRStorageTaskStatus status; +@property (nonatomic, readonly, copy) NSString * _Nonnull description; +- (nonnull instancetype)init SWIFT_UNAVAILABLE; ++ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); +@end + +typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageTaskStatus, "StorageTaskStatus", open) { + FIRStorageTaskStatusUnknown = 0, + FIRStorageTaskStatusResume = 1, + FIRStorageTaskStatusProgress = 2, + FIRStorageTaskStatusPause = 3, + FIRStorageTaskStatusSuccess = 4, + FIRStorageTaskStatusFailure = 5, +}; + + +/// StorageUploadTask implements resumable uploads to a file in Firebase Storage. +/// Uploads can be returned on completion with a completion callback, and can be monitored +/// by attaching observers, or controlled by calling StorageTask#pause, StorageTask#resume, +/// or StorageTask#cancel. +/// Uploads can takeData in memory, or an URL to a file on disk. +/// Uploads are performed on a background queue, and callbacks are raised on the developer +/// specified callbackQueue in Storage, or the main queue if left unspecified. +/// Currently all uploads must be initiated and managed on the main queue. +SWIFT_CLASS_NAMED("StorageUploadTask") +@interface FIRStorageUploadTask : FIRStorageObservableTask +/// Prepares a task and begins execution. +- (void)enqueue; +/// Pauses a task currently in progress. +- (void)pause; +/// Pauses a task currently in progress. +- (void)cancel; +/// Pauses a task currently in progress. +- (void)resume; +@end + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/ios_pod/swift_headers/SwiftProtobuf-Swift.h b/ios_pod/swift_headers/SwiftProtobuf-Swift.h new file mode 100644 index 0000000000..243ef4d7f5 --- /dev/null +++ b/ios_pod/swift_headers/SwiftProtobuf-Swift.h @@ -0,0 +1,215 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +#ifndef SWIFTPROTOBUF_SWIFT_H +#define SWIFTPROTOBUF_SWIFT_H +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wgcc-compat" + +#if !defined(__has_include) +# define __has_include(x) 0 +#endif +#if !defined(__has_attribute) +# define __has_attribute(x) 0 +#endif +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif +#if !defined(__has_warning) +# define __has_warning(x) 0 +#endif + +#if __has_include() +# include +#endif + +#pragma clang diagnostic ignored "-Wauto-import" +#include +#include +#include +#include + +#if !defined(SWIFT_TYPEDEFS) +# define SWIFT_TYPEDEFS 1 +# if __has_include() +# include +# elif !defined(__cplusplus) +typedef uint_least16_t char16_t; +typedef uint_least32_t char32_t; +# endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif + +#if !defined(SWIFT_PASTE) +# define SWIFT_PASTE_HELPER(x, y) x##y +# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#endif +#if !defined(SWIFT_METATYPE) +# define SWIFT_METATYPE(X) Class +#endif +#if !defined(SWIFT_CLASS_PROPERTY) +# if __has_feature(objc_class_property) +# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +# else +# define SWIFT_CLASS_PROPERTY(...) +# endif +#endif + +#if __has_attribute(objc_runtime_name) +# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#else +# define SWIFT_RUNTIME_NAME(X) +#endif +#if __has_attribute(swift_name) +# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#else +# define SWIFT_COMPILE_NAME(X) +#endif +#if __has_attribute(objc_method_family) +# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#else +# define SWIFT_METHOD_FAMILY(X) +#endif +#if __has_attribute(noescape) +# define SWIFT_NOESCAPE __attribute__((noescape)) +#else +# define SWIFT_NOESCAPE +#endif +#if __has_attribute(ns_consumed) +# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#else +# define SWIFT_RELEASES_ARGUMENT +#endif +#if __has_attribute(warn_unused_result) +# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define SWIFT_WARN_UNUSED_RESULT +#endif +#if __has_attribute(noreturn) +# define SWIFT_NORETURN __attribute__((noreturn)) +#else +# define SWIFT_NORETURN +#endif +#if !defined(SWIFT_CLASS_EXTRA) +# define SWIFT_CLASS_EXTRA +#endif +#if !defined(SWIFT_PROTOCOL_EXTRA) +# define SWIFT_PROTOCOL_EXTRA +#endif +#if !defined(SWIFT_ENUM_EXTRA) +# define SWIFT_ENUM_EXTRA +#endif +#if !defined(SWIFT_CLASS) +# if __has_attribute(objc_subclassing_restricted) +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# else +# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +# endif +#endif +#if !defined(SWIFT_RESILIENT_CLASS) +# if __has_attribute(objc_class_stub) +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +# else +# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +# endif +#endif + +#if !defined(SWIFT_PROTOCOL) +# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#endif + +#if !defined(SWIFT_EXTENSION) +# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#endif + +#if !defined(OBJC_DESIGNATED_INITIALIZER) +# if __has_attribute(objc_designated_initializer) +# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +# else +# define OBJC_DESIGNATED_INITIALIZER +# endif +#endif +#if !defined(SWIFT_ENUM_ATTR) +# if defined(__has_attribute) && __has_attribute(enum_extensibility) +# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +# else +# define SWIFT_ENUM_ATTR(_extensibility) +# endif +#endif +#if !defined(SWIFT_ENUM) +# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# if __has_feature(generalized_swift_name) +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +# else +# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) +# endif +#endif +#if !defined(SWIFT_UNAVAILABLE) +# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#endif +#if !defined(SWIFT_UNAVAILABLE_MSG) +# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#endif +#if !defined(SWIFT_AVAILABILITY) +# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#endif +#if !defined(SWIFT_WEAK_IMPORT) +# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#endif +#if !defined(SWIFT_DEPRECATED) +# define SWIFT_DEPRECATED __attribute__((deprecated)) +#endif +#if !defined(SWIFT_DEPRECATED_MSG) +# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#endif +#if __has_feature(attribute_diagnose_if_objc) +# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#else +# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#endif +#if !defined(IBSegueAction) +# define IBSegueAction +#endif +#if __has_feature(modules) +#if __has_warning("-Watimport-in-framework-header") +#pragma clang diagnostic ignored "-Watimport-in-framework-header" +#endif +#endif + +#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" +#pragma clang diagnostic ignored "-Wduplicate-method-arg" +#if __has_warning("-Wpragma-clang-attribute") +# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#endif +#pragma clang diagnostic ignored "-Wunknown-pragmas" +#pragma clang diagnostic ignored "-Wnullability" + +#if __has_attribute(external_source_symbol) +# pragma push_macro("any") +# undef any +# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="SwiftProtobuf",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) +# pragma pop_macro("any") +#endif + +#if __has_attribute(external_source_symbol) +# pragma clang attribute pop +#endif +#pragma clang diagnostic pop +#endif diff --git a/messaging/integration_test/Podfile b/messaging/integration_test/Podfile index f72b4d37f5..3d2fdb3895 100644 --- a/messaging/integration_test/Podfile +++ b/messaging/integration_test/Podfile @@ -1,15 +1,16 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Cloud Messaging test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Messaging', '8.15.0' + pod 'Firebase/Messaging', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Messaging', '8.15.0' + pod 'Firebase/Messaging', '9.0.0' end post_install do |installer| diff --git a/remote_config/integration_test/Podfile b/remote_config/integration_test/Podfile index 3e89202d79..004d17eb09 100644 --- a/remote_config/integration_test/Podfile +++ b/remote_config/integration_test/Podfile @@ -1,15 +1,16 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Remote Config test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/RemoteConfig', '8.15.0' + pod 'Firebase/RemoteConfig', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/RemoteConfig', '8.15.0' + pod 'Firebase/RemoteConfig', '9.0.0' end post_install do |installer| diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 339ffff465..09b14a3529 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -102,6 +102,7 @@ target_include_directories(firebase_storage ${CMAKE_CURRENT_LIST_DIR}/src/include PRIVATE ${FIREBASE_CPP_SDK_ROOT_DIR} + ${FIREBASE_CPP_SDK_ROOT_DIR}/ios_pod/swift_headers ) target_compile_definitions(firebase_storage PRIVATE diff --git a/storage/integration_test/Podfile b/storage/integration_test/Podfile index 54cc6323b2..c6d4871a3b 100644 --- a/storage/integration_test/Podfile +++ b/storage/integration_test/Podfile @@ -1,17 +1,18 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Storage for Firebase test application. use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Storage', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Storage', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Storage', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Storage', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| diff --git a/storage/src/ios/controller_ios.h b/storage/src/ios/controller_ios.h index de420d6e6c..89d24cef31 100644 --- a/storage/src/ios/controller_ios.h +++ b/storage/src/ios/controller_ios.h @@ -22,11 +22,7 @@ #include "storage/src/ios/storage_reference_ios.h" #ifdef __OBJC__ -#import "FIRStorage.h" -#import "FIRStorageDownloadTask.h" -#import "FIRStorageTask.h" -#import "FIRStorageTaskSnapshot.h" -#import "FIRStorageUploadTask.h" +#import "FirebaseStorage-Swift.h" #endif // __OBJC__ namespace firebase { diff --git a/storage/src/ios/controller_ios.mm b/storage/src/ios/controller_ios.mm index 32085f7d02..08b06e6649 100644 --- a/storage/src/ios/controller_ios.mm +++ b/storage/src/ios/controller_ios.mm @@ -14,11 +14,7 @@ #include "storage/src/ios/controller_ios.h" -#import "FIRStorage.h" -#import "FIRStorageDownloadTask.h" -#import "FIRStorageTask.h" -#import "FIRStorageTaskSnapshot.h" -#import "FIRStorageUploadTask.h" +#import "FirebaseStorage-Swift.h" #include "app/src/util_ios.h" diff --git a/storage/src/ios/listener_ios.h b/storage/src/ios/listener_ios.h index 697bb47ae4..4312ebc57d 100644 --- a/storage/src/ios/listener_ios.h +++ b/storage/src/ios/listener_ios.h @@ -22,9 +22,7 @@ #include "storage/src/ios/storage_reference_ios.h" #ifdef __OBJC__ -#import "FIRStorageConstants.h" -#import "FIRStorageObservableTask.h" -#import "FIRStorageTask.h" +#import "FirebaseStorage-Swift.h" // Obj-C object that provides a handle to ListenerInternal. This is used to // synchronize callbacks from blocks with the potential destruction of the diff --git a/storage/src/ios/metadata_ios.h b/storage/src/ios/metadata_ios.h index db36b7f20b..bfb815acd1 100644 --- a/storage/src/ios/metadata_ios.h +++ b/storage/src/ios/metadata_ios.h @@ -24,8 +24,7 @@ #include "storage/src/ios/storage_reference_ios.h" #ifdef __OBJC__ -#import "FIRStorage.h" -#import "FIRStorageMetadata.h" +#import "FirebaseStorage-Swift.h" #endif // __OBJC__ namespace firebase { diff --git a/storage/src/ios/metadata_ios.mm b/storage/src/ios/metadata_ios.mm index 84a1d02e67..5296728afe 100644 --- a/storage/src/ios/metadata_ios.mm +++ b/storage/src/ios/metadata_ios.mm @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "FIRStorageMetadata.h" +#import "FirebaseStorage-Swift.h" #import diff --git a/storage/src/ios/storage_ios.h b/storage/src/ios/storage_ios.h index 3420181d9e..0629d24185 100644 --- a/storage/src/ios/storage_ios.h +++ b/storage/src/ios/storage_ios.h @@ -29,10 +29,21 @@ #include "storage/src/include/firebase/storage/storage_reference.h" #ifdef __OBJC__ -#import "FIRStorage.h" +#import "FirebaseStorage-Swift.h" #import "GTMSessionFetcher.h" #import "GTMSessionFetcherService.h" +// Some missing typedefs not included in Swift header. +typedef NSString *FIRStorageHandle; +typedef void (^FIRStorageVoidDataError)(NSData *_Nullable, NSError *_Nullable); +typedef void (^FIRStorageVoidError)(NSError *_Nullable); +typedef void (^FIRStorageVoidMetadata)(FIRStorageMetadata *_Nullable); +typedef void (^FIRStorageVoidMetadataError)(FIRStorageMetadata *_Nullable, + NSError *_Nullable); +typedef void (^FIRStorageVoidSnapshot)(FIRStorageTaskSnapshot *_Nonnull); +typedef void (^FIRStorageVoidURLError)(NSURL *_Nullable, NSError *_Nullable); +FOUNDATION_EXPORT NSString *const FIRStorageErrorDomain NS_SWIFT_NAME(StorageErrorDomain); + // GTMSessionFetcherService implementation that yields a // FIRCPPGTMSessionFetcher class rather than the default implementation. // This makes it possible to customize the behavior of diff --git a/storage/src/ios/storage_ios.mm b/storage/src/ios/storage_ios.mm index 13a107a992..30378e587d 100644 --- a/storage/src/ios/storage_ios.mm +++ b/storage/src/ios/storage_ios.mm @@ -21,7 +21,7 @@ #include "app/src/reference_counted_future_impl.h" #include "storage/src/ios/storage_reference_ios.h" -#import "FIRStorageReference.h" +#import "FirebaseStorage-Swift.h" #import "GTMSessionFetcher.h" #import "GTMSessionFetcherService.h" diff --git a/storage/src/ios/storage_reference_ios.h b/storage/src/ios/storage_reference_ios.h index 31dc010e85..03e3327946 100644 --- a/storage/src/ios/storage_reference_ios.h +++ b/storage/src/ios/storage_reference_ios.h @@ -23,9 +23,10 @@ #include "storage/src/ios/storage_ios.h" #ifdef __OBJC__ -#import "FIRStorage.h" -#import "FIRStorageConstants.h" -#import "FIRStorageObservableTask.h" +#import "FirebaseStorage-Swift.h" + +// typedef not included in Swift header. +typedef void (^FIRStorageVoidDataError)(NSData *_Nullable, NSError *_Nullable); #endif // __OBJC__ namespace firebase { diff --git a/storage/src/ios/storage_reference_ios.mm b/storage/src/ios/storage_reference_ios.mm index 8074d09422..fc14e55c30 100644 --- a/storage/src/ios/storage_reference_ios.mm +++ b/storage/src/ios/storage_reference_ios.mm @@ -14,12 +14,7 @@ #include "storage/src/ios/storage_reference_ios.h" -#import "FIRStorage.h" -#import "FIRStorageConstants.h" -#import "FIRStorageDownloadTask.h" -#import "FIRStorageReference.h" -#import "FIRStorageTaskSnapshot.h" -#import "FIRStorageUploadTask.h" +#import "FirebaseStorage-Swift.h" #include "app/src/util_ios.h" #include "storage/src/common/common_internal.h" diff --git a/storage/src/ios/util_ios.mm b/storage/src/ios/util_ios.mm index ab63ced875..c7ad78ee09 100644 --- a/storage/src/ios/util_ios.mm +++ b/storage/src/ios/util_ios.mm @@ -14,7 +14,7 @@ #import -#import "FIRStorage.h" +#import "FirebaseStorage-Swift.h" #include "storage/src/include/firebase/storage/common.h" #include "storage/src/ios/util_ios.h" From fc1e5fe5b536b81c82b6e5201ca6cf638f6991eb Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 11:48:50 -0700 Subject: [PATCH 21/93] Remove streaming support, as it fails with the new Swift SDK. --- storage/CMakeLists.txt | 3 - storage/src/ios/storage_ios.h | 46 +------ storage/src/ios/storage_ios.mm | 41 +----- storage/src/ios/storage_reference_ios.h | 6 - storage/src/ios/storage_reference_ios.mm | 156 ++--------------------- 5 files changed, 11 insertions(+), 241 deletions(-) diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 09b14a3529..e2fd88e72f 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -125,12 +125,9 @@ elseif(IOS) target_link_libraries(firebase_storage PUBLIC "-fembed-bitcode") - # Include GTMSessionFetcher which uses the private directory. setup_pod_headers( firebase_storage - INCLUDE_PRIVATE_HEADERS POD_NAMES - GTMSessionFetcher FirebaseCore FirebaseStorage ) diff --git a/storage/src/ios/storage_ios.h b/storage/src/ios/storage_ios.h index 0629d24185..b301601506 100644 --- a/storage/src/ios/storage_ios.h +++ b/storage/src/ios/storage_ios.h @@ -29,9 +29,8 @@ #include "storage/src/include/firebase/storage/storage_reference.h" #ifdef __OBJC__ + #import "FirebaseStorage-Swift.h" -#import "GTMSessionFetcher.h" -#import "GTMSessionFetcherService.h" // Some missing typedefs not included in Swift header. typedef NSString *FIRStorageHandle; @@ -44,34 +43,6 @@ typedef void (^FIRStorageVoidSnapshot)(FIRStorageTaskSnapshot *_Nonnull); typedef void (^FIRStorageVoidURLError)(NSURL *_Nullable, NSError *_Nullable); FOUNDATION_EXPORT NSString *const FIRStorageErrorDomain NS_SWIFT_NAME(StorageErrorDomain); -// GTMSessionFetcherService implementation that yields a -// FIRCPPGTMSessionFetcher class rather than the default implementation. -// This makes it possible to customize the behavior of -// GTMSessionFetcher before a fetch operation is started. -@interface FIRCPPGTMSessionFetcherService : GTMSessionFetcherService - -// If set, assigned to FIRCPPGTMSessionFetcher.accumulateDataBlock on -// FIRCPPGTMSessionFetcher:beginFetchWithCompletionHandler. -// This allows the handler of this event to stream received into a buffer or -// to the application. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherAccumulateDataBlock accumulateDataBlock; - -// Returns FIRCPPGTMSessionFetch as the fetcher class so that it's possible to -// override properties on instances created from the class before the fetch -// operation is started. -- (id _Nonnull)fetcherWithRequest:(NSURLRequest* _Nonnull)request - fetcherClass:(Class _Nonnull)fetcherClass; -@end - -// GTMSessionFetcher implementation that streams via a C/C++ callback. -// See FIRCPPGTMSessionFetcherService.accumulateDataBlock. -@interface FIRCPPGTMSessionFetcher : GTMSessionFetcher - -// Override the fetch method so that it's possible to customize fetch options. -// Specifically, if service.accumulateDataBlock is set it overrides the -// fetcher's accumulateDataBlock property. -- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler; -@end #endif // __OBJC__ namespace firebase { @@ -81,9 +52,6 @@ namespace internal { // This defines the class FIRStoragePointer, which is a C++-compatible wrapper // around the FIRStorage Obj-C class. OBJ_C_PTR_WRAPPER(FIRStorage); -// This defines the class FIRCPPGTMSessionFetcherPointer, which is a -// C++-compatible wrapper around the FIRCPPGTMSessionFetcherPointer Obj-C class. -OBJ_C_PTR_WRAPPER(FIRCPPGTMSessionFetcherService); class StorageInternal { public: @@ -133,16 +101,6 @@ class StorageInternal { // objects. CleanupNotifier& cleanup() { return cleanup_; } -#ifdef __OBJC__ - // Get the session fetcher for streaming. - FIRCPPGTMSessionFetcherService* _Nonnull session_fetcher_service() const { - return session_fetcher_service_->get(); - } -#endif // __OBJC__ - - // Get the dispatch queue for streaming. - dispatch_queue_t _Nullable dispatch_queue() const; - private: #ifdef __OBJC__ FIRStorage* _Nullable impl() const { return impl_->get(); } @@ -152,8 +110,6 @@ class StorageInternal { // Object lifetime managed by Objective C ARC. UniquePtr impl_; - // Object lifetime managed by Objective C ARC. - UniquePtr session_fetcher_service_; FutureManager future_manager_; diff --git a/storage/src/ios/storage_ios.mm b/storage/src/ios/storage_ios.mm index 30378e587d..5e4fd79bd7 100644 --- a/storage/src/ios/storage_ios.mm +++ b/storage/src/ios/storage_ios.mm @@ -22,35 +22,6 @@ #include "storage/src/ios/storage_reference_ios.h" #import "FirebaseStorage-Swift.h" -#import "GTMSessionFetcher.h" -#import "GTMSessionFetcherService.h" - -// WARNING: Private methods in FIRStorage. -@interface FIRStorage () -// Expose property to retrieve the fetcher service. This allows StorageInternal to create a -// session fetcher service for streaming based upon the settings of the default service. -@property(strong, nonatomic) GTMSessionFetcherService* fetcherServiceForApp; -// Expose property to retrieve the dispatch queue. This allows StorageReferenceInternal to create a -// download task to stream data into a buffer. -@property(nonatomic, readonly) dispatch_queue_t dispatchQueue; -@end - -@implementation FIRCPPGTMSessionFetcher -- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler { - GTMSessionFetcherAccumulateDataBlock replacementAccumulateBlock = - ((FIRCPPGTMSessionFetcherService*)[super service]).accumulateDataBlock; - if (replacementAccumulateBlock != nil) { - super.accumulateDataBlock = replacementAccumulateBlock; - } - [super beginFetchWithCompletionHandler:handler]; -} -@end - -@implementation FIRCPPGTMSessionFetcherService -- (id)fetcherWithRequest:(NSURLRequest*)request fetcherClass:(Class)fetcherClass { - return [super fetcherWithRequest:request fetcherClass:[FIRCPPGTMSessionFetcher class]]; -} -@end namespace firebase { namespace storage { @@ -58,8 +29,7 @@ - (id)fetcherWithRequest:(NSURLRequest*)request fetcherClass:(Class)fetcherClass StorageInternal::StorageInternal(App* app, const char* url) : app_(app), - impl_(new FIRStoragePointer(nil)), - session_fetcher_service_(new FIRCPPGTMSessionFetcherServicePointer(nil)) { + impl_(new FIRStoragePointer(nil)) { url_ = url ? url : ""; FIRApp* platform_app = app->GetPlatformApp(); if (url_.empty()) { @@ -74,13 +44,6 @@ - (id)fetcherWithRequest:(NSURLRequest*)request fetcherClass:(Class)fetcherClass return; } } - - GTMSessionFetcherService* default_session_fetcher_service = impl().fetcherServiceForApp; - session_fetcher_service_.reset( - new FIRCPPGTMSessionFetcherServicePointer([[FIRCPPGTMSessionFetcherService alloc] init])); - session_fetcher_service().retryEnabled = default_session_fetcher_service.retryEnabled; - session_fetcher_service().retryBlock = default_session_fetcher_service.retryBlock; - session_fetcher_service().authorizer = default_session_fetcher_service.authorizer; } StorageInternal::~StorageInternal() { @@ -137,8 +100,6 @@ - (id)fetcherWithRequest:(NSURLRequest*)request fetcherClass:(Class)fetcherClass // Whether this object was successfully initialized by the constructor. bool StorageInternal::initialized() const { return impl() != nil; } -dispatch_queue_t _Nullable StorageInternal::dispatch_queue() const { return impl().dispatchQueue; } - } // namespace internal } // namespace storage } // namespace firebase diff --git a/storage/src/ios/storage_reference_ios.h b/storage/src/ios/storage_reference_ios.h index 03e3327946..ebbf66155e 100644 --- a/storage/src/ios/storage_reference_ios.h +++ b/storage/src/ios/storage_reference_ios.h @@ -169,12 +169,6 @@ class StorageReferenceInternal { FIRStorageObservableTask* _Nonnull task, Listener* _Nullable listener, StorageInternal* _Nullable storage); - // Create a download task that will stream data into the specified buffer. - FIRStorageDownloadTask* _Nonnull CreateStreamingDownloadTask( - FIRStorageReference* _Nonnull impl, StorageInternal* _Nonnull storage, - FIRStorageVoidDataError _Nonnull completion, void* _Nonnull buffer, - size_t buffer_size); - FIRStorageReference* _Nullable impl() const { return impl_->get(); } #endif // __OBJC__ diff --git a/storage/src/ios/storage_reference_ios.mm b/storage/src/ios/storage_reference_ios.mm index fc14e55c30..41b60cd050 100644 --- a/storage/src/ios/storage_reference_ios.mm +++ b/storage/src/ios/storage_reference_ios.mm @@ -28,44 +28,6 @@ #include "storage/src/ios/storage_ios.h" #include "storage/src/ios/util_ios.h" -@interface FIRStorageDownloadTask () -// WARNING: This exposes the private fetcher property in FIRStorageDownloadTask so that it's -// possible to stop fetching prematurely without signalling an error. -@property(strong, atomic) GTMSessionFetcher* fetcher; - -// WARNING: Expose private init method so that it's possible to customize the fetcher's behavior. -- (instancetype)initWithReference:(FIRStorageReference*)reference - fetcherService:(GTMSessionFetcherService*)service - dispatchQueue:(dispatch_queue_t)queue - file:(nullable NSURL*)fileURL; -@end - -// Streaming download task. -@interface FIRCPPStorageDownloadTask : FIRStorageDownloadTask -// Buffer to used to aggregate downloaded data. -@property(nonatomic, nullable) void* buffer; -// Size of the block of memory referenced by "buffer". -@property(nonatomic) size_t bufferSize; -// Write offset into "buffer". -@property(nonatomic) size_t bufferDownloadOffset; -// Progress block copied from the fetcher. -// fetcher.receivedProgressBlock can be invalidated before it's required by the streaming block -// so it is cached here. -@property(strong, atomic) GTMSessionFetcherReceivedProgressBlock receivedProgressBlock; -@end - -@implementation FIRCPPStorageDownloadTask -// TODO(b/120283849) Find a more stable fix for this issue. -// When we set up our Download Task, we set a state on the session fetcher service, enqueue the -// task, then clear the state. Enqueuing the task now by default happens asynchronously, which -// means the fetcher service state has already been cleared, so to work around that, we change -// dispatchAsync to just execute the block immediately, as it used to do prior to the queue logic. -// The underlying change: https://github.com/firebase/firebase-ios-sdk/pull/1981 -- (void)dispatchAsync:(void (^)(void))block { - block(); -} -@end - namespace firebase { namespace storage { namespace internal { @@ -202,105 +164,6 @@ - (void)dispatchAsync:(void (^)(void))block { return static_cast&>(future()->LastResult(kStorageReferenceFnGetFile)); } -FIRStorageDownloadTask* StorageReferenceInternal::CreateStreamingDownloadTask( - FIRStorageReference* impl, StorageInternal* storage, FIRStorageVoidDataError completion, - void* buffer, size_t buffer_size) { - FIRCPPGTMSessionFetcherService* session_fetcher_service = storage->session_fetcher_service(); - FIRCPPStorageDownloadTask* task = - [[FIRCPPStorageDownloadTask alloc] initWithReference:impl - fetcherService:session_fetcher_service - dispatchQueue:storage->dispatch_queue() - file:nil]; - task.buffer = buffer; - task.bufferSize = buffer_size; - dispatch_queue_t callbackQueue = session_fetcher_service.callbackQueue; - if (!callbackQueue) callbackQueue = dispatch_get_main_queue(); - - // Connect events for download task success / failure to the completion callback. - [task observeStatus:FIRStorageTaskStatusSuccess - handler:^(FIRStorageTaskSnapshot* _Nonnull snapshot) { - dispatch_async(callbackQueue, ^{ - completion([NSData dataWithBytesNoCopy:buffer - length:task.bufferDownloadOffset - freeWhenDone:NO], - nil); - }); - }]; - [task observeStatus:FIRStorageTaskStatusFailure - handler:^(FIRStorageTaskSnapshot* _Nonnull snapshot) { - dispatch_async(callbackQueue, ^{ - completion(nil, snapshot.error); - }); - }]; - - GTMSessionFetcherAccumulateDataBlock accumulate_data_block = ^( - NSData* GTM_NULLABLE_TYPE received_buffer) { - if (received_buffer) { - if (task.bufferDownloadOffset == task.bufferSize) { - return; - } - - // NSData can reference non-contiguous memory so copy each data range from the object. - size_t previousDownloadOffset = task.bufferDownloadOffset; - [received_buffer enumerateByteRangesUsingBlock:^(const void* data_bytes, - NSRange data_byte_range, BOOL* stop) { - size_t space_remaining = task.bufferSize - task.bufferDownloadOffset; - size_t data_byte_range_size = data_byte_range.length; - size_t copy_size; - if (data_byte_range_size < space_remaining) { - copy_size = data_byte_range_size; - } else { - copy_size = space_remaining; - *stop = YES; - } - if (copy_size) { - void* target_buffer = static_cast(task.buffer) + task.bufferDownloadOffset; - memcpy(target_buffer, data_bytes, copy_size); - task.bufferDownloadOffset += copy_size; - } - }]; - - // When an accumulation block is configured, progress updates are not provided from - // GTMSessionFetcher so manually notify FIRStorageDownloadTask of download progress. - GTMSessionFetcherReceivedProgressBlock progressBlock = task.receivedProgressBlock; - if (progressBlock != nil) { - dispatch_async(callbackQueue, ^{ - progressBlock(task.bufferDownloadOffset - previousDownloadOffset, - task.bufferDownloadOffset); - }); - } - - // If the buffer is now full, stop downloading. - if (task.bufferSize == task.bufferDownloadOffset) { - [task.fetcher stopFetching]; - dispatch_async(callbackQueue, ^{ - // NOTE: We can allocate NSData without copying the input buffer as we know that - // the receiver of this callback (future completion) does not mutate the NSData object. - completion( - [NSData dataWithBytesNoCopy:buffer length:task.bufferDownloadOffset freeWhenDone:NO], - nil); - // Remove the reference to this block. - task.fetcher.accumulateDataBlock = nil; - }); - } - } else { - completion(nil, [NSError errorWithDomain:FIRStorageErrorDomain - code:FIRStorageErrorCodeUnknown - userInfo:nil]); - } - }; - - util::DispatchAsyncSafeMainQueue(^() { - @synchronized(session_fetcher_service) { - session_fetcher_service.accumulateDataBlock = accumulate_data_block; - [task enqueue]; - session_fetcher_service.accumulateDataBlock = nil; - task.receivedProgressBlock = task.fetcher.receivedProgressBlock; - } - }); - return task; -} - Future StorageReferenceInternal::GetBytes(void* buffer, size_t buffer_size, Listener* listener, Controller* controller_out) { ReferenceCountedFutureImpl* future_impl = future(); @@ -315,6 +178,7 @@ - (void)dispatchAsync:(void (^)(void))block { const char* error_string = GetErrorMessage(error_code); if (data != nil) { assert(data.length <= buffer_size); + memcpy(buffer, data.bytes, data.length); future_impl->CompleteWithResult(handle, error_code, error_string, static_cast(data.length)); } else { @@ -330,16 +194,14 @@ - (void)dispatchAsync:(void (^)(void))block { FIRStorageReference* my_impl = impl(); StorageInternal* storage = storage_; util::DispatchAsyncSafeMainQueue(^() { - // TODO(smiles): Add streaming callback so that the user can actually stream data rather - // than providing the entire buffer to upload. - FIRStorageDownloadTask* download_task = - CreateStreamingDownloadTask(my_impl, storage, completion, buffer, buffer_size); - if (listener) listener->impl_->AttachTask(storage, download_task); - if (controller_out) { - controller_out->internal_->set_pending_valid(false); - controller_out->internal_->AssignTask(storage, download_task); - } - }); + FIRStorageDownloadTask *download_task = [my_impl dataWithMaxSize:buffer_size + completion:completion]; + if (listener) listener->impl_->AttachTask(storage, download_task); + if (controller_out) { + controller_out->internal_->AssignTask(storage, download_task); + controller_out->internal_->set_pending_valid(false); + } + }); return GetBytesLastResult(); } From 96e26beb0ec5cdd0f1dd65b083afb56329d023f8 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 12:30:22 -0700 Subject: [PATCH 22/93] Enable Firestore and Admob. --- CMakeLists.txt | 8 ++++---- build_scripts/ios/build.sh | 2 +- cmake/external/firestore.cmake | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f4266a152..5d3410f251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ option(FIREBASE_INCLUDE_LIBRARY_DEFAULT "Should each library be included by default." ON) # Different options to enable/disable each library being included during # configuration. -option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." OFF) -# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) +option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_ANALYTICS "Include the Google Analytics for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) @@ -41,8 +41,8 @@ option(FIREBASE_INCLUDE_DYNAMIC_LINKS "Include the Firebase Dynamic Links library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FIRESTORE - "Include the Cloud Firestore library." OFF) -# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) + "Include the Cloud Firestore library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_FUNCTIONS "Include the Cloud Functions for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) diff --git a/build_scripts/ios/build.sh b/build_scripts/ios/build.sh index 0ac71db2c4..56061317f2 100755 --- a/build_scripts/ios/build.sh +++ b/build_scripts/ios/build.sh @@ -27,7 +27,7 @@ readonly SUPPORTED_PLATFORMS=(device simulator) readonly SUPPORTED_ARCHITECTURES=(arm64 armv7 x86_64 i386) readonly DEVICE_ARCHITECTURES=(arm64 armv7) readonly SIMULATOR_ARCHITECTURES=(arm64 x86_64 i386) -readonly SUPPORTED_TARGETS=(firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) +readonly SUPPORTED_TARGETS=(firebase_admob firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) # build default value buildpath="ios_build" diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 9c46bdaf16..c54e38321e 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -20,7 +20,7 @@ endif() # If the format of the line below changes, then be sure to update # https://github.com/firebase/firebase-cpp-sdk/blob/fd054fa016/.github/workflows/update-dependencies.yml#L81 -set(version CocoaPods-8.15.0) +set(version CocoaPods-9.0.0-nightly) function(GetReleasedDep) message("Getting released firebase-ios-sdk @ ${version}") From 33b232dffd3bdea8d02c2ae5acbd439c05ad6c4c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 12:47:52 -0700 Subject: [PATCH 23/93] Remove AdMob for now - it's broken in 7.69.0-cppsdk. --- build_scripts/ios/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_scripts/ios/build.sh b/build_scripts/ios/build.sh index 56061317f2..57c0426916 100755 --- a/build_scripts/ios/build.sh +++ b/build_scripts/ios/build.sh @@ -27,7 +27,7 @@ readonly SUPPORTED_PLATFORMS=(device simulator) readonly SUPPORTED_ARCHITECTURES=(arm64 armv7 x86_64 i386) readonly DEVICE_ARCHITECTURES=(arm64 armv7) readonly SIMULATOR_ARCHITECTURES=(arm64 x86_64 i386) -readonly SUPPORTED_TARGETS=(firebase_admob firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) +readonly SUPPORTED_TARGETS=(firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) # build default value buildpath="ios_build" From 29deb4a1534855eb9801a97971cad0e1088b4387 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 12:56:08 -0700 Subject: [PATCH 24/93] Don't process swift headers if already processed --- .github/workflows/update-dependencies.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 036845919e..55248e895a 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -136,7 +136,9 @@ jobs: copyright_line="// Copyright $(date +%Y) Google LLC\n" # Add a note to each file about its source. for ios_header in ios_pod/swift_headers/*.h; do - sed -i~ "s|^/// @file|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n/// @file|" "${ios_header}" + if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then + sed -i~ "s|^/// @file|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n/// @file|" "${ios_header}" + fi python ../../scripts/format_code.py --f "${ios_header}" done rm -rf ${ziptmp} From 7113be352e8c637ee453371b88b7eee44b79345b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:02:36 -0700 Subject: [PATCH 25/93] fix nightly version tag --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index c54e38321e..7b67544c56 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -20,7 +20,7 @@ endif() # If the format of the line below changes, then be sure to update # https://github.com/firebase/firebase-cpp-sdk/blob/fd054fa016/.github/workflows/update-dependencies.yml#L81 -set(version CocoaPods-9.0.0-nightly) +set(version CocoaPods-9.0.0.nightly) function(GetReleasedDep) message("Getting released firebase-ios-sdk @ ${version}") From b5be326afa4bf22e580db5a2a29d09172166af2a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:16:52 -0700 Subject: [PATCH 26/93] Fix update dependencies script --- .github/workflows/update-dependencies.yml | 12 +- .../FirebaseAnalyticsSwift-Swift.h | 220 +++++---- .../FirebaseCoreInternal-Swift.h | 221 +++++---- .../FirebaseDatabaseSwift-Swift.h | 223 +++++---- .../FirebaseFirestoreSwift-Swift.h | 236 ++++----- .../swift_headers/FirebaseFunctions-Swift.h | 339 +++++++------ .../FirebaseInAppMessagingSwift-Swift.h | 220 +++++---- .../FirebaseMLModelDownloader-Swift.h | 222 +++++---- .../FirebaseRemoteConfigSwift-Swift.h | 223 +++++---- .../swift_headers/FirebaseSharedSwift-Swift.h | 220 +++++---- ios_pod/swift_headers/FirebaseStorage-Swift.h | 467 +++++++++--------- ios_pod/swift_headers/SwiftProtobuf-Swift.h | 220 +++++---- 12 files changed, 1525 insertions(+), 1298 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 55248e895a..1de1f72f55 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -123,23 +123,23 @@ jobs: rm -rf "${podtmp}" fi - // Download the zip distribution and get the Swift header files. + # Download the zip distribution and get the Swift header files. core_version=$(grep "pod 'Firebase/Core'" ios_pod/Podfile | sed "s/.*'\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)'.*/\1/") echo "Getting Swift header files from Firebase iOS SDK ${core_version} zip distribution" ziptmp="$(mktemp -d)" - curl https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip -o ${ziptmp}/Firebase.zip - cd ${ziptmp} + curl "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}"/Firebase.zip + cd "${ziptmp}" unzip -q Firebase.zip cd - - // Copy all *-Swift.h header files into ios_pod/swift_headers/ - find ${ziptmp} -name '*-Swift.h' | xargs -n 1 -j REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ + # Copy all *-Swift.h header files into ios_pod/swift_headers/ + find "${ziptmp}" -name '*-Swift.h' | xargs -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ copyright_line="// Copyright $(date +%Y) Google LLC\n" # Add a note to each file about its source. for ios_header in ios_pod/swift_headers/*.h; do if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then sed -i~ "s|^/// @file|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n/// @file|" "${ios_header}" fi - python ../../scripts/format_code.py --f "${ios_header}" + python scripts/format_code.py --f "${ios_header}" done rm -rf ${ziptmp} diff --git a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h index e4e74d2e01..5f11d8786a 100644 --- a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEANALYTICSSWIFT_SWIFT_H #define FIREBASEANALYTICSSWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,20 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseAnalyticsSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseAnalyticsSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h index 341833df08..bbadcab97c 100644 --- a/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h +++ b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h @@ -8,184 +8,192 @@ #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -197,19 +205,21 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseCoreInternal",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", defined_in = "FirebaseCoreInternal", \ + generated_declaration))), \ + apply_to = any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif - @class NSString; @class FIRHeartbeatsPayload; @@ -219,20 +229,20 @@ SWIFT_CLASS_NAMED("_ObjC_HeartbeatController") /// Public initializer. /// \param id The id to associate this controller’s heartbeat storage with. /// -- (nonnull instancetype)initWithId:(NSString * _Nonnull)id OBJC_DESIGNATED_INITIALIZER; +- (nonnull instancetype)initWithId:(NSString* _Nonnull)id OBJC_DESIGNATED_INITIALIZER; /// Asynchronously logs a new heartbeat, if needed. /// note: /// This API is thread-safe. /// \param agent The string agent (i.e. Firebase User Agent) to associate the logged heartbeat with. /// -- (void)log:(NSString * _Nonnull)agent; +- (void)log:(NSString* _Nonnull)agent; /// Synchronously flushes heartbeats from storage into a heartbeats payload. /// note: /// This API is thread-safe. /// /// returns: /// A heartbeats payload for the flushed heartbeat(s). -- (FIRHeartbeatsPayload * _Nonnull)flush SWIFT_WARN_UNUSED_RESULT; +- (FIRHeartbeatsPayload* _Nonnull)flush SWIFT_WARN_UNUSED_RESULT; /// Synchronously flushes the heartbeat for today. /// If no heartbeat was logged today, the returned payload is empty. /// note: @@ -240,29 +250,30 @@ SWIFT_CLASS_NAMED("_ObjC_HeartbeatController") /// /// returns: /// A heartbeats payload for the flushed heartbeat. -- (FIRHeartbeatsPayload * _Nonnull)flushHeartbeatFromToday SWIFT_WARN_UNUSED_RESULT; +- (FIRHeartbeatsPayload* _Nonnull)flushHeartbeatFromToday SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @class NSNumber; -/// A model object representing a payload of heartbeat data intended for sending in network requests. +/// A model object representing a payload of heartbeat data intended for sending in network +/// requests. SWIFT_CLASS_NAMED("_ObjC_HeartbeatsPayload") @interface FIRHeartbeatsPayload : NSObject /// Returns a processed payload string intended for use in a HTTP header. /// /// returns: /// A string value from the heartbeats payload. -- (NSString * _Nonnull)headerValue SWIFT_WARN_UNUSED_RESULT; +- (NSString* _Nonnull)headerValue SWIFT_WARN_UNUSED_RESULT; /// A Boolean value indicating whether the payload is empty. -@property (nonatomic, readonly) BOOL isEmpty; +@property(nonatomic, readonly) BOOL isEmpty; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h index eea2480795..8df320a8f4 100644 --- a/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEDATABASESWIFT_SWIFT_H #define FIREBASEDATABASESWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,23 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseDatabaseSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseDatabaseSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif - - - #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h index c0d44f4ec9..8a290214b2 100644 --- a/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEFIRESTORESWIFT_SWIFT_H #define FIREBASEFIRESTORESWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,36 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseFirestoreSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseFirestoreSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif - - - - - - - - - - - - - - - - #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseFunctions-Swift.h b/ios_pod/swift_headers/FirebaseFunctions-Swift.h index 99767ab43a..3c9c6a1736 100644 --- a/ios_pod/swift_headers/FirebaseFunctions-Swift.h +++ b/ios_pod/swift_headers/FirebaseFunctions-Swift.h @@ -8,184 +8,192 @@ #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -198,16 +206,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseFunctions",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", defined_in = "FirebaseFunctions", \ + generated_declaration))), \ + apply_to = any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif @class FIRApp; @@ -220,37 +231,41 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); SWIFT_CLASS_NAMED("Functions") @interface FIRFunctions : NSObject /// Creates a Cloud Functions client or returns a pre-existing instance if it already exists. -+ (FIRFunctions * _Nonnull)functions SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functions SWIFT_WARN_UNUSED_RESULT; /// Creates a Cloud Functions client with the given app, or returns a pre-existing /// instance if one already exists. /// @param app The app for the Firebase project. -+ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functionsForApp:(FIRApp* _Nonnull)app SWIFT_WARN_UNUSED_RESULT; /// Creates a Cloud Functions client with the default app and given region. /// @param region The region for the http trigger, such as “us-central1”. -+ (FIRFunctions * _Nonnull)functionsForRegion:(NSString * _Nonnull)region SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functionsForRegion:(NSString* _Nonnull)region SWIFT_WARN_UNUSED_RESULT; /// Creates a Cloud Functions client with the given app and region, or returns a pre-existing /// instance if one already exists. /// @param customDomain A custom domain for the http trigger, such as “https://mydomain.com”. -+ (FIRFunctions * _Nonnull)functionsForCustomDomain:(NSString * _Nonnull)customDomain SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functionsForCustomDomain:(NSString* _Nonnull)customDomain + SWIFT_WARN_UNUSED_RESULT; /// Creates a Cloud Functions client with the given app and region, or returns a pre-existing /// instance if one already exists. /// @param app The app for the Firebase project. /// @param region The region for the http trigger, such as “us-central1”. -+ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app region:(NSString * _Nonnull)region SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functionsForApp:(FIRApp* _Nonnull)app + region:(NSString* _Nonnull)region SWIFT_WARN_UNUSED_RESULT; /// Creates a Cloud Functions client with the given app and region, or returns a pre-existing /// instance if one already exists. /// @param app The app for the Firebase project. /// @param customDomain A custom domain for the http trigger, such as “https://mydomain.com”. -+ (FIRFunctions * _Nonnull)functionsForApp:(FIRApp * _Nonnull)app customDomain:(NSString * _Nonnull)customDomain SWIFT_WARN_UNUSED_RESULT; ++ (FIRFunctions* _Nonnull)functionsForApp:(FIRApp* _Nonnull)app + customDomain:(NSString* _Nonnull)customDomain SWIFT_WARN_UNUSED_RESULT; /// Creates a reference to the Callable HTTPS trigger with the given name. /// @param name The name of the Callable HTTPS trigger. -- (FIRHTTPSCallable * _Nonnull)HTTPSCallableWithName:(NSString * _Nonnull)name SWIFT_WARN_UNUSED_RESULT; -- (FIRHTTPSCallable * _Nonnull)HTTPSCallableWithURL:(NSURL * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; +- (FIRHTTPSCallable* _Nonnull)HTTPSCallableWithName:(NSString* _Nonnull)name + SWIFT_WARN_UNUSED_RESULT; +- (FIRHTTPSCallable* _Nonnull)HTTPSCallableWithURL:(NSURL* _Nonnull)url SWIFT_WARN_UNUSED_RESULT; /// Changes this instance to point to a Cloud Functions emulator running locally. /// See https://firebase.google.com/docs/functions/local-emulator /// @param host The host of the local emulator, such as “localhost”. /// @param port The port of the local emulator, for example 5005. -- (void)useEmulatorWithHost:(NSString * _Nonnull)host port:(NSInteger)port; +- (void)useEmulatorWithHost:(NSString* _Nonnull)host port:(NSInteger)port; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @@ -258,59 +273,65 @@ SWIFT_CLASS_NAMED("Functions") /// The set of error status codes that can be returned from a Callable HTTPS tigger. These are the /// canonical error codes for Google APIs, as documented here: /// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto#L26 -typedef SWIFT_ENUM_NAMED(NSInteger, FIRFunctionsErrorCode, "FunctionsErrorCode", open) { -/// The operation completed successfully. - FIRFunctionsErrorCodeOK = 0, -/// The operation was cancelled (typically by the caller). - FIRFunctionsErrorCodeCancelled = 1, -/// Unknown error or an error from a different error domain. - FIRFunctionsErrorCodeUnknown = 2, -/// Client specified an invalid argument. Note that this differs from FailedPrecondition. -/// InvalidArgument indicates arguments that are problematic regardless of the state of the -/// system (e.g., an invalid field name). - FIRFunctionsErrorCodeInvalidArgument = 3, -/// Deadline expired before operation could complete. For operations that change the state of the -/// system, this error may be returned even if the operation has completed successfully. For -/// example, a successful response from a server could have been delayed long enough for the -/// deadline to expire. - FIRFunctionsErrorCodeDeadlineExceeded = 4, -/// Some requested document was not found. - FIRFunctionsErrorCodeNotFound = 5, -/// Some document that we attempted to create already exists. - FIRFunctionsErrorCodeAlreadyExists = 6, -/// The caller does not have permission to execute the specified operation. - FIRFunctionsErrorCodePermissionDenied = 7, -/// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system -/// is out of space. - FIRFunctionsErrorCodeResourceExhausted = 8, -/// Operation was rejected because the system is not in a state required for the operation’s -/// execution. - FIRFunctionsErrorCodeFailedPrecondition = 9, -/// The operation was aborted, typically due to a concurrency issue like transaction aborts, etc. - FIRFunctionsErrorCodeAborted = 10, -/// Operation was attempted past the valid range. - FIRFunctionsErrorCodeOutOfRange = 11, -/// Operation is not implemented or not supported/enabled. - FIRFunctionsErrorCodeUnimplemented = 12, -/// Internal errors. Means some invariant expected by underlying system has been broken. If you -/// see one of these errors, something is very broken. - FIRFunctionsErrorCodeInternal = 13, -/// The service is currently unavailable. This is a most likely a transient condition and may be -/// corrected by retrying with a backoff. - FIRFunctionsErrorCodeUnavailable = 14, -/// Unrecoverable data loss or corruption. - FIRFunctionsErrorCodeDataLoss = 15, -/// The request does not have valid authentication credentials for the operation. - FIRFunctionsErrorCodeUnauthenticated = 16, +typedef SWIFT_ENUM_NAMED(NSInteger, FIRFunctionsErrorCode, "FunctionsErrorCode", open){ + /// The operation completed successfully. + FIRFunctionsErrorCodeOK = 0, + /// The operation was cancelled (typically by the caller). + FIRFunctionsErrorCodeCancelled = 1, + /// Unknown error or an error from a different error domain. + FIRFunctionsErrorCodeUnknown = 2, + /// Client specified an invalid argument. Note that this differs from + /// FailedPrecondition. + /// InvalidArgument indicates arguments that are problematic regardless of the + /// state of the + /// system (e.g., an invalid field name). + FIRFunctionsErrorCodeInvalidArgument = 3, + /// Deadline expired before operation could complete. For operations that change the state of + /// the + /// system, this error may be returned even if the operation has completed successfully. For + /// example, a successful response from a server could have been delayed long enough for the + /// deadline to expire. + FIRFunctionsErrorCodeDeadlineExceeded = 4, + /// Some requested document was not found. + FIRFunctionsErrorCodeNotFound = 5, + /// Some document that we attempted to create already exists. + FIRFunctionsErrorCodeAlreadyExists = 6, + /// The caller does not have permission to execute the specified operation. + FIRFunctionsErrorCodePermissionDenied = 7, + /// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file + /// system + /// is out of space. + FIRFunctionsErrorCodeResourceExhausted = 8, + /// Operation was rejected because the system is not in a state required for the operation’s + /// execution. + FIRFunctionsErrorCodeFailedPrecondition = 9, + /// The operation was aborted, typically due to a concurrency issue like transaction aborts, + /// etc. + FIRFunctionsErrorCodeAborted = 10, + /// Operation was attempted past the valid range. + FIRFunctionsErrorCodeOutOfRange = 11, + /// Operation is not implemented or not supported/enabled. + FIRFunctionsErrorCodeUnimplemented = 12, + /// Internal errors. Means some invariant expected by underlying system has been broken. If you + /// see one of these errors, something is very broken. + FIRFunctionsErrorCodeInternal = 13, + /// The service is currently unavailable. This is a most likely a transient condition and may be + /// corrected by retrying with a backoff. + FIRFunctionsErrorCodeUnavailable = 14, + /// Unrecoverable data loss or corruption. + FIRFunctionsErrorCodeDataLoss = 15, + /// The request does not have valid authentication credentials for the operation. + FIRFunctionsErrorCodeUnauthenticated = 16, }; @class FIRHTTPSCallableResult; -/// A HTTPSCallable is reference to a particular Callable HTTPS trigger in Cloud Functions. +/// A HTTPSCallable is reference to a particular Callable HTTPS trigger in Cloud +/// Functions. SWIFT_CLASS_NAMED("HTTPSCallable") @interface FIRHTTPSCallable : NSObject /// The timeout to use when calling the function. Defaults to 70 seconds. -@property (nonatomic) NSTimeInterval timeoutInterval; +@property(nonatomic) NSTimeInterval timeoutInterval; /// Executes this Callable HTTPS trigger asynchronously. /// The data passed into the trigger can be any of the following types: ///
    @@ -338,21 +359,23 @@ SWIFT_CLASS_NAMED("HTTPSCallable") /// resumes with a new FCM Token the next time you call this method. /// @param data Parameters to pass to the trigger. /// @param completion The block to call when the HTTPS request has completed. -- (void)callWithObject:(id _Nullable)data completion:(void (^ _Nonnull)(FIRHTTPSCallableResult * _Nullable, NSError * _Nullable))completion; -/// Executes this Callable HTTPS trigger asynchronously. This API should only be used from Objective C -/// The request to the Cloud Functions backend made by this method automatically includes a +- (void)callWithObject:(id _Nullable)data + completion: + (void (^_Nonnull)(FIRHTTPSCallableResult* _Nullable, NSError* _Nullable))completion; +/// Executes this Callable HTTPS trigger asynchronously. This API should only be used from Objective +/// C The request to the Cloud Functions backend made by this method automatically includes a /// Firebase Installations ID token to identify the app instance. If a user is logged in with /// Firebase Auth, an auth ID token for the user is also automatically included. /// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information /// regarding the app instance. To stop this, see Messaging.deleteData(). It /// resumes with a new FCM Token the next time you call this method. /// @param completion The block to call when the HTTPS request has completed. -- (void)callWithCompletion:(void (^ _Nonnull)(FIRHTTPSCallableResult * _Nullable, NSError * _Nullable))completion; +- (void)callWithCompletion:(void (^_Nonnull)(FIRHTTPSCallableResult* _Nullable, + NSError* _Nullable))completion; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end - /// A HTTPSCallableResult contains the result of calling a HTTPSCallable. SWIFT_CLASS_NAMED("HTTPSCallableResult") @interface FIRHTTPSCallableResult : NSObject @@ -360,13 +383,13 @@ SWIFT_CLASS_NAMED("HTTPSCallableResult") /// The data is in the form of native objects. For example, if your trigger returned an /// array, this object would be an NSArray. If your trigger returned a JavaScript object with /// keys and values, this object would be an NSDictionary. -@property (nonatomic, readonly) id _Nonnull data; +@property(nonatomic, readonly) id _Nonnull data; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h index 28f6cc54cd..2fc8c5fbed 100644 --- a/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H #define FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,20 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseInAppMessagingSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseInAppMessagingSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h index ae908df85f..fa7288b7e6 100644 --- a/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h +++ b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEMLMODELDOWNLOADER_SWIFT_H #define FIREBASEMLMODELDOWNLOADER_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,22 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseMLModelDownloader",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseMLModelDownloader", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif - - #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h index 66771efb69..310bbb7ed3 100644 --- a/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASEREMOTECONFIGSWIFT_SWIFT_H #define FIREBASEREMOTECONFIGSWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,23 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseRemoteConfigSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol( \ + language = "Swift", defined_in = "FirebaseRemoteConfigSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif - - - #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h index ea253b6fa1..e37024b0c3 100644 --- a/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef FIREBASESHAREDSWIFT_SWIFT_H #define FIREBASESHAREDSWIFT_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,20 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseSharedSwift",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", \ + defined_in = "FirebaseSharedSwift", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/FirebaseStorage-Swift.h b/ios_pod/swift_headers/FirebaseStorage-Swift.h index 1b08db5dc2..b1e4a82c2d 100644 --- a/ios_pod/swift_headers/FirebaseStorage-Swift.h +++ b/ios_pod/swift_headers/FirebaseStorage-Swift.h @@ -8,184 +8,192 @@ #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -199,16 +207,19 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="FirebaseStorage",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", defined_in = "FirebaseStorage", \ + generated_declaration))), \ + apply_to = any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif @class NSString; @@ -218,71 +229,72 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); /// FirebaseStorage is a service that supports uploading and downloading binary objects, /// such as images, videos, and other files to Google Cloud Storage. -/// If you call FirebaseStorage.storage(), the instance will initialize with the default FirebaseApp, -/// FirebaseApp.app(), and the storage location will come from the provided -/// GoogleService-Info.plist. -/// If you provide a custom instance of FirebaseApp, -/// the storage location will be specified via the FirebaseOptions#storageBucket property. +/// If you call FirebaseStorage.storage(), the instance will initialize with the +/// default FirebaseApp, FirebaseApp.app(), and the storage location will come from the +/// provided GoogleService-Info.plist. If you provide a custom instance of FirebaseApp, the storage +/// location will be specified via the FirebaseOptions#storageBucket property. SWIFT_CLASS_NAMED("Storage") @interface FIRStorage : NSObject /// An instance of FirebaseStorage, configured with the default FirebaseApp. /// @return the FirebaseStorage instance, configured with the default FirebaseApp. -+ (FIRStorage * _Nonnull)storage SWIFT_WARN_UNUSED_RESULT; ++ (FIRStorage *_Nonnull)storage SWIFT_WARN_UNUSED_RESULT; /// An instance of FirebaseStorage, configured with a custom storage bucket @a url. /// @param url The gs:// url to your Firebase Storage Bucket. /// @return the FirebaseStorage instance, configured with the custom FirebaseApp. -+ (FIRStorage * _Nonnull)storageWithURL:(NSString * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; ++ (FIRStorage *_Nonnull)storageWithURL:(NSString *_Nonnull)url SWIFT_WARN_UNUSED_RESULT; /// Creates an instance of FirebaseStorage, configured with the custom FirebaseApp @a app. /// @param app The custom FirebaseApp used for initialization. /// @return the FirebaseStorage instance, configured with the custom FirebaseApp. -+ (FIRStorage * _Nonnull)storageForApp:(FIRApp * _Nonnull)app SWIFT_WARN_UNUSED_RESULT; -/// Creates an instance of FirebaseStorage, configured with a custom FirebaseApp @a app and a custom storage -/// bucket @a url. ++ (FIRStorage *_Nonnull)storageForApp:(FIRApp *_Nonnull)app SWIFT_WARN_UNUSED_RESULT; +/// Creates an instance of FirebaseStorage, configured with a custom FirebaseApp @a app and a custom +/// storage bucket @a url. /// @param app The custom FirebaseApp used for initialization. /// @param url The gs:// url to your Firebase Storage Bucket. /// @return the FirebaseStorage instance, configured with the custom FirebaseApp. -+ (FIRStorage * _Nonnull)storageForApp:(FIRApp * _Nonnull)app URL:(NSString * _Nonnull)url SWIFT_WARN_UNUSED_RESULT; ++ (FIRStorage *_Nonnull)storageForApp:(FIRApp *_Nonnull)app + URL:(NSString *_Nonnull)url SWIFT_WARN_UNUSED_RESULT; /// The Firebase App associated with this Firebase Storage instance. -@property (nonatomic, readonly, strong) FIRApp * _Nonnull app; +@property(nonatomic, readonly, strong) FIRApp *_Nonnull app; /// Maximum time in seconds to retry an upload if a failure occurs. /// Defaults to 10 minutes (600 seconds). -@property (nonatomic) NSTimeInterval maxUploadRetryTime; +@property(nonatomic) NSTimeInterval maxUploadRetryTime; /// Maximum time in seconds to retry a download if a failure occurs. /// Defaults to 10 minutes (600 seconds). -@property (nonatomic) NSTimeInterval maxDownloadRetryTime; +@property(nonatomic) NSTimeInterval maxDownloadRetryTime; /// Maximum time in seconds to retry operations other than upload and download if a failure occurs. /// Defaults to 2 minutes (120 seconds). -@property (nonatomic) NSTimeInterval maxOperationRetryTime; +@property(nonatomic) NSTimeInterval maxOperationRetryTime; /// Queue that all developer callbacks are fired on. Defaults to the main queue. -@property (nonatomic, strong) dispatch_queue_t _Nonnull callbackQueue; +@property(nonatomic, strong) dispatch_queue_t _Nonnull callbackQueue; /// Creates a StorageReference initialized at the root Firebase Storage location. /// @return An instance of StorageReference initialized at the root. -- (FIRStorageReference * _Nonnull)reference SWIFT_WARN_UNUSED_RESULT; +- (FIRStorageReference *_Nonnull)reference SWIFT_WARN_UNUSED_RESULT; /// Creates a StorageReference given a gs:// or https:// URL pointing to a Firebase Storage /// location. For example, you can pass in an https:// download URL retrieved from /// [StorageReference downloadURLWithCompletion] or the gs:// URI from /// [StorageReference description]. /// @param string A gs:// or https:// URL to initialize the reference with. /// @return An instance of StorageReference at the given child path. -/// @throws Throws an exception if passed in URL is not associated with the FirebaseApp used to initialize -/// this FirebaseStorage. -- (FIRStorageReference * _Nonnull)referenceForURL:(NSString * _Nonnull)string SWIFT_WARN_UNUSED_RESULT; +/// @throws Throws an exception if passed in URL is not associated with the FirebaseApp used to +/// initialize this FirebaseStorage. +- (FIRStorageReference *_Nonnull)referenceForURL:(NSString *_Nonnull)string + SWIFT_WARN_UNUSED_RESULT; /// Creates a StorageReference initialized at a child Firebase Storage location. /// @param string A relative path from the root to initialize the reference with, /// for instance @“path/to/object”. /// @return An instance of StorageReference at the given child path. -- (FIRStorageReference * _Nonnull)referenceWithPath:(NSString * _Nonnull)string SWIFT_WARN_UNUSED_RESULT; +- (FIRStorageReference *_Nonnull)referenceWithPath:(NSString *_Nonnull)string + SWIFT_WARN_UNUSED_RESULT; /// Configures the Storage SDK to use an emulated backend instead of the default remote backend. -- (void)useEmulatorWithHost:(NSString * _Nonnull)host port:(NSInteger)port; +- (void)useEmulatorWithHost:(NSString *_Nonnull)host port:(NSInteger)port; - (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -@property (nonatomic, readonly, copy) NSString * _Nonnull description; +@property(nonatomic, readonly) NSUInteger hash; +@property(nonatomic, readonly, copy) NSString *_Nonnull description; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end - /// Defines task operations such as pause, resume, cancel, and enqueue for all tasks. /// All tasks are required to implement enqueue, which begins the task, and may optionally /// implement pause, resume, and cancel, which operate on the task to pause, resume, and cancel @@ -311,7 +323,7 @@ SWIFT_PROTOCOL_NAMED("StorageTaskManagement") SWIFT_CLASS_NAMED("StorageTask") @interface FIRStorageTask : NSObject /// An immutable view of the task and associated metadata, progress, error, etc. -@property (nonatomic, readonly, strong) FIRStorageTaskSnapshot * _Nonnull snapshot; +@property(nonatomic, readonly, strong) FIRStorageTaskSnapshot *_Nonnull snapshot; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @@ -329,10 +341,11 @@ SWIFT_CLASS_NAMED("StorageObservableTask") /// @param handler A callback that fires every time the status event occurs, /// returns a StorageTaskSnapshot containing the state of the task. /// @return A task handle that can be used to remove the observer at a later date. -- (NSString * _Nonnull)observeStatus:(enum FIRStorageTaskStatus)status handler:(void (^ _Nonnull)(FIRStorageTaskSnapshot * _Nonnull))handler; +- (NSString *_Nonnull)observeStatus:(enum FIRStorageTaskStatus)status + handler:(void (^_Nonnull)(FIRStorageTaskSnapshot *_Nonnull))handler; /// Removes the single observer with the provided handle. /// @param handle The handle of the task to remove. -- (void)removeObserverWithHandle:(NSString * _Nonnull)handle; +- (void)removeObserverWithHandle:(NSString *_Nonnull)handle; /// Removes all observers for a single status. /// @param status A StorageTaskStatus to remove listeners for. - (void)removeAllObserversForStatus:(enum FIRStorageTaskStatus)status; @@ -340,7 +353,6 @@ SWIFT_CLASS_NAMED("StorageObservableTask") - (void)removeAllObservers; @end - /// StorageDownloadTask implements resumable downloads from an object in Firebase Storage. /// Downloads can be returned on completion with a completion handler, and can be monitored /// by attaching observers, or controlled by calling StorageTask#pause, StorageTask#resume, @@ -361,36 +373,35 @@ SWIFT_CLASS_NAMED("StorageDownloadTask") - (void)resume; @end -typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageErrorCode, "StorageErrorCode", open) { - FIRStorageErrorCodeUnknown = -13000, - FIRStorageErrorCodeObjectNotFound = -13010, - FIRStorageErrorCodeBucketNotFound = -13011, - FIRStorageErrorCodeProjectNotFound = -13012, - FIRStorageErrorCodeQuotaExceeded = -13013, - FIRStorageErrorCodeUnauthenticated = -13020, - FIRStorageErrorCodeUnauthorized = -13021, - FIRStorageErrorCodeRetryLimitExceeded = -13030, - FIRStorageErrorCodeNonMatchingChecksum = -13031, - FIRStorageErrorCodeDownloadSizeExceeded = -13032, - FIRStorageErrorCodeCancelled = -13040, - FIRStorageErrorCodeInvalidArgument = -13050, +typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageErrorCode, "StorageErrorCode", open){ + FIRStorageErrorCodeUnknown = -13000, + FIRStorageErrorCodeObjectNotFound = -13010, + FIRStorageErrorCodeBucketNotFound = -13011, + FIRStorageErrorCodeProjectNotFound = -13012, + FIRStorageErrorCodeQuotaExceeded = -13013, + FIRStorageErrorCodeUnauthenticated = -13020, + FIRStorageErrorCodeUnauthorized = -13021, + FIRStorageErrorCodeRetryLimitExceeded = -13030, + FIRStorageErrorCodeNonMatchingChecksum = -13031, + FIRStorageErrorCodeDownloadSizeExceeded = -13032, + FIRStorageErrorCodeCancelled = -13040, + FIRStorageErrorCodeInvalidArgument = -13050, }; - /// Contains the prefixes and items returned by a StorageReference.list() call. SWIFT_CLASS_NAMED("StorageListResult") @interface FIRStorageListResult : NSObject /// The prefixes (folders) returned by the list() operation. /// @return A list of prefixes (folders). -@property (nonatomic, readonly, copy) NSArray * _Nonnull prefixes; -/// Returns a token that can be used to resume a previous list() operation. nil -/// indicates that there are no more results. +@property(nonatomic, readonly, copy) NSArray *_Nonnull prefixes; +/// Returns a token that can be used to resume a previous list() operation. +/// nil indicates that there are no more results. /// @return A page token if more results are available. -@property (nonatomic, readonly, copy) NSArray * _Nonnull items; -/// Returns a token that can be used to resume a previous list() operation. nil -/// indicates that there are no more results. +@property(nonatomic, readonly, copy) NSArray *_Nonnull items; +/// Returns a token that can be used to resume a previous list() operation. +/// nil indicates that there are no more results. /// @return A page token if more results are available. -@property (nonatomic, readonly, copy) NSString * _Nullable pageToken; +@property(nonatomic, readonly, copy) NSString *_Nullable pageToken; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @@ -405,53 +416,52 @@ SWIFT_CLASS_NAMED("StorageListResult") SWIFT_CLASS_NAMED("StorageMetadata") @interface FIRStorageMetadata : NSObject /// The name of the bucket containing this object. -@property (nonatomic, readonly, copy) NSString * _Nonnull bucket; +@property(nonatomic, readonly, copy) NSString *_Nonnull bucket; /// Cache-Control directive for the object data. -@property (nonatomic, copy) NSString * _Nullable cacheControl; +@property(nonatomic, copy) NSString *_Nullable cacheControl; /// Content-Disposition of the object data. -@property (nonatomic, copy) NSString * _Nullable contentDisposition; +@property(nonatomic, copy) NSString *_Nullable contentDisposition; /// Content-Encoding of the object data. -@property (nonatomic, copy) NSString * _Nullable contentEncoding; +@property(nonatomic, copy) NSString *_Nullable contentEncoding; /// Content-Language of the object data. -@property (nonatomic, copy) NSString * _Nullable contentLanguage; +@property(nonatomic, copy) NSString *_Nullable contentLanguage; /// Content-Type of the object data. -@property (nonatomic, copy) NSString * _Nullable contentType; +@property(nonatomic, copy) NSString *_Nullable contentType; /// MD5 hash of the data; encoded using base64. -@property (nonatomic, readonly, copy) NSString * _Nullable md5Hash; +@property(nonatomic, readonly, copy) NSString *_Nullable md5Hash; /// The content generation of this object. Used for object versioning. -@property (nonatomic, readonly) int64_t generation; +@property(nonatomic, readonly) int64_t generation; /// User-provided metadata, in key/value pairs. -@property (nonatomic, copy) NSDictionary * _Nullable customMetadata; +@property(nonatomic, copy) NSDictionary *_Nullable customMetadata; /// The version of the metadata for this object at this generation. Used /// for preconditions and for detecting changes in metadata. A metageneration number is only /// meaningful in the context of a particular generation of a particular object. -@property (nonatomic, readonly) int64_t metageneration; +@property(nonatomic, readonly) int64_t metageneration; /// The name of this object, in gs://bucket/path/to/object.txt, this is object.txt. -@property (nonatomic, readonly, copy) NSString * _Nullable name; +@property(nonatomic, readonly, copy) NSString *_Nullable name; /// The full path of this object, in gs://bucket/path/to/object.txt, this is path/to/object.txt. -@property (nonatomic, readonly, copy) NSString * _Nullable path; +@property(nonatomic, readonly, copy) NSString *_Nullable path; /// Content-Length of the data in bytes. -@property (nonatomic, readonly) int64_t size; +@property(nonatomic, readonly) int64_t size; /// The creation time of the object in RFC 3339 format. -@property (nonatomic, readonly, copy) NSDate * _Nullable timeCreated; +@property(nonatomic, readonly, copy) NSDate *_Nullable timeCreated; /// The modification time of the object metadata in RFC 3339 format. -@property (nonatomic, readonly, copy) NSDate * _Nullable updated; +@property(nonatomic, readonly, copy) NSDate *_Nullable updated; /// A reference to the object in Firebase Storage. -@property (nonatomic, readonly, strong) FIRStorageReference * _Nullable storageReference; +@property(nonatomic, readonly, strong) FIRStorageReference *_Nullable storageReference; /// Creates a Dictionary from the contents of the metadata. /// @return A Dictionary that represents the contents of the metadata. -- (NSDictionary * _Nonnull)dictionaryRepresentation SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary *_Nonnull)dictionaryRepresentation SWIFT_WARN_UNUSED_RESULT; /// Determines if the current metadata represents a “file”. -@property (nonatomic, readonly) BOOL isFile; +@property(nonatomic, readonly) BOOL isFile; /// Determines if the current metadata represents a “folder”. -@property (nonatomic, readonly) BOOL isFolder; +@property(nonatomic, readonly) BOOL isFolder; - (nonnull instancetype)init; /// Creates an instance of StorageMetadata from the contents of a dictionary. /// @return An instance of StorageMetadata that represents the contents of a dictionary. -- (nonnull instancetype)initWithDictionary:(NSDictionary * _Nonnull)dictionary; +- (nonnull instancetype)initWithDictionary:(NSDictionary *_Nonnull)dictionary; @end - @class NSData; @class FIRStorageUploadTask; @class NSURL; @@ -463,19 +473,19 @@ SWIFT_CLASS_NAMED("StorageMetadata") SWIFT_CLASS_NAMED("StorageReference") @interface FIRStorageReference : NSObject /// The Storage service object which created this reference. -@property (nonatomic, readonly, strong) FIRStorage * _Nonnull storage; +@property(nonatomic, readonly, strong) FIRStorage *_Nonnull storage; /// The name of the Google Cloud Storage bucket associated with this reference, /// in gs://bucket/path/to/object.txt, the bucket would be: ‘bucket’ -@property (nonatomic, readonly, copy) NSString * _Nonnull bucket; +@property(nonatomic, readonly, copy) NSString *_Nonnull bucket; /// The full path to this object, not including the Google Cloud Storage bucket. /// In gs://bucket/path/to/object.txt, the full path would be: ‘path/to/object.txt’ -@property (nonatomic, readonly, copy) NSString * _Nonnull fullPath; +@property(nonatomic, readonly, copy) NSString *_Nonnull fullPath; /// The short name of the object associated with this reference, /// in gs://bucket/path/to/object.txt, the name of the object would be: ‘object.txt’ -@property (nonatomic, readonly, copy) NSString * _Nonnull name; +@property(nonatomic, readonly, copy) NSString *_Nonnull name; /// Creates a new StorageReference pointing to the root object. /// @return A new StorageReference pointing to the root object. -- (FIRStorageReference * _Nonnull)root SWIFT_WARN_UNUSED_RESULT; +- (FIRStorageReference *_Nonnull)root SWIFT_WARN_UNUSED_RESULT; /// Creates a new StorageReference pointing to the parent of the current reference /// or nil if this instance references the root location. /// For example: @@ -483,7 +493,7 @@ SWIFT_CLASS_NAMED("StorageReference") /// path = foo parent = (root) /// path = (root) parent = nil /// @return A new StorageReference pointing to the parent of the current reference. -- (FIRStorageReference * _Nullable)parent SWIFT_WARN_UNUSED_RESULT; +- (FIRStorageReference *_Nullable)parent SWIFT_WARN_UNUSED_RESULT; /// Creates a new StorageReference pointing to a child object of the current reference. /// path = foo child = bar newPath = foo/bar /// path = foo/bar child = baz ntask.impl.snapshotwPath = foo/bar/baz @@ -494,7 +504,7 @@ SWIFT_CLASS_NAMED("StorageReference") /// child = foo///bar newPath = foo/bar /// @param path Path to append to the current path. /// @return A new StorageReference pointing to a child location of the current reference. -- (FIRStorageReference * _Nonnull)child:(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT; +- (FIRStorageReference *_Nonnull)child:(NSString *_Nonnull)path SWIFT_WARN_UNUSED_RESULT; /// Asynchronously uploads data to the currently specified StorageReference, /// without additional metadata. /// This is not recommended for large files, and one should instead upload a file from disk. @@ -502,12 +512,13 @@ SWIFT_CLASS_NAMED("StorageReference") /// @param metadata StorageMetadata containing additional information (MIME type, etc.) /// about the object being uploaded. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata; +- (FIRStorageUploadTask *_Nonnull)putData:(NSData *_Nonnull)uploadData + metadata:(FIRStorageMetadata *_Nullable)metadata; /// Asynchronously uploads data to the currently specified StorageReference. /// This is not recommended for large files, and one should instead upload a file from disk. /// @param uploadData The Data to upload. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData; +- (FIRStorageUploadTask *_Nonnull)putData:(NSData *_Nonnull)uploadData; /// Asynchronously uploads data to the currently specified StorageReference. /// This is not recommended for large files, and one should instead upload a file from disk. /// @param uploadData The Data to upload. @@ -516,18 +527,22 @@ SWIFT_CLASS_NAMED("StorageReference") /// @param completion A completion block that either returns the object metadata on success, /// or an error on failure. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +- (FIRStorageUploadTask *_Nonnull)putData:(NSData *_Nonnull)uploadData + metadata:(FIRStorageMetadata *_Nullable)metadata + completion:(void (^_Nullable)(FIRStorageMetadata *_Nullable, + NSError *_Nullable))completion; /// Asynchronously uploads a file to the currently specified StorageReference. /// @param fileURL A URL representing the system file path of the object to be uploaded. /// @param metadata StorageMetadata containing additional information (MIME type, etc.) /// about the object being uploaded. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata; +- (FIRStorageUploadTask *_Nonnull)putFile:(NSURL *_Nonnull)fileURL + metadata:(FIRStorageMetadata *_Nullable)metadata; /// Asynchronously uploads a file to the currently specified StorageReference, /// without additional metadata. /// @param fileURL A URL representing the system file path of the object to be uploaded. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL; +- (FIRStorageUploadTask *_Nonnull)putFile:(NSURL *_Nonnull)fileURL; /// Asynchronously uploads a file to the currently specified StorageReference. /// @param fileURL A URL representing the system file path of the object to be uploaded. /// @param metadata StorageMetadata containing additional information (MIME type, etc.) @@ -535,33 +550,42 @@ SWIFT_CLASS_NAMED("StorageReference") /// @param completion A completion block that either returns the object metadata on success, /// or an error on failure. /// @return An instance of StorageUploadTask, which can be used to monitor or manage the upload. -- (FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +- (FIRStorageUploadTask *_Nonnull)putFile:(NSURL *_Nonnull)fileURL + metadata:(FIRStorageMetadata *_Nullable)metadata + completion:(void (^_Nullable)(FIRStorageMetadata *_Nullable, + NSError *_Nullable))completion; /// Asynchronously downloads the object at the StorageReference to an Data object in memory. /// An Data of the provided max size will be allocated, so ensure that the device has enough free -/// memory to complete the download. For downloading large files, writeToFile may be a better option. +/// memory to complete the download. For downloading large files, writeToFile may be a better +/// option. /// @param maxSize The maximum size in bytes to download. If the download exceeds this size, /// the task will be cancelled and an error will be returned. /// @param completion A completion block that either returns the object data on success, /// or an error on failure. /// @return An StorageDownloadTask that can be used to monitor or manage the download. -- (FIRStorageDownloadTask * _Nonnull)dataWithMaxSize:(int64_t)maxSize completion:(void (^ _Nonnull)(NSData * _Nullable, NSError * _Nullable))completion; +- (FIRStorageDownloadTask *_Nonnull) + dataWithMaxSize:(int64_t)maxSize + completion:(void (^_Nonnull)(NSData *_Nullable, NSError *_Nullable))completion; /// Asynchronously retrieves a long lived download URL with a revokable token. /// This can be used to share the file with others, but can be revoked by a developer /// in the Firebase Console. /// @param completion A completion block that either returns the URL on success, /// or an error on failure. -- (void)downloadURLWithCompletion:(void (^ _Nonnull)(NSURL * _Nullable, NSError * _Nullable))completion; +- (void)downloadURLWithCompletion:(void (^_Nonnull)(NSURL *_Nullable, + NSError *_Nullable))completion; /// Asynchronously downloads the object at the current path to a specified system filepath. /// @param fileURL A file system URL representing the path the object should be downloaded to. /// @return An StorageDownloadTask that can be used to monitor or manage the download. -- (FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL; +- (FIRStorageDownloadTask *_Nonnull)writeToFile:(NSURL *_Nonnull)fileURL; /// Asynchronously downloads the object at the current path to a specified system filepath. /// @param fileURL A file system URL representing the path the object should be downloaded to. /// @param completion A completion block that fires when the file download completes. /// Returns an URL pointing to the file path of the downloaded file on success, /// or an error on failure. /// @return An StorageDownloadTask that can be used to monitor or manage the download. -- (FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL completion:(void (^ _Nullable)(NSURL * _Nullable, NSError * _Nullable))completion; +- (FIRStorageDownloadTask *_Nonnull)writeToFile:(NSURL *_Nonnull)fileURL + completion:(void (^_Nullable)(NSURL *_Nullable, + NSError *_Nullable))completion; /// List all items (files) and prefixes (folders) under this StorageReference. /// This is a helper method for calling list() repeatedly until there are no more results. /// Consistency of the result is not guaranteed if objects are inserted or removed while this @@ -569,54 +593,59 @@ SWIFT_CLASS_NAMED("StorageReference") /// listAll(completion:) is only available for projects using Firebase Rules Version 2. /// @param completion A completion handler that will be invoked with all items and prefixes under /// the current StorageReference. -- (void)listAllWithCompletion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; -/// List up to maxResults items (files) and prefixes (folders) under this StorageReference. -/// “/” is treated as a path delimiter. Firebase Storage does not support unsupported object -/// paths that end with “/” or contain two consecutive “/“s. All invalid objects in GCS will be -/// filtered. -/// list(maxResults:completion:) is only available for projects using Firebase Rules Version 2. +- (void)listAllWithCompletion:(void (^_Nonnull)(FIRStorageListResult *_Nullable, + NSError *_Nullable))completion; +/// List up to maxResults items (files) and prefixes (folders) under this +/// StorageReference. “/” is treated as a path delimiter. Firebase Storage does not support +/// unsupported object paths that end with “/” or contain two consecutive “/“s. All invalid objects +/// in GCS will be filtered. list(maxResults:completion:) is only available for +/// projects using Firebase Rules Version 2. /// @param maxResults The maximum number of results to return in a single page. Must be greater /// than 0 and at most 1000. /// @param completion A completion handler that will be invoked with up to maxResults items and /// prefixes under the current StorageReference. -- (void)listWithMaxResults:(int64_t)maxResults completion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; +- (void)listWithMaxResults:(int64_t)maxResults + completion:(void (^_Nonnull)(FIRStorageListResult *_Nullable, + NSError *_Nullable))completion; /// Resumes a previous call to list(maxResults:completion:)`, starting after a pagination token. /// Returns the next set of items (files) and prefixes (folders) under this StorageReference. /// “/” is treated as a path delimiter. Firebase Storage does not support unsupported object /// paths that end with “/” or contain two consecutive “/“s. All invalid objects in GCS will be /// filtered. -/// list(maxResults:pageToken:completion:)is only available for projects using Firebase Rules -/// Version 2. +/// list(maxResults:pageToken:completion:)is only available for projects using Firebase +/// Rules Version 2. /// @param maxResults The maximum number of results to return in a single page. Must be greater /// than 0 and at most 1000. /// @param pageToken A page token from a previous call to list. /// @param completion A completion handler that will be invoked with the next items and prefixes /// under the current StorageReference. -- (void)listWithMaxResults:(int64_t)maxResults pageToken:(NSString * _Nonnull)pageToken completion:(void (^ _Nonnull)(FIRStorageListResult * _Nullable, NSError * _Nullable))completion; +- (void)listWithMaxResults:(int64_t)maxResults + pageToken:(NSString *_Nonnull)pageToken + completion:(void (^_Nonnull)(FIRStorageListResult *_Nullable, + NSError *_Nullable))completion; /// Retrieves metadata associated with an object at the current path. /// @param completion A completion block which returns the object metadata on success, /// or an error on failure. -- (void)metadataWithCompletion:(void (^ _Nonnull)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +- (void)metadataWithCompletion:(void (^_Nonnull)(FIRStorageMetadata *_Nullable, + NSError *_Nullable))completion; /// Updates the metadata associated with an object at the current path. /// @param metadata An StorageMetadata object with the metadata to update. /// @param completion A completion block which returns the StorageMetadata on success, /// or an error on failure. -- (void)updateMetadata:(FIRStorageMetadata * _Nonnull)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion; +- (void)updateMetadata:(FIRStorageMetadata *_Nonnull)metadata + completion: + (void (^_Nullable)(FIRStorageMetadata *_Nullable, NSError *_Nullable))completion; /// Deletes the object at the current path. /// @param completion A completion block which returns nil on success, or an error on failure. -- (void)deleteWithCompletion:(void (^ _Nullable)(NSError * _Nullable))completion; -- (FIRStorageReference * _Nonnull)copy:(struct _NSZone * _Nonnull)zone SWIFT_WARN_UNUSED_RESULT; +- (void)deleteWithCompletion:(void (^_Nullable)(NSError *_Nullable))completion; +- (FIRStorageReference *_Nonnull)copy:(struct _NSZone *_Nonnull)zone SWIFT_WARN_UNUSED_RESULT; - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -@property (nonatomic, readonly, copy) NSString * _Nonnull description; +@property(nonatomic, readonly) NSUInteger hash; +@property(nonatomic, readonly, copy) NSString *_Nonnull description; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end - - - - @class NSProgress; /// StorageTaskSnapshot represents an immutable view of a task. @@ -625,32 +654,28 @@ SWIFT_CLASS_NAMED("StorageReference") SWIFT_CLASS_NAMED("StorageTaskSnapshot") @interface FIRStorageTaskSnapshot : NSObject /// Subclass of StorageTask this snapshot represents. -@property (nonatomic, readonly, strong) FIRStorageTask * _Nonnull task; +@property(nonatomic, readonly, strong) FIRStorageTask *_Nonnull task; /// Metadata returned by the task, or nil if no metadata returned. -@property (nonatomic, readonly, strong) FIRStorageMetadata * _Nullable metadata; +@property(nonatomic, readonly, strong) FIRStorageMetadata *_Nullable metadata; /// StorageReference this task is operates on. -@property (nonatomic, readonly, strong) FIRStorageReference * _Nonnull reference; +@property(nonatomic, readonly, strong) FIRStorageReference *_Nonnull reference; /// Progress object which tracks the progress of an upload or download. -@property (nonatomic, readonly, strong) NSProgress * _Nullable progress; +@property(nonatomic, readonly, strong) NSProgress *_Nullable progress; /// Error during task execution, or nil if no error occurred. -@property (nonatomic, readonly) NSError * _Nullable error; +@property(nonatomic, readonly) NSError *_Nullable error; /// Status of the task. -@property (nonatomic, readonly) enum FIRStorageTaskStatus status; -@property (nonatomic, readonly, copy) NSString * _Nonnull description; +@property(nonatomic, readonly) enum FIRStorageTaskStatus status; +@property(nonatomic, readonly, copy) NSString *_Nonnull description; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end -typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageTaskStatus, "StorageTaskStatus", open) { - FIRStorageTaskStatusUnknown = 0, - FIRStorageTaskStatusResume = 1, - FIRStorageTaskStatusProgress = 2, - FIRStorageTaskStatusPause = 3, - FIRStorageTaskStatusSuccess = 4, - FIRStorageTaskStatusFailure = 5, +typedef SWIFT_ENUM_NAMED(NSInteger, FIRStorageTaskStatus, "StorageTaskStatus", open){ + FIRStorageTaskStatusUnknown = 0, FIRStorageTaskStatusResume = 1, + FIRStorageTaskStatusProgress = 2, FIRStorageTaskStatusPause = 3, + FIRStorageTaskStatusSuccess = 4, FIRStorageTaskStatusFailure = 5, }; - /// StorageUploadTask implements resumable uploads to a file in Firebase Storage. /// Uploads can be returned on completion with a completion callback, and can be monitored /// by attaching observers, or controlled by calling StorageTask#pause, StorageTask#resume, @@ -672,7 +697,7 @@ SWIFT_CLASS_NAMED("StorageUploadTask") @end #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif diff --git a/ios_pod/swift_headers/SwiftProtobuf-Swift.h b/ios_pod/swift_headers/SwiftProtobuf-Swift.h index 243ef4d7f5..63c48e00ca 100644 --- a/ios_pod/swift_headers/SwiftProtobuf-Swift.h +++ b/ios_pod/swift_headers/SwiftProtobuf-Swift.h @@ -1,191 +1,210 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 +// clang-1300.0.29.30) #ifndef SWIFTPROTOBUF_SWIFT_H #define SWIFTPROTOBUF_SWIFT_H #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgcc-compat" #if !defined(__has_include) -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__has_attribute) -# define __has_attribute(x) 0 +#define __has_attribute(x) 0 #endif #if !defined(__has_feature) -# define __has_feature(x) 0 +#define __has_feature(x) 0 #endif #if !defined(__has_warning) -# define __has_warning(x) 0 +#define __has_warning(x) 0 #endif #if __has_include() -# include +#include #endif #pragma clang diagnostic ignored "-Wauto-import" #include -#include -#include #include +#include +#include #if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) +#define SWIFT_TYPEDEFS 1 +#if __has_include() +#include +#elif !defined(__cplusplus) typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); +#endif +typedef float swift_float2 __attribute__((__ext_vector_type__(2))); +typedef float swift_float3 __attribute__((__ext_vector_type__(3))); +typedef float swift_float4 __attribute__((__ext_vector_type__(4))); +typedef double swift_double2 __attribute__((__ext_vector_type__(2))); +typedef double swift_double3 __attribute__((__ext_vector_type__(3))); +typedef double swift_double4 __attribute__((__ext_vector_type__(4))); +typedef int swift_int2 __attribute__((__ext_vector_type__(2))); +typedef int swift_int3 __attribute__((__ext_vector_type__(3))); +typedef int swift_int4 __attribute__((__ext_vector_type__(4))); +typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); +typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); +typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) +#define SWIFT_PASTE_HELPER(x, y) x##y +#define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class +#define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif +#if __has_feature(objc_class_property) +#define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ +#else +#define SWIFT_CLASS_PROPERTY(...) +#endif #endif #if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) +#define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else -# define SWIFT_RUNTIME_NAME(X) +#define SWIFT_RUNTIME_NAME(X) #endif #if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) +#define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else -# define SWIFT_COMPILE_NAME(X) +#define SWIFT_COMPILE_NAME(X) #endif #if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) +#define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else -# define SWIFT_METHOD_FAMILY(X) +#define SWIFT_METHOD_FAMILY(X) #endif #if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) +#define SWIFT_NOESCAPE __attribute__((noescape)) #else -# define SWIFT_NOESCAPE +#define SWIFT_NOESCAPE #endif #if __has_attribute(ns_consumed) -# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) +#define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed)) #else -# define SWIFT_RELEASES_ARGUMENT +#define SWIFT_RELEASES_ARGUMENT #endif #if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else -# define SWIFT_WARN_UNUSED_RESULT +#define SWIFT_WARN_UNUSED_RESULT #endif #if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) +#define SWIFT_NORETURN __attribute__((noreturn)) #else -# define SWIFT_NORETURN +#define SWIFT_NORETURN #endif #if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA +#define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif +#if __has_attribute(objc_subclassing_restricted) +#define SWIFT_CLASS(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) \ + SWIFT_CLASS_EXTRA +#else +#define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#define SWIFT_CLASS_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA +#endif #endif #if !defined(SWIFT_RESILIENT_CLASS) -# if __has_attribute(objc_class_stub) -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) -# else -# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) -# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) -# endif +#if __has_attribute(objc_class_stub) +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) \ + SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub)) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) \ + __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME) +#else +#define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) +#define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME) +#endif #endif #if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL(SWIFT_NAME) \ + SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA +#define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) \ + SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) +#define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif +#if __has_attribute(objc_designated_initializer) +#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) +#else +#define OBJC_DESIGNATED_INITIALIZER +#endif #endif #if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif +#if defined(__has_attribute) && __has_attribute(enum_extensibility) +#define SWIFT_ENUM_ATTR(_extensibility) \ + __attribute__((enum_extensibility(_extensibility))) +#else +#define SWIFT_ENUM_ATTR(_extensibility) +#endif #endif #if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif +#define SWIFT_ENUM(_type, _name, _extensibility) \ + enum _name : _type _name; \ + enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type +#if __has_feature(generalized_swift_name) +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); \ + enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) \ + SWIFT_ENUM_EXTRA _name : _type +#else +#define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) \ + SWIFT_ENUM(_type, _name, _extensibility) +#endif #endif #if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) +#define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) +#define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) +#define SWIFT_AVAILABILITY(plat, ...) \ + __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_WEAK_IMPORT) -# define SWIFT_WEAK_IMPORT __attribute__((weak_import)) +#define SWIFT_WEAK_IMPORT __attribute__((weak_import)) #endif #if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) +#define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) +#define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) +#define SWIFT_DEPRECATED_OBJC(Msg) \ + __attribute__((diagnose_if(1, Msg, "warning"))) #else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) +#define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) #endif #if !defined(IBSegueAction) -# define IBSegueAction +#define IBSegueAction #endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") @@ -196,20 +215,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" #if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" +#pragma clang diagnostic ignored "-Wpragma-clang-attribute" #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" #pragma clang diagnostic ignored "-Wnullability" #if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="SwiftProtobuf",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") +#pragma push_macro("any") +#undef any +#pragma clang attribute push( \ + __attribute__((external_source_symbol(language = "Swift", \ + defined_in = "SwiftProtobuf", \ + generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") #endif #if __has_attribute(external_source_symbol) -# pragma clang attribute pop +#pragma clang attribute pop #endif #pragma clang diagnostic pop #endif From 1097cd22db85ed85a302f2ba4ea18bd4acc7d9be Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:29:11 -0700 Subject: [PATCH 27/93] Support directories with spaces --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 1de1f72f55..714fd46f4f 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -132,7 +132,7 @@ jobs: unzip -q Firebase.zip cd - # Copy all *-Swift.h header files into ios_pod/swift_headers/ - find "${ziptmp}" -name '*-Swift.h' | xargs -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ + find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ copyright_line="// Copyright $(date +%Y) Google LLC\n" # Add a note to each file about its source. for ios_header in ios_pod/swift_headers/*.h; do From 8587f544e68430385b0f3be5dad6d2135d5fbf72 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:40:12 -0700 Subject: [PATCH 28/93] Exclude swift headers from linter. --- scripts/gha/lint_commenter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gha/lint_commenter.py b/scripts/gha/lint_commenter.py index 84774afa42..ccf880f729 100755 --- a/scripts/gha/lint_commenter.py +++ b/scripts/gha/lint_commenter.py @@ -49,6 +49,7 @@ EXCLUDE_PATH_REGEX = [ # These files are copied from an external repo and are outside our control. r'^analytics/ios_headers/' + r'^ios_pod/swift_headers/' ] # The linter gives every error a confidence score. # 1 = It's most likely not really an issue. From fd06e748e4c3d376b748fa8acfbbc7fcfd78b4de Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:41:01 -0700 Subject: [PATCH 29/93] Fix whitespace --- storage/src/ios/storage_reference_ios.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/src/ios/storage_reference_ios.h b/storage/src/ios/storage_reference_ios.h index ebbf66155e..cebe450cd8 100644 --- a/storage/src/ios/storage_reference_ios.h +++ b/storage/src/ios/storage_reference_ios.h @@ -23,7 +23,7 @@ #include "storage/src/ios/storage_ios.h" #ifdef __OBJC__ -#import "FirebaseStorage-Swift.h" +#import "FirebaseStorage-Swift.h" // typedef not included in Swift header. typedef void (^FIRStorageVoidDataError)(NSData *_Nullable, NSError *_Nullable); From 9d7e4c7170a9fcd7885b754c744445bf5ab1010f Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:44:29 -0700 Subject: [PATCH 30/93] Fix comma --- scripts/gha/lint_commenter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gha/lint_commenter.py b/scripts/gha/lint_commenter.py index ccf880f729..c13ee33dc7 100755 --- a/scripts/gha/lint_commenter.py +++ b/scripts/gha/lint_commenter.py @@ -48,7 +48,7 @@ # Exclude files within the following paths (specified as regexes). EXCLUDE_PATH_REGEX = [ # These files are copied from an external repo and are outside our control. - r'^analytics/ios_headers/' + r'^analytics/ios_headers/', r'^ios_pod/swift_headers/' ] # The linter gives every error a confidence score. From c44adef3ef9ca5c092b296f2d72714a4cc89d05b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 13:57:13 -0700 Subject: [PATCH 31/93] Fix whitespace. --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 714fd46f4f..b99155b2a8 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -142,7 +142,7 @@ jobs: python scripts/format_code.py --f "${ios_header}" done rm -rf ${ziptmp} - + elif [[ ${{ github.event.inputs.updateAndroid }} -eq 1 ]]; then # Update Android only echo "Updating Android dependencies only" From 60c1485db8773c87ca96cd39edbc9dd575591472 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 14:28:11 -0700 Subject: [PATCH 32/93] Fix Firestore external file. --- cmake/external/firestore.cmake | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 3d35e042ea..7b67544c56 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,7 +13,6 @@ # limitations under the License. include(ExternalProject) -include(FindPythonInterp) if(TARGET firestore) return() @@ -28,10 +27,8 @@ function(GetReleasedDep) ExternalProject_Add( firestore - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 70aa8b82a2ed36dd14448174bea0fd7e575d4d49 - GIT_SHALLOW ON + DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} + URL https://github.com/firebase/firebase-ios-sdk/archive/${version}.tar.gz PREFIX ${PROJECT_BINARY_DIR} @@ -76,10 +73,3 @@ else() endif() endif() - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake - HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" -) From bfc82c4472b5583ca4e6096d3dee87fcaa45339a Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 14:37:01 -0700 Subject: [PATCH 33/93] Restore new external file and fix include path. --- cmake/external/firestore.cmake | 14 ++++++++++++-- firestore/CMakeLists.txt | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 7b67544c56..3d35e042ea 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,6 +13,7 @@ # limitations under the License. include(ExternalProject) +include(FindPythonInterp) if(TARGET firestore) return() @@ -27,8 +28,10 @@ function(GetReleasedDep) ExternalProject_Add( firestore - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - URL https://github.com/firebase/firebase-ios-sdk/archive/${version}.tar.gz + DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} + GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk + GIT_TAG 70aa8b82a2ed36dd14448174bea0fd7e575d4d49 + GIT_SHALLOW ON PREFIX ${PROJECT_BINARY_DIR} @@ -73,3 +76,10 @@ else() endif() endif() + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" +) diff --git a/firestore/CMakeLists.txt b/firestore/CMakeLists.txt index 87897ef2cc..808778442d 100644 --- a/firestore/CMakeLists.txt +++ b/firestore/CMakeLists.txt @@ -392,7 +392,7 @@ elseif(IOS) nanopb gRPC-C++ gRPC-Core - FirebaseAuth/Interop/Auth/Public + FirebaseAuth/Interop ) if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks") From 0085585b9bc61ebf8452601be9d01336c91d8642 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 15:05:54 -0700 Subject: [PATCH 34/93] Fix include files and paths to be compatible with C++ build. --- CMakeLists.txt | 4 ++-- cmake/external/firestore.cmake | 17 ++++------------- firestore/CMakeLists.txt | 3 ++- .../src/main/create_credentials_provider_ios.mm | 6 +++++- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d3410f251..a83eb6d036 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ option(FIREBASE_INCLUDE_LIBRARY_DEFAULT "Should each library be included by default." ON) # Different options to enable/disable each library being included during # configuration. -option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." - ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) +option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." OFF) +# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_ANALYTICS "Include the Google Analytics for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 3d35e042ea..762f133c79 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -28,10 +28,8 @@ function(GetReleasedDep) ExternalProject_Add( firestore - DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} - GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk - GIT_TAG 70aa8b82a2ed36dd14448174bea0fd7e575d4d49 - GIT_SHALLOW ON + DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} + URL https://github.com/firebase/firebase-ios-sdk/archive/${version}.tar.gz PREFIX ${PROJECT_BINARY_DIR} @@ -39,7 +37,7 @@ function(GetReleasedDep) BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) endfunction() @@ -60,7 +58,7 @@ function(GetTag t) BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt + PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) endfunction() @@ -76,10 +74,3 @@ else() endif() endif() - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" - PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake - HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" -) diff --git a/firestore/CMakeLists.txt b/firestore/CMakeLists.txt index 808778442d..59e5813ab3 100644 --- a/firestore/CMakeLists.txt +++ b/firestore/CMakeLists.txt @@ -392,7 +392,8 @@ elseif(IOS) nanopb gRPC-C++ gRPC-Core - FirebaseAuth/Interop + FirebaseAuthInterop/FirebaseAuth/Interop + FirebaseCoreExtension/FirebaseCore/Extension ) if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks") diff --git a/firestore/src/main/create_credentials_provider_ios.mm b/firestore/src/main/create_credentials_provider_ios.mm index c8eee6e0c3..c961180e60 100644 --- a/firestore/src/main/create_credentials_provider_ios.mm +++ b/firestore/src/main/create_credentials_provider_ios.mm @@ -17,7 +17,11 @@ #include "firestore/src/main/create_credentials_provider.h" #import "FIRAuthInterop.h" -#import "FirebaseCoreInternal.h" +#import "FirebaseCore.h" +#import "FIRAppInternal.h" +#import "FIRComponent.h" +#import "FIRComponentContainer.h" +#import "FIRComponentType.h" #include "Firestore/core/src/credentials/firebase_auth_credentials_provider_apple.h" #include "absl/memory/memory.h" From 725e2d44c892af0fe308c29aa00a87129b68aa62 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 15:19:52 -0700 Subject: [PATCH 35/93] Format code. --- firestore/src/main/create_credentials_provider_ios.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/src/main/create_credentials_provider_ios.mm b/firestore/src/main/create_credentials_provider_ios.mm index c961180e60..8b5c35cc12 100644 --- a/firestore/src/main/create_credentials_provider_ios.mm +++ b/firestore/src/main/create_credentials_provider_ios.mm @@ -16,12 +16,12 @@ #include "firestore/src/main/create_credentials_provider.h" -#import "FIRAuthInterop.h" -#import "FirebaseCore.h" #import "FIRAppInternal.h" +#import "FIRAuthInterop.h" #import "FIRComponent.h" #import "FIRComponentContainer.h" #import "FIRComponentType.h" +#import "FirebaseCore.h" #include "Firestore/core/src/credentials/firebase_auth_credentials_provider_apple.h" #include "absl/memory/memory.h" From 0602b35619b22005ed0c0fe3f965eea1fb19a785 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 15:20:36 -0700 Subject: [PATCH 36/93] Add NOLINT --- firestore/integration_test_internal/src/leveldb_snappy_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index 781481b763..ec57d11028 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -24,4 +24,4 @@ // TODO(dconeybe) Import ALL the unit tests from the iOS SDK by adding them // to the CMakeLists.txt in the parent directory of this file. That way we can // run all of the tests from the iOS SDK on each platform targeted by this repo. -#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" +#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" // NOLINT From b78d97ad34092595a9b15be608527ff2152189cd Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 15:52:11 -0700 Subject: [PATCH 37/93] Remove included test with bad include path. --- firestore/integration_test_internal/src/leveldb_snappy_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index ec57d11028..99e67ff34f 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -24,4 +24,5 @@ // TODO(dconeybe) Import ALL the unit tests from the iOS SDK by adding them // to the CMakeLists.txt in the parent directory of this file. That way we can // run all of the tests from the iOS SDK on each platform targeted by this repo. -#include "Firestore/core/test/unit/local/leveldb_snappy_test.cc" // NOLINT +// (This currently fails due to include paths on iOS, so it's been commented out for now.) +// #include "FirebaseFirestore/Firestore/core/test/unit/local/leveldb_snappy_test.cc" From 19ee687792847c24e1eeb163de23610bcc3e1fbf Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 16:04:09 -0700 Subject: [PATCH 38/93] Fix internal test podfile --- firestore/integration_test_internal/Podfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/firestore/integration_test_internal/Podfile b/firestore/integration_test_internal/Podfile index 7457898e5a..34cca6b1cb 100644 --- a/firestore/integration_test_internal/Podfile +++ b/firestore/integration_test_internal/Podfile @@ -1,17 +1,18 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Cloud Firestore internal test application. +use_frameworks! :linkage => :static target 'integration_test' do platform :ios, '10.0' - pod 'Firebase/Firestore', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Firestore', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end target 'integration_test_tvos' do platform :tvos, '12.0' - pod 'Firebase/Firestore', '8.15.0' - pod 'Firebase/Auth', '8.15.0' + pod 'Firebase/Firestore', '9.0.0' + pod 'Firebase/Auth', '9.0.0' end post_install do |installer| From 1dbbe58ded75446e405762fa9adbb168a2625809 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 25 Apr 2022 16:04:51 -0700 Subject: [PATCH 39/93] Fix podfiles --- firestore/integration_test/Podfile | 2 +- firestore/integration_test_internal/Podfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/firestore/integration_test/Podfile b/firestore/integration_test/Podfile index 6f189a0926..34db9bc827 100644 --- a/firestore/integration_test/Podfile +++ b/firestore/integration_test/Podfile @@ -1,6 +1,6 @@ source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' -# Firebase Realtime Firestore test application. +# Cloud Firestore test application. use_frameworks! :linkage => :static target 'integration_test' do diff --git a/firestore/integration_test_internal/Podfile b/firestore/integration_test_internal/Podfile index 34cca6b1cb..fce9c0e854 100644 --- a/firestore/integration_test_internal/Podfile +++ b/firestore/integration_test_internal/Podfile @@ -1,5 +1,5 @@ +source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '10.0' # Cloud Firestore internal test application. use_frameworks! :linkage => :static From d3d051d8dcbd10ca6c9657478546d3c70c802183 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Mon, 25 Apr 2022 20:52:06 -0400 Subject: [PATCH 40/93] Revert some junk that got pulled in when #898 was merged into this branch --- cmake/external/firestore.cmake | 5 +- cmake/external/firestore_patch.py | 122 --- cmake/external/firestore_patch_test.py | 265 ------ cmake/external/firestore_snappy.patch.txt | 889 ++++++++++++++++++ cmake/external/leveldb.cmake | 1 - .../integration_test_internal/CMakeLists.txt | 7 - .../src/leveldb_snappy_test.cc | 234 ++++- 7 files changed, 1119 insertions(+), 404 deletions(-) delete mode 100644 cmake/external/firestore_patch.py delete mode 100644 cmake/external/firestore_patch_test.py create mode 100644 cmake/external/firestore_snappy.patch.txt diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 762f133c79..7b67544c56 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -13,7 +13,6 @@ # limitations under the License. include(ExternalProject) -include(FindPythonInterp) if(TARGET firestore) return() @@ -37,7 +36,7 @@ function(GetReleasedDep) BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) endfunction() @@ -58,7 +57,7 @@ function(GetTag t) BUILD_COMMAND "" INSTALL_COMMAND "" TEST_COMMAND "" - PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/firestore_patch.py --leveldb-version-from ${CMAKE_CURRENT_LIST_DIR}/leveldb.cmake + PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/firestore_snappy.patch.txt HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ) endfunction() diff --git a/cmake/external/firestore_patch.py b/cmake/external/firestore_patch.py deleted file mode 100644 index b5b50a258e..0000000000 --- a/cmake/external/firestore_patch.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2022 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. - -""" -Modify the version in leveldb.cmake from the Firebase iOS SDK to match the -version from this C++ SDK. -""" - -import argparse -import os -import pathlib -import re -from typing import List, Tuple - - -VERSION_PATTERN = r"\s*set\s*\(\s*version\s+([^)\s]+)\s*\)\s*" -VERSION_EXPR = re.compile(VERSION_PATTERN, re.IGNORECASE) -URL_HASH_PATTERN = r"\s*URL_HASH\s+([0-9a-zA-Z=]+)\s*" -URL_HASH_EXPR = re.compile(URL_HASH_PATTERN, re.IGNORECASE) - - -def main() -> None: - (src_file, dest_file) = parse_args() - - leveldb_version = load_value(src_file, VERSION_EXPR) - url_hash = load_value(src_file, URL_HASH_EXPR) - - set_value(dest_file, VERSION_EXPR, leveldb_version) - set_value(dest_file, URL_HASH_EXPR, url_hash) - - -def parse_args() -> Tuple[pathlib.Path, pathlib.Path]: - arg_parser = argparse.ArgumentParser() - arg_parser.add_argument("--leveldb-version-from", required=True) - arg_parser.add_argument("--leveldb-version-to") - - parsed_args = arg_parser.parse_args() - - leveldb_cmake_src_file = pathlib.Path(parsed_args.leveldb_version_from) - - if parsed_args.leveldb_version_to: - leveldb_cmake_dest_file = pathlib.Path(parsed_args.leveldb_version_to) - else: - leveldb_cmake_dest_file = pathlib.Path.cwd() \ - / "cmake" / "external" / "leveldb.cmake" - - return (leveldb_cmake_src_file, leveldb_cmake_dest_file) - - -def load_value(file_: pathlib.Path, expr: re.Pattern) -> str: - value = None - value_line = None - value_line_number = None - - with file_.open("rt", encoding="utf8") as f: - for (line_number, line) in enumerate(f, start=1): - match = expr.fullmatch(line) - if not match: - continue - elif value is not None: - raise RegexMatchError( - f"Multiple lines matching regex {expr.pattern} found in " - f"{file_}: line {value_line_number}, {value_line.strip()} " - f"and line {line_number}, {line.strip()}") - - value = match.group(1).strip() - value_line = line - value_line_number = line_number - - if value is None: - raise RegexMatchError( - f"No line matching regex {expr.pattern} found in {file_}") - - return value - - -def set_value(file_: pathlib.Path, expr: re.Pattern, version: str) -> None: - with file_.open("rt", encoding="utf8") as f: - lines = list(f) - - matching_line = None - matching_line_number = None - - for (line_number, line) in enumerate(lines, start=1): - match = expr.fullmatch(line) - if not match: - continue - elif matching_line is not None: - raise RegexMatchError( - f"Multiple lines matching regex {expr.pattern} found in " - f"{file_}: line {matching_line_number}, {matching_line.strip()} " - f"and line {line_number}, {line.strip()}") - - lines[line_number - 1] = line[:match.start(1)] + version + line[match.end(1):] - matching_line = line - matching_line_number = line_number - - if matching_line is None: - raise RegexMatchError( - f"No line matching regex {expr.pattern} found in {file_}") - - with file_.open("wt", encoding="utf8") as f: - f.writelines(lines) - - -class RegexMatchError(Exception): - pass - - -if __name__ == "__main__": - main() diff --git a/cmake/external/firestore_patch_test.py b/cmake/external/firestore_patch_test.py deleted file mode 100644 index bf739be555..0000000000 --- a/cmake/external/firestore_patch_test.py +++ /dev/null @@ -1,265 +0,0 @@ -# Copyright 2022 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. - -import os -import pathlib -import re -import shutil -import tempfile -from typing import Iterable -import unittest -import unittest.mock - -import firestore_patch - - -class TestUtilsMixin: - - def create_temp_file_with_lines(self, lines: Iterable[str]) -> pathlib.Path: - (handle, path_str) = tempfile.mkstemp() - os.close(handle) - path = pathlib.Path(path_str) - self.addCleanup(path.unlink, missing_ok=True) # pytype: disable=attribute-error - - with path.open("wt", encoding="utf8") as f: - for line in lines: - print(line, file=f) - - return path - - def create_temp_file_with_line(self, line: str) -> pathlib.Path: - return self.create_temp_file_with_lines([line]) - - -class MainTest(TestUtilsMixin, unittest.TestCase): - - def test(self): - src_file = self.create_temp_file_with_lines([ - "aaa", - "bbb", - "set(version 1.2.3)", - "URL_HASH SHA256=abcdef", - "ccc", - "ddd", - ]) - dest_file = self.create_temp_file_with_lines([ - "aaa", - "bbb", - "set(version 4.5.6)", - "URL_HASH SHA256=ghijkl", - "ccc", - "ddd", - ]) - dest_file_contents_before = dest_file.read_text(encoding="utf8") - patcher = unittest.mock.patch.object( - firestore_patch, - "parse_args", - spec_set=True, - autospec=True, - return_value=(src_file, dest_file) - ) - - with patcher: - firestore_patch.main() - - dest_file_contents_after = dest_file.read_text(encoding="utf8") - self.assertEqual( - dest_file_contents_after, - dest_file_contents_before - .replace("4.5.6", "1.2.3") - .replace("ghijkl", "abcdef") - ) - - -class VersionExprTest(TestUtilsMixin, unittest.TestCase): - - def test_matches_semantic_version(self): - path = self.create_temp_file_with_line("set(version 1.2.3)") - - value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - - self.assertEqual(value, "1.2.3") - - def test_matches_sha1(self): - path = self.create_temp_file_with_line("set(version fd054fa01)") - - value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - - self.assertEqual(value, "fd054fa01") - - def test_ignores_whitespace(self): - path = self.create_temp_file_with_line(" set ( version 1.2.3 ) ") - - value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - - self.assertEqual(value, "1.2.3") - - def test_case_insensitive(self): - path = self.create_temp_file_with_line("sEt(vErSiOn 1.2.3)") - - value = firestore_patch.load_value(path, firestore_patch.VERSION_EXPR) - - self.assertEqual(value, "1.2.3") - - -class UrlHashExprTest(TestUtilsMixin, unittest.TestCase): - - def test_matches_sha256(self): - path = self.create_temp_file_with_line("URL_HASH SHA256=abc123def456") - - value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) - - self.assertEqual(value, "SHA256=abc123def456") - - def test_ignores_whitespace(self): - path = self.create_temp_file_with_line(" URL_HASH abc123def456 ") - - value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) - - self.assertEqual(value, "abc123def456") - - def test_case_insensitive(self): - path = self.create_temp_file_with_line("UrL_hAsH Sha256=abc123def456") - - value = firestore_patch.load_value(path, firestore_patch.URL_HASH_EXPR) - - self.assertEqual(value, "Sha256=abc123def456") - - -class LoadValueTest(TestUtilsMixin, unittest.TestCase): - - def test_loads_the_value(self): - path = self.create_temp_file_with_line("aaa1234ccc") - expr = re.compile(r"\D+(\d+)\D+") - - value = firestore_patch.load_value(path, expr) - - self.assertEqual(value, "1234") - - def test_loads_the_value_ignoring_non_matching_lines(self): - path = self.create_temp_file_with_lines([ - "blah", - "blah", - "aaa1234cccc", - "blah", - "blah", - ]) - expr = re.compile(r"\D+(\d+)\D+") - - value = firestore_patch.load_value(path, expr) - - self.assertEqual(value, "1234") - - def test_raises_error_if_no_matching_line_found(self): - path = self.create_temp_file_with_lines([ - "blah", - "blah", - "blah", - "blah", - ]) - expr = re.compile(r"\D+(\d+)\D+") - - with self.assertRaises(firestore_patch.RegexMatchError) as cm: - firestore_patch.load_value(path, expr) - - self.assertIn("no line matching", str(cm.exception).lower()) - self.assertIn(expr.pattern, str(cm.exception)) - self.assertIn(str(path), str(cm.exception)) - - def test_raises_error_if_multiple_matching_lines_found(self): - lines = ["blah"] * 100 - lines.append("aaa123bbb") - lines.append("ccc456ddd") - path = self.create_temp_file_with_lines(lines) - expr = re.compile(r"\D+(\d+)\D+") - - with self.assertRaises(firestore_patch.RegexMatchError) as cm: - firestore_patch.load_value(path, expr) - - self.assertIn("multiple lines matching", str(cm.exception).lower()) - self.assertIn(str(path), str(cm.exception)) - self.assertIn(expr.pattern, str(cm.exception)) - self.assertIn("line 101", str(cm.exception)) - self.assertIn("line 102", str(cm.exception)) - self.assertIn("123", str(cm.exception)) - self.assertIn("456", str(cm.exception)) - - -class SaveValueTest(TestUtilsMixin, unittest.TestCase): - - def test_saves_the_value(self): - path = self.create_temp_file_with_line("aaa1234ccc") - expr = re.compile(r"\D+(\d+)\D+") - - firestore_patch.set_value(path, expr, "9876") - - new_value = firestore_patch.load_value(path, expr) - self.assertEqual(new_value, "9876") - - def test_saves_the_value_ignoring_non_matching_lines(self): - path = self.create_temp_file_with_lines([ - "blah", - "blah", - "aaa1234cccc", - "blah", - "blah", - ]) - expr = re.compile(r"\D+(\d+)\D+") - file_contents_before = path.read_text(encoding="utf8") - - firestore_patch.set_value(path, expr, "9876") - - file_contents_after = path.read_text(encoding="utf8") - self.assertEqual( - file_contents_after, - file_contents_before.replace("1234", "9876"), - ) - - def test_raises_error_if_no_matching_line_found(self): - path = self.create_temp_file_with_lines([ - "blah", - "blah", - "blah", - "blah", - ]) - expr = re.compile(r"\D+(\d+)\D+") - - with self.assertRaises(firestore_patch.RegexMatchError) as cm: - firestore_patch.set_value(path, expr, "") - - self.assertIn("no line matching", str(cm.exception).lower()) - self.assertIn(expr.pattern, str(cm.exception)) - self.assertIn(str(path), str(cm.exception)) - - def test_raises_error_if_multiple_matching_lines_found(self): - lines = ["blah"] * 100 - lines.append("aaa123bbb") - lines.append("ccc456ddd") - path = self.create_temp_file_with_lines(lines) - expr = re.compile(r"\D+(\d+)\D+") - - with self.assertRaises(firestore_patch.RegexMatchError) as cm: - firestore_patch.set_value(path, expr, "") - - self.assertIn("multiple lines matching", str(cm.exception).lower()) - self.assertIn(str(path), str(cm.exception)) - self.assertIn(expr.pattern, str(cm.exception)) - self.assertIn("line 101", str(cm.exception)) - self.assertIn("line 102", str(cm.exception)) - self.assertIn("123", str(cm.exception)) - self.assertIn("456", str(cm.exception)) - - -if __name__ == "__main__": - unittest.main() diff --git a/cmake/external/firestore_snappy.patch.txt b/cmake/external/firestore_snappy.patch.txt new file mode 100644 index 0000000000..3cab9246f1 --- /dev/null +++ b/cmake/external/firestore_snappy.patch.txt @@ -0,0 +1,889 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 29458bf13..7be37691d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -227,6 +227,12 @@ if(NOT ZLIB_FOUND) + endif() + + ++# Snappy ++set(SNAPPY_BUILD_TESTS OFF CACHE BOOL "Firestore disabled") ++set(SNAPPY_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled") ++add_external_subdirectory(snappy) ++firebase_ios_add_alias(Snappy::Snappy snappy) ++ + # LevelDB + set(LEVELDB_BUILD_TESTS OFF CACHE BOOL "Firestore disabled") + set(LEVELDB_BUILD_BENCHMARKS OFF CACHE BOOL "Firestore disabled") +diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt +index 2179633a8..c1de37b6d 100644 +--- a/cmake/external/CMakeLists.txt ++++ b/cmake/external/CMakeLists.txt +@@ -30,6 +30,7 @@ include(c-ares) + include(googletest) + include(GoogleUtilities) + include(grpc) ++include(snappy) + include(leveldb) + include(libfuzzer) + include(nanopb) +diff --git a/cmake/external/leveldb.cmake b/cmake/external/leveldb.cmake +index b71a77535..2556d7041 100644 +--- a/cmake/external/leveldb.cmake ++++ b/cmake/external/leveldb.cmake +@@ -13,20 +13,27 @@ + # limitations under the License. + + include(ExternalProject) ++include(FindPythonInterp) + + if(TARGET leveldb) + return() + endif() + +-set(version 1.22) ++set(version 1.23) ++ ++ExternalProject_Get_property(snappy SOURCE_DIR) ++set(snappy_source_dir "${SOURCE_DIR}") ++ExternalProject_Get_property(snappy BINARY_DIR) ++set(snappy_binary_dir "${BINARY_DIR}") + + ExternalProject_Add( + leveldb + ++ DEPENDS snappy ++ + DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} + DOWNLOAD_NAME leveldb-${version}.tar.gz + URL https://github.com/google/leveldb/archive/${version}.tar.gz +- URL_HASH SHA256=55423cac9e3306f4a9502c738a001e4a339d1a38ffbee7572d4a07d5d63949b2 + + PREFIX ${PROJECT_BINARY_DIR} + +@@ -34,6 +41,7 @@ ExternalProject_Add( + BUILD_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" ++ PATCH_COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/leveldb_patch.py --snappy-source-dir ${snappy_source_dir} --snappy-binary-dir ${snappy_binary_dir} + + HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" + ) +diff --git a/cmake/external/leveldb_patch.py b/cmake/external/leveldb_patch.py +new file mode 100644 +index 000000000..51a62d54a +--- /dev/null ++++ b/cmake/external/leveldb_patch.py +@@ -0,0 +1,144 @@ ++# Copyright 2022 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. ++ ++""" ++Modify the CMakeLists.txt from LevelDb to staticly link Snappy compression ++support. ++""" ++ ++import argparse ++import dataclasses ++import os ++import pathlib ++from typing import Iterable, Sequence ++ ++ ++def main() -> None: ++ arg_parser = argparse.ArgumentParser() ++ arg_parser.add_argument("--snappy-source-dir", required=True) ++ arg_parser.add_argument("--snappy-binary-dir", required=True) ++ parsed_args = arg_parser.parse_args() ++ del arg_parser ++ snappy_source_dir = pathlib.Path(parsed_args.snappy_source_dir) ++ snappy_binary_dir = pathlib.Path(parsed_args.snappy_binary_dir) ++ del parsed_args ++ ++ cmakelists_txt_file = pathlib.Path("CMakeLists.txt") ++ with cmakelists_txt_file.open("rt", encoding="utf8") as f: ++ lines = tuple(f) ++ ++ patcher = CMakeListsPatcher( ++ lines, ++ os.path.abspath(__file__), ++ snappy_source_dir, ++ snappy_binary_dir, ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ with cmakelists_txt_file.open("wt", encoding="utf8") as f: ++ f.writelines(patched_lines) ++ ++ ++@dataclasses.dataclass(frozen=True) ++class LineComponents: ++ full: str ++ indent: str ++ line: str ++ eol: str ++ ++ ++class CMakeListsPatcher: ++ ++ SNAPPY_DETECT_LINE = \ ++ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""" ++ SNAPPY_INCLUDE_LINE = \ ++ "target_include_directories(leveldb" ++ SNAPPY_LINK_LINE = \ ++ "target_link_libraries(leveldb snappy)" ++ ++ def __init__( ++ self, ++ lines: Sequence[str], ++ script_name: str, ++ snappy_source_dir: pathlib.Path, ++ snappy_binary_dir: pathlib.Path) -> None: ++ self.i = 0 ++ self.lines = lines ++ self.script_name = script_name ++ self.snappy_source_dir_str = snappy_source_dir.as_posix() ++ self.snappy_binary_dir_str = snappy_binary_dir.as_posix() ++ ++ def patch(self) -> Iterable[str]: ++ while self.i < len(self.lines): ++ full_line = self.lines[self.i] ++ line = self._split_line(full_line) ++ self.i += 1 ++ ++ if line.line == self.SNAPPY_DETECT_LINE: ++ yield from self._on_snappy_detect_line(line) ++ elif line.line == self.SNAPPY_INCLUDE_LINE: ++ yield full_line ++ yield from self._on_leveldb_include_start() ++ elif line.line == self.SNAPPY_LINK_LINE: ++ yield from self._on_leveldb_snappy_link_line(line) ++ else: ++ yield full_line ++ ++ def _begin_mod_line(self, mod_name: str) -> str: ++ return f"# BEGIN: {mod_name} modification by {self.script_name}" ++ ++ def _end_mod_line(self, mod_name: str) -> str: ++ return f"# END: {mod_name} modification by {self.script_name}" ++ ++ def _on_snappy_detect_line(self, line: LineComponents) -> Iterable[str]: ++ yield self._begin_mod_line("snappy_detect_line") + line.eol ++ yield line.indent + "# " + line.line + line.eol ++ yield line.indent + """set(HAVE_SNAPPY ON CACHE BOOL "")""" + line.eol ++ yield self._end_mod_line("snappy_detect_line") + line.eol ++ ++ def _on_leveldb_include_start(self) -> Iterable[str]: ++ line1 = self._split_line(self.lines[self.i]) ++ line2 = self._split_line(self.lines[self.i + 1]) ++ begin_mod_line = self._begin_mod_line("leveldb_include_start") ++ ++ if line1.line == begin_mod_line: ++ return ++ ++ yield begin_mod_line + line1.eol ++ yield line1.indent + "PRIVATE" + line1.eol ++ yield line2.indent + self.snappy_source_dir_str + line2.eol ++ yield line2.indent + self.snappy_binary_dir_str + line2.eol ++ yield self._end_mod_line("leveldb_include_start") + line1.eol ++ ++ def _on_leveldb_snappy_link_line(self, line: LineComponents) -> Iterable[str]: ++ yield self._begin_mod_line("leveldb_snappy_link_line") + line.eol ++ yield line.indent + "# " + line.line + line.eol ++ yield line.indent + f"target_link_libraries(leveldb Snappy::Snappy)" + line.eol ++ yield self._end_mod_line("leveldb_snappy_link_line") + line.eol ++ ++ def _split_line(self, line: str) -> LineComponents: ++ line_rstripped = line.rstrip() ++ eol = line[len(line_rstripped):] ++ line_stripped = line_rstripped.strip() ++ indent = line_rstripped[:len(line_rstripped) - len(line_stripped)] ++ return LineComponents(full=line, indent=indent, line=line_stripped, eol=eol) ++ ++ ++class LeveDbPatchException(Exception): ++ pass ++ ++ ++if __name__ == "__main__": ++ main() +diff --git a/cmake/external/leveldb_patch_test.py b/cmake/external/leveldb_patch_test.py +new file mode 100644 +index 000000000..b1d62526b +--- /dev/null ++++ b/cmake/external/leveldb_patch_test.py +@@ -0,0 +1,328 @@ ++# Copyright 2022 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. ++ ++import leveldb_patch ++import pathlib ++import unittest ++ ++ ++class CMakeListsPatcherTest(unittest.TestCase): ++ ++ def setUp(self): ++ super().setUp() ++ self.sample_snappy_source_dir = pathlib.Path("a/b/snappy_source_dir") ++ self.sample_snappy_binary_dir = pathlib.Path("a/b/snappy_binary_dir") ++ ++ def test_snappy_detect_line_is_commented_and_replaced(self): ++ lines = ( ++ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ "MyCoolScript", ++ self.sample_snappy_source_dir, ++ self.sample_snappy_binary_dir, ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "# BEGIN: snappy_detect_line modification by MyCoolScript", ++ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ """set(HAVE_SNAPPY ON CACHE BOOL "")""", ++ "# END: snappy_detect_line modification by MyCoolScript", ++ ]) ++ ++ def test_snappy_detect_line_has_indent_and_eol_preserved(self): ++ lines = ( ++ """ check_library_exists(snappy snappy_compress "" HAVE_SNAPPY) \n""", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ "MyCoolScript", ++ self.sample_snappy_source_dir, ++ self.sample_snappy_binary_dir, ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "# BEGIN: snappy_detect_line modification by MyCoolScript \n", ++ """ # check_library_exists(snappy snappy_compress "" HAVE_SNAPPY) \n""", ++ """ set(HAVE_SNAPPY ON CACHE BOOL "") \n""", ++ "# END: snappy_detect_line modification by MyCoolScript \n", ++ ]) ++ ++ def test_snappy_detect_line_does_not_affect_surrounding_lines(self): ++ lines = ( ++ "aaa", ++ "bbb", ++ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ "ccc", ++ "ddd", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ "MyCoolScript", ++ self.sample_snappy_source_dir, ++ self.sample_snappy_binary_dir, ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "aaa", ++ "bbb", ++ "# BEGIN: snappy_detect_line modification by MyCoolScript", ++ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ """set(HAVE_SNAPPY ON CACHE BOOL "")""", ++ "# END: snappy_detect_line modification by MyCoolScript", ++ "ccc", ++ "ddd", ++ ]) ++ ++ def test_snappy_include_is_amended(self): ++ lines = ( ++ "target_include_directories(leveldb", ++ "PUBLIC", ++ "path1", ++ "path2", ++ ")", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "target_include_directories(leveldb", ++ "# BEGIN: leveldb_include_start modification by MyCoolSript", ++ "PRIVATE", ++ "a/b", ++ "c/d", ++ "# END: leveldb_include_start modification by MyCoolSript", ++ "PUBLIC", ++ "path1", ++ "path2", ++ ")", ++ ]) ++ ++ def test_snappy_include_lines_adopt_indenting_and_eol_convention(self): ++ lines = ( ++ "target_include_directories(leveldb\n", ++ " PUBLIC \n", ++ " path1 \n", ++ " path2 \n", ++ ")\n", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "target_include_directories(leveldb\n", ++ "# BEGIN: leveldb_include_start modification by MyCoolSript \n", ++ " PRIVATE \n", ++ " a/b \n", ++ " c/d \n", ++ "# END: leveldb_include_start modification by MyCoolSript \n", ++ " PUBLIC \n", ++ " path1 \n", ++ " path2 \n", ++ ")\n", ++ ]) ++ ++ def test_snappy_include_line_does_not_affect_surrounding_lines(self): ++ lines = ( ++ "aaa", ++ "bbb", ++ "target_include_directories(leveldb", ++ "PUBLIC", ++ "path1", ++ "path2", ++ ")", ++ "ccc", ++ "ddd", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "aaa", ++ "bbb", ++ "target_include_directories(leveldb", ++ "# BEGIN: leveldb_include_start modification by MyCoolSript", ++ "PRIVATE", ++ "a/b", ++ "c/d", ++ "# END: leveldb_include_start modification by MyCoolSript", ++ "PUBLIC", ++ "path1", ++ "path2", ++ ")", ++ "ccc", ++ "ddd", ++ ]) ++ ++ def test_leveldb_snappy_link_line_is_commented_and_replaced(self): ++ lines = ( ++ "target_link_libraries(leveldb snappy)", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", ++ "# target_link_libraries(leveldb snappy)", ++ "target_link_libraries(leveldb Snappy::Snappy)", ++ "# END: leveldb_snappy_link_line modification by MyCoolSript", ++ ]) ++ ++ def test_leveldb_snappy_link_line_has_indent_and_eol_preserved(self): ++ lines = ( ++ " target_link_libraries(leveldb snappy) \n", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript \n", ++ " # target_link_libraries(leveldb snappy) \n", ++ " target_link_libraries(leveldb Snappy::Snappy) \n", ++ "# END: leveldb_snappy_link_line modification by MyCoolSript \n", ++ ]) ++ ++ def test_leveldb_snappy_link_line_does_not_affect_surrounding_lines(self): ++ lines = ( ++ "aaa", ++ "bbb", ++ "target_link_libraries(leveldb snappy)", ++ "ccc", ++ "ddd", ++ ) ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "aaa", ++ "bbb", ++ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", ++ "# target_link_libraries(leveldb snappy)", ++ "target_link_libraries(leveldb Snappy::Snappy)", ++ "# END: leveldb_snappy_link_line modification by MyCoolSript", ++ "ccc", ++ "ddd", ++ ]) ++ ++ def test_all_patches_combined(self): ++ lines = ( ++ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ "target_include_directories(leveldb", ++ "PUBLIC", ++ "path1", ++ ")", ++ "target_link_libraries(leveldb snappy)", ++ ) ++ ++ patcher = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ patched_lines = tuple(patcher.patch()) ++ ++ self.assertSequenceEqual(patched_lines, [ ++ "# BEGIN: snappy_detect_line modification by MyCoolSript", ++ """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", ++ """set(HAVE_SNAPPY ON CACHE BOOL "")""", ++ "# END: snappy_detect_line modification by MyCoolSript", ++ "target_include_directories(leveldb", ++ "# BEGIN: leveldb_include_start modification by MyCoolSript", ++ "PRIVATE", ++ "a/b", ++ "c/d", ++ "# END: leveldb_include_start modification by MyCoolSript", ++ "PUBLIC", ++ "path1", ++ ")", ++ "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", ++ "# target_link_libraries(leveldb snappy)", ++ "target_link_libraries(leveldb Snappy::Snappy)", ++ "# END: leveldb_snappy_link_line modification by MyCoolSript", ++ ]) ++ ++ def test_idempotence(self): ++ lines = ( ++ """check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)\n""", ++ "target_include_directories(leveldb", ++ "PUBLIC", ++ "path1", ++ ")", ++ "target_link_libraries(leveldb snappy)", ++ ) ++ ++ patcher1 = leveldb_patch.CMakeListsPatcher( ++ lines, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ patched_lines1 = tuple(patcher1.patch()) ++ patcher2 = leveldb_patch.CMakeListsPatcher( ++ patched_lines1, ++ script_name="MyCoolSript", ++ snappy_source_dir=pathlib.Path("a/b"), ++ snappy_binary_dir=pathlib.Path("c/d"), ++ ) ++ patched_lines2 = tuple(patcher2.patch()) ++ ++ self.assertSequenceEqual(patched_lines1, patched_lines2) ++ ++ ++if __name__ == "__main__": ++ unittest.main() +diff --git a/cmake/external/snappy.cmake b/cmake/external/snappy.cmake +new file mode 100644 +index 000000000..9f25c03d0 +--- /dev/null ++++ b/cmake/external/snappy.cmake +@@ -0,0 +1,40 @@ ++# Copyright 2022 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. ++ ++include(ExternalProject) ++ ++if(TARGET snappy) ++ return() ++endif() ++ ++set(version 1.1.9) ++ ++ExternalProject_Add( ++ snappy ++ ++ DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} ++ DOWNLOAD_NAME snappy-${version}.tar.gz ++ URL https://github.com/google/snappy/archive/refs/tags/${version}.tar.gz ++ URL_HASH SHA256=75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7 ++ ++ PREFIX ${PROJECT_BINARY_DIR} ++ ++ CONFIGURE_COMMAND "" ++ BUILD_COMMAND "" ++ INSTALL_COMMAND "" ++ TEST_COMMAND "" ++ PATCH_COMMAND patch -Np1 -i ${CMAKE_CURRENT_LIST_DIR}/snappy.patch ++ ++ HTTP_HEADER "${EXTERNAL_PROJECT_HTTP_HEADER}" ++) +diff --git a/cmake/external/snappy.patch b/cmake/external/snappy.patch +new file mode 100644 +index 000000000..28bfb0837 +--- /dev/null ++++ b/cmake/external/snappy.patch +@@ -0,0 +1,12 @@ ++diff -Naur snappy/snappy.cc snappy_patched/snappy.cc ++--- snappy/snappy.cc 2022-04-12 20:44:55.000000000 -0400 +++++ snappy_patched/snappy.cc 2022-04-12 20:47:05.000000000 -0400 ++@@ -1014,7 +1014,7 @@ ++ } ++ ++ SNAPPY_ATTRIBUTE_ALWAYS_INLINE ++-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { +++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) { ++ const uint8_t*& ip = *ip_p; ++ // This section is crucial for the throughput of the decompression loop. ++ // The latency of an iteration is fundamentally constrained by the +diff --git a/Firestore/Protos/CMakeLists.txt b/Firestore/Protos/CMakeLists.txt +index 85589b35f..96da74110 100644 +--- a/Firestore/Protos/CMakeLists.txt ++++ b/Firestore/Protos/CMakeLists.txt +@@ -12,7 +12,12 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-include(FindPythonInterp) ++include(python_setup) ++FirebaseSetupPythonInterpreter( ++ OUTVAR MY_PYTHON_EXECUTABLE ++ KEY FirestoreProtos ++ REQUIREMENTS six ++) + + # Generate output in-place. So long as the build is idempotent this helps + # verify that the protoc-generated output isn't changing. +@@ -200,7 +205,7 @@ if(FIREBASE_IOS_PROTOC_GENERATE_SOURCES) + COMMENT "Generating nanopb sources" + OUTPUT ${NANOPB_GENERATED_SOURCES} + COMMAND +- ${PYTHON_EXECUTABLE} ++ ${MY_PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py + --nanopb + --protoc=$ +@@ -232,7 +237,7 @@ if(FIREBASE_IOS_PROTOC_GENERATE_SOURCES) + COMMENT "Generating C++ protobuf sources" + OUTPUT ${PROTOBUF_CPP_GENERATED_SOURCES} + COMMAND +- ${PYTHON_EXECUTABLE} ++ ${MY_PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py + --cpp + --protoc=$ +diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt +index aeb96431b..a1f477cbe 100644 +--- a/Firestore/core/CMakeLists.txt ++++ b/Firestore/core/CMakeLists.txt +@@ -14,8 +14,12 @@ + + include(CheckSymbolExists) + include(CheckIncludeFiles) +-include(FindPythonInterp) + ++include(python_setup) ++FirebaseSetupPythonInterpreter( ++ OUTVAR MY_PYTHON_EXECUTABLE ++ KEY FirestoreCore ++) + + ## firestore_util + +@@ -286,7 +290,7 @@ add_custom_command( + OUTPUT + ${GRPC_ROOT_CERTIFICATE_SOURCES} + COMMAND +- ${PYTHON_EXECUTABLE} ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py ++ ${MY_PYTHON_EXECUTABLE} ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py + --output_header=${OUTPUT_DIR}/grpc_root_certificates_generated.h + --output_source=${OUTPUT_DIR}/grpc_root_certificates_generated.cc + --cpp_namespace=firebase::firestore::remote +diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt +index 2179633a8..794936fe4 100644 +--- a/cmake/external/CMakeLists.txt ++++ b/cmake/external/CMakeLists.txt +@@ -15,7 +15,12 @@ + cmake_minimum_required(VERSION 3.5.1) + project(Firebase-download C CXX) + +-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) ++list( ++ APPEND ++ CMAKE_MODULE_PATH ++ ${CMAKE_CURRENT_LIST_DIR} ++ ${CMAKE_CURRENT_LIST_DIR}/.. ++) + + set( + FIREBASE_DOWNLOAD_DIR +diff --git a/cmake/python_setup.cmake b/cmake/python_setup.cmake +new file mode 100644 +index 000000000..bdb7b9f6a +--- /dev/null ++++ b/cmake/python_setup.cmake +@@ -0,0 +1,183 @@ ++# Copyright 2022 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. ++ ++# Sets up an isolated Python interpreter, installing required dependencies. ++# ++# This function does the following: ++# 1. Finds a Python interpreter using the best-available built-in cmake ++# mechanism do do so. This is referred to as the "host" interpreter. ++# 2. Creates a Python virtualenv in the cmake binary directory using the ++# host Python interpreter found in the previous step. ++# 3. Locates the Python interpreter in the virtualenv and sets its path in ++# the specified OUTVAR variable. ++# 4. Runs `pip install` to install the specified required dependencies, if any, ++# in the virtualenv. ++# ++# This function also writes "stamp files" into the virtualenv. These files ++# are used to determine if the virtualenv is up-to-date from a previous cmake ++# run or if it needs to be recreated from scratch. It will simply be re-used if ++# possible. ++# ++# If any errors occur (e.g. cannot install one of the given requirements) then a ++# fatal error is logged, causing the cmake processing to terminate. ++# ++# See https://docs.python.org/3/library/venv.html for details about virtualenv. ++# ++# Arguments: ++# OUTVAR - The name of the variable into which to store the path of the ++# Python executable from the virtualenv. ++# KEY - A unique key to ensure isolation from other Python virtualenv ++# environments created by this function. This value will be incorporated ++# into the path of the virtualenv and incorporated into the name of the ++# cmake cache variable that stores its path. ++# REQUIREMENTS - (Optional) A list of Python packages to install in the ++# virtualenv. These will be given as arguments to `pip install`. ++# ++# Example: ++# include(python_setup) ++# FirebaseSetupPythonInterpreter( ++# OUTVAR MY_PYTHON_EXECUTABLE ++# KEY ScanStuff ++# REQUIREMENTS six absl-py ++# ) ++# execute_process(COMMAND "${MY_PYTHON_EXECUTABLE}" scan_stuff.py) ++function(FirebaseSetupPythonInterpreter) ++ cmake_parse_arguments( ++ PARSE_ARGV 0 ++ ARG ++ "" # zero-value arguments ++ "OUTVAR;KEY" # single-value arguments ++ "REQUIREMENTS" # multi-value arguments ++ ) ++ ++ # Validate this function's arguments. ++ if("${ARG_OUTVAR}" STREQUAL "") ++ message(FATAL_ERROR "OUTVAR must be specified to ${CMAKE_CURRENT_FUNCTION}") ++ elseif("${ARG_KEY}" STREQUAL "") ++ message(FATAL_ERROR "KEY must be specified to ${CMAKE_CURRENT_FUNCTION}") ++ endif() ++ ++ # Calculate the name of the cmake *cache* variable into which to store the ++ # path of the Python interpreter from the virtualenv. ++ set(CACHEVAR "FIREBASE_PYTHON_EXECUTABLE_${ARG_KEY}") ++ ++ set(LOG_PREFIX "${CMAKE_CURRENT_FUNCTION}(${ARG_KEY})") ++ ++ # Find a "host" Python interpreter using the best available mechanism. ++ if(${CMAKE_VERSION} VERSION_LESS "3.12") ++ include(FindPythonInterp) ++ set(DEFAULT_PYTHON_HOST_EXECUTABLE "${PYTHON_EXECUTABLE}") ++ else() ++ find_package(Python3 COMPONENTS Interpreter REQUIRED) ++ set(DEFAULT_PYTHON_HOST_EXECUTABLE "${Python3_EXECUTABLE}") ++ endif() ++ ++ # Get the host Python interpreter on the host system to use. ++ set( ++ FIREBASE_PYTHON_HOST_EXECUTABLE ++ "${DEFAULT_PYTHON_HOST_EXECUTABLE}" ++ CACHE FILEPATH ++ "The Python interpreter on the host system to use" ++ ) ++ ++ # Check if the virtualenv is already up-to-date by examining the contents of ++ # its stamp files. The stamp files store the path of the host Python ++ # interpreter and the dependencies that were installed by pip. If both of ++ # these files exist and contain the same Python interpreter and dependencies ++ # then just re-use the virtualenv; otherwise, re-create it. ++ set(PYVENV_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pyvenv/${ARG_KEY}") ++ set(STAMP_FILE1 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp1.txt") ++ set(STAMP_FILE2 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp2.txt") ++ ++ if(EXISTS "${STAMP_FILE1}" AND EXISTS "${STAMP_FILE2}") ++ file(READ "${STAMP_FILE1}" STAMP_FILE1_CONTENTS) ++ file(READ "${STAMP_FILE2}" STAMP_FILE2_CONTENTS) ++ if( ++ ("${STAMP_FILE1_CONTENTS}" STREQUAL "${FIREBASE_PYTHON_HOST_EXECUTABLE}") ++ AND ++ ("${STAMP_FILE2_CONTENTS}" STREQUAL "${ARG_REQUIREMENTS}") ++ ) ++ set("${ARG_OUTVAR}" "$CACHE{${CACHEVAR}}" PARENT_SCOPE) ++ message(STATUS "${LOG_PREFIX}: Using Python interpreter: $CACHE{${CACHEVAR}}") ++ return() ++ endif() ++ endif() ++ ++ # Create the virtualenv. ++ message(STATUS ++ "${LOG_PREFIX}: Creating Python virtualenv in ${PYVENV_DIRECTORY} " ++ "using ${FIREBASE_PYTHON_HOST_EXECUTABLE}" ++ ) ++ file(REMOVE_RECURSE "${PYVENV_DIRECTORY}") ++ execute_process( ++ COMMAND ++ "${FIREBASE_PYTHON_HOST_EXECUTABLE}" ++ -m ++ venv ++ "${PYVENV_DIRECTORY}" ++ RESULT_VARIABLE ++ FIREBASE_PYVENV_CREATE_RESULT ++ ) ++ if(NOT FIREBASE_PYVENV_CREATE_RESULT EQUAL 0) ++ message(FATAL_ERROR ++ "Failed to create a Python virtualenv in ${PYVENV_DIRECTORY} " ++ "using ${FIREBASE_PYTHON_HOST_EXECUTABLE}") ++ endif() ++ ++ # Find the Python interpreter in the virtualenv. ++ find_program( ++ "${CACHEVAR}" ++ DOC "The Python interpreter to use for ${ARG_KEY}" ++ NAMES python3 python ++ PATHS "${PYVENV_DIRECTORY}" ++ PATH_SUFFIXES bin Scripts ++ NO_DEFAULT_PATH ++ ) ++ if(NOT ${CACHEVAR}) ++ message(FATAL_ERROR "Unable to find Python executable in ${PYVENV_DIRECTORY}") ++ else() ++ set(PYTHON_EXECUTABLE "$CACHE{${CACHEVAR}}") ++ message(STATUS "${LOG_PREFIX}: Found Python executable in virtualenv: ${PYTHON_EXECUTABLE}") ++ endif() ++ ++ # Install the dependencies in the virtualenv, if any are requested. ++ if(NOT ("${ARG_REQUIREMENTS}" STREQUAL "")) ++ message(STATUS ++ "${LOG_PREFIX}: Installing Python dependencies into " ++ "${PYVENV_DIRECTORY}: ${ARG_REQUIREMENTS}" ++ ) ++ execute_process( ++ COMMAND ++ "${PYTHON_EXECUTABLE}" ++ -m ++ pip ++ install ++ ${ARG_REQUIREMENTS} ++ RESULT_VARIABLE ++ PIP_INSTALL_RESULT ++ ) ++ if(NOT PIP_INSTALL_RESULT EQUAL 0) ++ message(FATAL_ERROR ++ "Failed to install Python dependencies into " ++ "${PYVENV_DIRECTORY}: ${ARG_REQUIREMENTS}" ++ ) ++ endif() ++ endif() ++ ++ # Write the stamp files. ++ file(WRITE "${STAMP_FILE1}" "${FIREBASE_PYTHON_HOST_EXECUTABLE}") ++ file(WRITE "${STAMP_FILE2}" "${ARG_REQUIREMENTS}") ++ ++ set("${ARG_OUTVAR}" "${PYTHON_EXECUTABLE}" PARENT_SCOPE) ++endfunction(FirebaseSetupPythonInterpreter) diff --git a/cmake/external/leveldb.cmake b/cmake/external/leveldb.cmake index a8a154bb4e..18970659a4 100644 --- a/cmake/external/leveldb.cmake +++ b/cmake/external/leveldb.cmake @@ -26,7 +26,6 @@ ExternalProject_Add( DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR} DOWNLOAD_NAME leveldb-${version}.tar.gz URL https://github.com/google/leveldb/archive/${version}.tar.gz - URL_HASH SHA256=9a37f8a6174f09bd622bc723b55881dc541cd50747cbd08831c2a82d620f6d76 PREFIX ${PROJECT_BINARY_DIR} diff --git a/firestore/integration_test_internal/CMakeLists.txt b/firestore/integration_test_internal/CMakeLists.txt index 96c76bd824..d9d7d20849 100644 --- a/firestore/integration_test_internal/CMakeLists.txt +++ b/firestore/integration_test_internal/CMakeLists.txt @@ -333,13 +333,6 @@ else() ${FIREBASE_INTEGRATION_TEST_SRCS} ) - # Set a preprocessor define so that tests can distinguish between having been - # built by Xcode vs. cmake. - target_compile_definitions(${integration_test_target_name} - PRIVATE - FIREBASE_TESTS_BUILT_BY_CMAKE - ) - if(APPLE) set(ADDITIONAL_LIBS gssapi_krb5 diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index 99e67ff34f..33f2247cd8 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -20,9 +20,231 @@ #error "This test should not be included in Android." #endif -// Just re-use the unit test from the iOS SDK. -// TODO(dconeybe) Import ALL the unit tests from the iOS SDK by adding them -// to the CMakeLists.txt in the parent directory of this file. That way we can -// run all of the tests from the iOS SDK on each platform targeted by this repo. -// (This currently fails due to include paths on iOS, so it's been commented out for now.) -// #include "FirebaseFirestore/Firestore/core/test/unit/local/leveldb_snappy_test.cc" +#include +#include +#include +#include +#include + +#include "Firestore/core/src/local/leveldb_util.h" +#include "Firestore/core/src/util/filesystem.h" +#include "Firestore/core/src/util/path.h" + +#include "firebase_test_framework.h" +#include "gtest/gtest.h" +#include "leveldb/db.h" + +// TODO(dconeybe) Reference this test in the iOS SDK instead of making a +// copy of it here in the C++ SDK. + +namespace { + +using ::firebase::firestore::local::ConvertStatus; +using ::firebase::firestore::util::Filesystem; +using ::firebase::firestore::util::Path; + +// Creates a LevelDb database that uses Snappy compression for at least one of +// its blocks. Attempting to iterate over this database using a LevelDb library +// that does not have Snappy compression compiled in will return a failed status +// with reason "corruption". +Path CreateLevelDbDatabaseThatUsesSnappyCompression(); + +// This test ensures that we don't accidentally regress having added in Snappy +// compression support (https://github.com/firebase/firebase-ios-sdk/pull/9596). +TEST(LevelDbSnappy, LevelDbHasSnappySupportCompiledIn) { + // Do not run this test on iOS because LevelDb in iOS does not support Snappy. + SKIP_TEST_ON_IOS; + + Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); + if (HasFatalFailure()) return; + + leveldb::Options options; + options.create_if_missing = false; + + std::unique_ptr db; + { + leveldb::DB* db_ptr; + leveldb::Status status = + leveldb::DB::Open(options, leveldb_path.ToUtf8String(), &db_ptr); + ASSERT_TRUE(status.ok()); + db.reset(db_ptr); + } + + // One of the assertions below will fail when LevelDb attempts to read a block + // that is compressed with Snappy and Snappy compression support is not + // compiled in. + std::unique_ptr it( + db->NewIterator(leveldb::ReadOptions())); + for (it->SeekToFirst(); it->Valid(); it->Next()) { + ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); + } + ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); +} + +const std::array LevelDbSnappyFile_000005_ldb{ + 0x84, 0x03, 0x80, 0x00, 0x42, 0x00, 0x85, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5F, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8B, 0x43, 0x6F, + 0x6C, 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, 0x6C, 0x42, + 0x01, 0x0A, 0x68, 0x42, 0x7C, 0x66, 0x3A, 0x7C, 0x6F, 0x62, 0x3A, 0x5F, + 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x5F, 0x61, 0x73, 0x63, 0x00, 0x01, + 0x8C, 0x82, 0x80, 0x01, 0x07, 0x00, 0x05, 0x01, 0x08, 0x01, 0x13, 0x50, + 0x11, 0x3E, 0x01, 0x16, 0x00, 0x0A, 0x05, 0x15, 0xF0, 0x3C, 0x00, 0x08, + 0x02, 0x20, 0x05, 0x32, 0x4A, 0x12, 0x48, 0x70, 0x72, 0x6F, 0x6A, 0x65, + 0x63, 0x74, 0x73, 0x2F, 0x54, 0x65, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6D, + 0x69, 0x6E, 0x61, 0x74, 0x65, 0x2F, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x2F, 0x28, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, + 0x29, 0x2F, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x01, + 0x7B, 0x3E, 0x85, 0x00, 0x0C, 0x0D, 0x07, 0x50, 0x08, 0x15, 0x5A, 0x00, + 0x03, 0xFE, 0x5A, 0x00, 0x2E, 0x5A, 0x00, 0x38, 0x07, 0x12, 0x06, 0x5F, + 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x00, 0x01, 0x80, 0x01, 0x0B, 0x11, + 0x65, 0x1C, 0x10, 0x05, 0x20, 0x01, 0x12, 0x07, 0x06, 0x09, 0x15, 0x10, + 0x00, 0x03, 0x01, 0x10, 0x04, 0x00, 0x01, 0x09, 0x10, 0x24, 0x01, 0x12, + 0x01, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x01, 0x35, 0x00, 0x06, + 0x09, 0x15, 0x10, 0x37, 0x0C, 0x07, 0x01, 0x05, 0x09, 0x0B, 0x10, 0x36, + 0x0C, 0x07, 0x01, 0x04, 0x09, 0x0B, 0x10, 0x35, 0x0C, 0x07, 0x01, 0x03, + 0x09, 0x0B, 0x4C, 0x34, 0x0C, 0x07, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x2C, 0x6E, 0xE0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0xF2, 0xA1, 0xB0, 0x00, 0x09, 0x03, 0x86, 0x01, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x87, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x58, 0xC2, 0x94, 0x06, 0x8C, 0x02, 0x08, + 0x99, 0x02, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x57, 0xFB, 0x80, 0x8B, 0x24, 0x75, 0x47, 0xDB, +}; +const std::array LevelDbSnappyFile_000017_ldb{ + 0x00, 0x14, 0x50, 0x85, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, + 0x8C, 0x82, 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x02, 0x20, 0x0A, 0x32, 0x4A, 0x12, 0x48, 0x70, 0x72, 0x6F, 0x6A, 0x65, + 0x63, 0x74, 0x73, 0x2F, 0x54, 0x65, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6D, + 0x69, 0x6E, 0x61, 0x74, 0x65, 0x2F, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x2F, 0x28, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, + 0x29, 0x2F, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x73, 0x2F, + 0x43, 0x6F, 0x6C, 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, + 0x6C, 0x42, 0x2F, 0x44, 0x6F, 0x63, 0x42, 0x07, 0x12, 0x06, 0x5F, 0x67, + 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x00, 0x01, 0x80, 0x01, 0x0D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x10, 0x0A, 0x20, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xCD, 0xE0, 0x39, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF2, 0xA1, 0xB0, + 0x00, 0x09, 0x03, 0x86, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x8A, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xE4, 0xA7, 0x7E, 0x74, 0x8F, 0x01, 0x08, 0x9C, 0x01, 0x17, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xFB, 0x80, 0x8B, + 0x24, 0x75, 0x47, 0xDB, +}; +const std::array LevelDbSnappyFile_000085_ldb{}; +const std::array LevelDbSnappyFile_CURRENT{ + 0x4D, 0x41, 0x4E, 0x49, 0x46, 0x45, 0x53, 0x54, + 0x2D, 0x30, 0x30, 0x30, 0x30, 0x38, 0x34, 0x0A, +}; +const std::array LevelDbSnappyFile_LOG_old{ + 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, 0x31, + 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x32, 0x35, 0x37, 0x32, + 0x35, 0x31, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, 0x33, + 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x52, 0x65, 0x63, 0x6F, 0x76, 0x65, + 0x72, 0x69, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x67, 0x20, 0x23, 0x38, 0x31, + 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, + 0x31, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x33, 0x30, 0x34, + 0x35, 0x35, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, + 0x33, 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, + 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x33, 0x20, 0x23, 0x38, 0x30, + 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, + 0x31, 0x31, 0x3A, 0x33, 0x39, 0x3A, 0x34, 0x36, 0x2E, 0x33, 0x30, 0x35, + 0x30, 0x36, 0x34, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x35, + 0x33, 0x31, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, + 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x30, 0x20, 0x23, 0x38, 0x31, + 0x0A, +}; +const std::array LevelDbSnappyFile_LOG{ + 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, 0x31, + 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x34, 0x39, 0x33, 0x31, + 0x34, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, 0x32, + 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x52, 0x65, 0x63, 0x6F, 0x76, 0x65, + 0x72, 0x69, 0x6E, 0x67, 0x20, 0x6C, 0x6F, 0x67, 0x20, 0x23, 0x38, 0x33, + 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, + 0x31, 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x35, 0x33, 0x34, + 0x37, 0x34, 0x35, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, + 0x32, 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, + 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x33, 0x20, 0x23, 0x38, 0x32, + 0x0A, 0x32, 0x30, 0x32, 0x32, 0x2F, 0x30, 0x34, 0x2F, 0x30, 0x34, 0x2D, + 0x31, 0x31, 0x3A, 0x35, 0x36, 0x3A, 0x35, 0x36, 0x2E, 0x35, 0x33, 0x35, + 0x32, 0x34, 0x32, 0x20, 0x30, 0x78, 0x37, 0x30, 0x30, 0x30, 0x30, 0x61, + 0x32, 0x35, 0x34, 0x30, 0x30, 0x30, 0x20, 0x44, 0x65, 0x6C, 0x65, 0x74, + 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x30, 0x20, 0x23, 0x38, 0x33, + 0x0A, +}; +const std::array LevelDbSnappyFile_MANIFEST_000084{ + 0x45, 0x63, 0x9F, 0xDD, 0xAC, 0x00, 0x01, 0x01, 0x1A, 0x6C, 0x65, 0x76, + 0x65, 0x6C, 0x64, 0x62, 0x2E, 0x42, 0x79, 0x74, 0x65, 0x77, 0x69, 0x73, + 0x65, 0x43, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6F, 0x72, 0x07, + 0x00, 0x05, 0xE5, 0x02, 0x42, 0x85, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5F, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8B, 0x43, 0x6F, 0x6C, + 0x41, 0x2F, 0x44, 0x6F, 0x63, 0x41, 0x2F, 0x43, 0x6F, 0x6C, 0x42, 0x2F, + 0x44, 0x6F, 0x63, 0x42, 0x7C, 0x66, 0x3A, 0x7C, 0x6F, 0x62, 0x3A, 0x5F, + 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x5F, 0x61, 0x73, 0x63, 0x00, 0x01, + 0x8C, 0x82, 0x80, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, + 0x85, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x00, 0x01, 0x80, 0x01, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x11, 0xE8, 0x01, + 0x14, 0x85, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x01, 0x8C, 0x82, + 0x80, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x85, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5F, 0x67, 0x6C, 0x6F, 0x62, 0x61, 0x6C, + 0x00, 0x01, 0x80, 0x01, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB1, + 0x03, 0xAC, 0xBA, 0x08, 0x00, 0x01, 0x02, 0x55, 0x09, 0x00, 0x03, 0x56, + 0x04, 0x0D, +}; + +template +void WriteFile(const Path& dir, + const std::string& file_name, + const T& data_array) { + Filesystem* fs = Filesystem::Default(); + { + auto status = fs->RecursivelyCreateDir(dir); + if (!status.ok()) { + FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" + << status.error_message() << ")"; + } + } + + Path file = dir.AppendUtf8(file_name); + std::ofstream out_file(file.native_value(), std::ios::binary); + if (!out_file) { + FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); + } + + out_file.write(reinterpret_cast(data_array.data()), + data_array.size()); + out_file.close(); + if (!out_file) { + FAIL() << "Writing to file failed: " << file.ToUtf8String(); + } +} + +Path LevelDbDir() { + Filesystem* fs = Filesystem::Default(); + Path dir = fs->TempDir().AppendUtf8("PersistenceTesting"); + + // Delete the directory first to ensure isolation between runs. + auto status = fs->RecursivelyRemove(dir); + EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in dir " + << dir.ToUtf8String() << ": " << status.ToString(); + + return dir; +} + +Path CreateLevelDbDatabaseThatUsesSnappyCompression() { + Path leveldb_dir = LevelDbDir(); + WriteFile(leveldb_dir, "000005.ldb", LevelDbSnappyFile_000005_ldb); + WriteFile(leveldb_dir, "000017.ldb", LevelDbSnappyFile_000017_ldb); + WriteFile(leveldb_dir, "000085.ldb", LevelDbSnappyFile_000085_ldb); + WriteFile(leveldb_dir, "CURRENT", LevelDbSnappyFile_CURRENT); + WriteFile(leveldb_dir, "LOG.old", LevelDbSnappyFile_LOG_old); + WriteFile(leveldb_dir, "LOG", LevelDbSnappyFile_LOG); + WriteFile(leveldb_dir, "MANIFEST-000084", LevelDbSnappyFile_MANIFEST_000084); + return leveldb_dir; +} + +} // namespace From 32aec7e494537766c92fda751cc7ccc59c8618b4 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Tue, 26 Apr 2022 01:33:05 -0400 Subject: [PATCH 41/93] Temporarily remove admob from integration_tests.yml too. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 32cbe45d42..daf5e5917d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -16,7 +16,7 @@ on: required: true apis: description: 'CSV of apis to build and test' - default: 'admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage' + default: 'analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage' required: true operating_systems: description: 'CSV of VMs to run on' From fc6b8458965ee0f6849da344c0ae01823ea599f6 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Tue, 26 Apr 2022 10:32:34 -0400 Subject: [PATCH 42/93] integration_tests.yml: remove admob from another place, since it still seems to be being built --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index daf5e5917d..13aabbdf4c 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -173,7 +173,7 @@ jobs: # list. Then we can use fromJson to define the field in the matrix for the tests job. if [[ "${{ github.event.schedule }}" == "0 9 * * *" ]]; then # at 1am PST / 2am PDT. Running integration tests and generate test report for all testapps except firestore - apis="admob,analytics,auth,database,dynamic_links,functions,installations,messaging,remote_config,storage" + apis="analytics,auth,database,dynamic_links,functions,installations,messaging,remote_config,storage" elif [[ "${{ github.event.schedule }}" == "0 10 * * *" ]]; then # at 2am PST / 3am PDT. Running integration tests for firestore and generate test report apis="firestore" From 581cb8d3d333bf845dd572a68d0a4d4a26194829 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Tue, 26 Apr 2022 11:47:25 -0400 Subject: [PATCH 43/93] Revert "integration_tests.yml: remove admob from another place, since it still seems to be being built" This reverts commit fc6b8458965ee0f6849da344c0ae01823ea599f6. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 13aabbdf4c..daf5e5917d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -173,7 +173,7 @@ jobs: # list. Then we can use fromJson to define the field in the matrix for the tests job. if [[ "${{ github.event.schedule }}" == "0 9 * * *" ]]; then # at 1am PST / 2am PDT. Running integration tests and generate test report for all testapps except firestore - apis="analytics,auth,database,dynamic_links,functions,installations,messaging,remote_config,storage" + apis="admob,analytics,auth,database,dynamic_links,functions,installations,messaging,remote_config,storage" elif [[ "${{ github.event.schedule }}" == "0 10 * * *" ]]; then # at 2am PST / 3am PDT. Running integration tests for firestore and generate test report apis="firestore" From 00b4aac262520544e0a344438a1ecfba8eab999c Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Tue, 26 Apr 2022 11:47:38 -0400 Subject: [PATCH 44/93] Revert "Temporarily remove admob from integration_tests.yml too." This reverts commit 32aec7e494537766c92fda751cc7ccc59c8618b4. --- .github/workflows/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index daf5e5917d..32cbe45d42 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -16,7 +16,7 @@ on: required: true apis: description: 'CSV of apis to build and test' - default: 'analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage' + default: 'admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage' required: true operating_systems: description: 'CSV of VMs to run on' From 37801946490d55d21f32a21e7b8f51721f155388 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 10:22:31 -0700 Subject: [PATCH 45/93] Add AdMob back in and refer to new version in staging. --- .github/workflows/update-dependencies.yml | 2 +- CMakeLists.txt | 4 ++-- admob/integration_test/Podfile | 2 +- build_scripts/ios/build.sh | 2 +- ios_pod/Podfile | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index b99155b2a8..a955f1b81a 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -127,7 +127,7 @@ jobs: core_version=$(grep "pod 'Firebase/Core'" ios_pod/Podfile | sed "s/.*'\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)'.*/\1/") echo "Getting Swift header files from Firebase iOS SDK ${core_version} zip distribution" ziptmp="$(mktemp -d)" - curl "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}"/Firebase.zip + curl -H 'Authorization: token ${{ github.token }}' "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}"/Firebase.zip cd "${ziptmp}" unzip -q Firebase.zip cd - diff --git a/CMakeLists.txt b/CMakeLists.txt index a83eb6d036..5d3410f251 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ option(FIREBASE_INCLUDE_LIBRARY_DEFAULT "Should each library be included by default." ON) # Different options to enable/disable each library being included during # configuration. -option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." OFF) -# ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) +option(FIREBASE_INCLUDE_ADMOB "Include the AdMob library." + ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) option(FIREBASE_INCLUDE_ANALYTICS "Include the Google Analytics for Firebase library." ${FIREBASE_INCLUDE_LIBRARY_DEFAULT}) diff --git a/admob/integration_test/Podfile b/admob/integration_test/Podfile index 8ee8f378df..82266d3d82 100644 --- a/admob/integration_test/Podfile +++ b/admob/integration_test/Podfile @@ -6,7 +6,7 @@ use_frameworks! :linkage => :static target 'integration_test' do pod 'Firebase/Analytics', '9.0.0' - pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' + pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk2' end post_install do |installer| diff --git a/build_scripts/ios/build.sh b/build_scripts/ios/build.sh index 57c0426916..56061317f2 100755 --- a/build_scripts/ios/build.sh +++ b/build_scripts/ios/build.sh @@ -27,7 +27,7 @@ readonly SUPPORTED_PLATFORMS=(device simulator) readonly SUPPORTED_ARCHITECTURES=(arm64 armv7 x86_64 i386) readonly DEVICE_ARCHITECTURES=(arm64 armv7) readonly SIMULATOR_ARCHITECTURES=(arm64 x86_64 i386) -readonly SUPPORTED_TARGETS=(firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) +readonly SUPPORTED_TARGETS=(firebase_admob firebase_analytics firebase_auth firebase_database firebase_dynamic_links firebase_firestore firebase_functions firebase_installations firebase_messaging firebase_remote_config firebase_storage) # build default value buildpath="ios_build" diff --git a/ios_pod/Podfile b/ios_pod/Podfile index 1dd8808c8b..8ea5a36a8c 100644 --- a/ios_pod/Podfile +++ b/ios_pod/Podfile @@ -6,7 +6,7 @@ use_frameworks! target 'GetPods' do pod 'Firebase/Core', '9.0.0' - #pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' + pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk2' pod 'Firebase/Analytics', '9.0.0' pod 'Firebase/Auth', '9.0.0' pod 'Firebase/Crashlytics', '9.0.0' From d468fa704862cdf6f67e27eeac3fc1dd108f33b3 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 10:31:09 -0700 Subject: [PATCH 46/93] Speed up update-dependencies zip distribution usage --- .github/workflows/update-dependencies.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index a955f1b81a..94ceb1dbca 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -127,11 +127,13 @@ jobs: core_version=$(grep "pod 'Firebase/Core'" ios_pod/Podfile | sed "s/.*'\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)'.*/\1/") echo "Getting Swift header files from Firebase iOS SDK ${core_version} zip distribution" ziptmp="$(mktemp -d)" - curl -H 'Authorization: token ${{ github.token }}' "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}"/Firebase.zip + curl -H 'Authorization: token ${{ github.token }}' "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}/Firebase.zip" cd "${ziptmp}" - unzip -q Firebase.zip + echo "Unzipping..." + unzip -q Firebase.zip '*-Swift.h' cd - # Copy all *-Swift.h header files into ios_pod/swift_headers/ + echo Copying headers..." find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ copyright_line="// Copyright $(date +%Y) Google LLC\n" # Add a note to each file about its source. From 8e0d74251241eb89eff6bf10deb5a9e666bd14d5 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 10:38:15 -0700 Subject: [PATCH 47/93] Fix substitution. --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 94ceb1dbca..66ca6a89ce 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -139,7 +139,7 @@ jobs: # Add a note to each file about its source. for ios_header in ios_pod/swift_headers/*.h; do if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then - sed -i~ "s|^/// @file|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n/// @file|" "${ios_header}" + sed -i~ "s|^// Generated by Apple Swift|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n// Generated by Apple Swift|" "${ios_header}" fi python scripts/format_code.py --f "${ios_header}" done From 565e4fc5495014714d7558e782437b2c8c0eba78 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 10:50:03 -0700 Subject: [PATCH 48/93] Fix header formatting --- .github/workflows/update-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 66ca6a89ce..a79d7a9fb4 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -135,7 +135,7 @@ jobs: # Copy all *-Swift.h header files into ios_pod/swift_headers/ echo Copying headers..." find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ - copyright_line="// Copyright $(date +%Y) Google LLC\n" + copyright_line="// Copyright $(date +%Y) Google LLC" # Add a note to each file about its source. for ios_header in ios_pod/swift_headers/*.h; do if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then From abb771e62a21713be9a7a1654128fe53472c1e42 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 10:59:31 -0700 Subject: [PATCH 49/93] Fix spacing. --- functions/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/CMakeLists.txt b/functions/CMakeLists.txt index 8636729f88..f2ee0dc314 100644 --- a/functions/CMakeLists.txt +++ b/functions/CMakeLists.txt @@ -97,7 +97,7 @@ elseif(IOS) target_link_libraries(firebase_functions PUBLIC "-fembed-bitcode") -setup_pod_headers( + setup_pod_headers( firebase_functions POD_NAMES FirebaseCore From 5f3d83fd292e05808daab2e1a92cc0f17625f2de Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 12:28:08 -0700 Subject: [PATCH 50/93] Update Xcode version to 12.5.1 and add tests to 13.2.1 --- .github/workflows/cpp-packaging.yml | 4 ++-- release_build_files/readme.md | 3 ++- scripts/gha/print_matrix_configuration.py | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 48604ecbee..0aaf2c68ba 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -32,9 +32,9 @@ env: demumbleVer: "1.1.0" # Use SHA256 for hashing files. hashCommand: "sha256sum" - # Xcode version 12.4 is the version we build the SDK with. + # Xcode version 12.5.1 is the version we build the SDK with. # Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app - xcodeVersion: "12.4" + xcodeVersion: "12.5.1" # LLVM version with ARM MachO support has no version number yet. llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534" GITHUB_TOKEN: ${{ github.token }} diff --git a/release_build_files/readme.md b/release_build_files/readme.md index f167b6c9e7..a72cbebae3 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -371,7 +371,7 @@ Firebase Installations (stub) | firebase_installations.framework Firebase Cloud Messaging (stub) | firebase_messaging.framework | | firebase.framework -The provided libraries have been tested using Xcode 12.4. When building C++ +The provided libraries have been tested using Xcode 12.5.1. When building C++ desktop apps on OS X, you will need to link the `gssapi_krb5` and `pthread` system libraries, as well as the `CoreFoundation`, `Foundation`, `GSS`, and `Security` OS X system frameworks (consult your compiler documentation for more @@ -571,6 +571,7 @@ code. - Changes - Storage (Desktop): Set Content-Type HTTP header when uploading with custom metadata. + - General (iOS): iOS SDKs are now built using Xcode 12.5.1. ### 8.11.0 - Changes diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ce3d4cec2d..c898bb113b 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -76,12 +76,12 @@ "build_type": ["Release", "Debug"], "architecture": ["x64", "x86", "arm64"], "msvc_runtime": ["static","dynamic"], - "xcode_version": ["12.4"], + "xcode_version": ["12.5.1"], "python_version": ["3.7"], EXPANDED_KEY: { "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "xcode_version": ["11.7", "12.4", "12.5.1"], + "xcode_version": ["11.7", "12.5.1", "13.2.1"], } } }, @@ -112,7 +112,7 @@ "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], - "xcode_version": ["12.4"], # only the first one is used + "xcode_version": ["12.5.1"], # only the first one is used "ndk_version": ["r22b"], "platform_version": ["28"], "build_tools_version": ["28.0.3"], @@ -138,10 +138,10 @@ "ios": { "matrix": { - "xcode_version": ["12.4"], + "xcode_version": ["12.5.1"], EXPANDED_KEY: { - "xcode_version": ["12.4", "12.5.1"] + "xcode_version": ["12.5.1", "13.2.1"] } } }, From 31a3a04a95dd8c951e49b4ce7aab25933e5e732d Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 14:30:21 -0700 Subject: [PATCH 51/93] Add new version to readme --- release_build_files/readme.md | 81 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index a72cbebae3..66feb9f11c 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -180,55 +180,55 @@ Feature | Required Frameworks and Cocoapods -------------------------- | --------------------------------------- Firebase AdMob | firebase_admob.xcframework | | firebase.xcframework -| | Firebase/Analytics Cocoapod (8.15.0) -| | Google-Mobile-Ads-SDK Cocoapod (7.69.0-cppsdk) +| | Firebase/Analytics Cocoapod (9.0.0) +| | Google-Mobile-Ads-SDK Cocoapod (7.69.0-cppsdk2) Firebase Analytics | firebase_analytics.xcframework | | firebase.xcframework -| | Firebase/Analytics Cocoapod (8.15.0) +| | Firebase/Analytics Cocoapod (9.0.0) Firebase Authentication | firebase_auth.xcframework | | firebase.xcframework -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Dynamic Links | firebase_dynamic_links.xcframework | | firebase.xcframework -| | Firebase/DynamicLinks Cocoapod (8.15.0) +| | Firebase/DynamicLinks Cocoapod (9.0.0) Cloud Firestore | firebase_firestore.xcframework | | firebase_auth.xcframework | | firebase.xcframework -| | Firebase/Firestore Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Firestore Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Functions | firebase_functions.xcframework | | firebase_auth.xcframework (optional) | | firebase.xcframework -| | Firebase/Functions Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Functions Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Installations | firebase_installations.xcframework | | firebase.xcframework -| | FirebaseInstallations Cocoapod (8.15.0) +| | FirebaseInstallations Cocoapod (9.0.0) Firebase Cloud Messaging | firebase_messaging.xcframework | | firebase.xcframework -| | Firebase/Messaging Cocoapod (8.15.0) +| | Firebase/Messaging Cocoapod (9.0.0) Firebase Realtime Database | firebase_database.xcframework | | firebase_auth.xcframework | | firebase.xcframework -| | Firebase/Database Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Database Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Remote Config | firebase_remote_config.xcframework | | firebase.xcframework -| | Firebase/RemoteConfig Cocoapod (8.15.0) +| | Firebase/RemoteConfig Cocoapod (9.0.0) Firebase Storage | firebase_storage.xcframework | | firebase_auth.xcframework | | firebase.xcframework -| | Firebase/Storage Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Storage Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Important: Each version of the Firebase C++ SDK supports a specific version of the Firebase iOS SDK. Please ensure that you reference the Cocoapod versions listed above. Note: AdMob C++ is not currently compatible with the latest Firebase AdMob iOS -CocoaPod (8.x). Please ensure that you use the special version of -Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk) to maintain -compatibility with Firebase 8.x. +CocoaPod (9.x). Please ensure that you use the special version of +Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk2) to maintain +compatibility with Firebase 9.x. #### Libraries @@ -240,55 +240,55 @@ Feature | Required Libraries and Cocoapods -------------------------- | ----------------------------------------- Firebase AdMob | libfirebase_admob.a | | libfirebase_app.a -| | Firebase/Analytics Cocoapod (8.15.0) -| | Google-Mobile-Ads-SDK Cocoapod (7.69.0-cppsdk) +| | Firebase/Analytics Cocoapod (9.0.0) +| | Google-Mobile-Ads-SDK Cocoapod (7.69.0-cppsdk2) Firebase Analytics | libfirebase_analytics.a | | libfirebase_app.a -| | Firebase/Analytics Cocoapod (8.15.0) +| | Firebase/Analytics Cocoapod (9.0.0) Firebase Authentication | libfirebase_auth.a | | libfirebase_app.a -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Dynamic Links | libfirebase_dynamic_links.a | | libfirebase_app.a -| | Firebase/DynamicLinks Cocoapod (8.15.0) +| | Firebase/DynamicLinks Cocoapod (9.0.0) Cloud Firestore | libfirebase_firestore.a | | libfirebase_app.a | | libfirebase_auth.a -| | Firebase/Firestore Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Firestore Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Functions | libfirebase_functions.a | | libfirebase_app.a | | libfirebase_auth.a (optional) -| | Firebase/Functions Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Functions Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Installations | libfirebase_installations.a | | libfirebase_app.a -| | FirebaseInstallations Cocoapod (8.15.0) +| | FirebaseInstallations Cocoapod (9.0.0) Firebase Cloud Messaging | libfirebase_messaging.a | | libfirebase_app.a -| | Firebase/CloudMessaging Cocoapod (8.15.0) +| | Firebase/CloudMessaging Cocoapod (9.0.0) Firebase Realtime Database | libfirebase_database.a | | libfirebase_app.a | | libfirebase_auth.a -| | Firebase/Database Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Database Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Firebase Remote Config | libfirebase_remote_config.a | | libfirebase_app.a -| | Firebase/RemoteConfig Cocoapod (8.15.0) +| | Firebase/RemoteConfig Cocoapod (9.0.0) Firebase Storage | libfirebase_storage.a | | libfirebase_app.a | | libfirebase_auth.a -| | Firebase/Storage Cocoapod (8.15.0) -| | Firebase/Auth Cocoapod (8.15.0) +| | Firebase/Storage Cocoapod (9.0.0) +| | Firebase/Auth Cocoapod (9.0.0) Important: Each version of the Firebase C++ SDK supports a specific version of the Firebase iOS SDK. Please ensure that you reference the Cocoapod versions listed above. Note: AdMob C++ is not currently compatible with the latest Firebase AdMob iOS -CocoaPod (8.x). Please ensure that you use the special version of -Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk) to maintain -compatibility with Firebase 8.x. +CocoaPod (9.x). Please ensure that you use the special version of +Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk2) to maintain +compatibility with Firebase 9.x. ### Desktop Implementation Dependencies @@ -569,9 +569,12 @@ code. ## Release Notes ### Upcoming release - Changes + - General (iOS): iOS SDKs are now built using Xcode 12.5.1. + - AdMob (iOS): Temporarily pinned AdMob dependency to a special version of the + Google-Mobile-Ads-SDK Cocoapod, "7.69.0-cppsdk2", to maintain compatibility + with version 9.x of the Firebase iOS SDK. - Storage (Desktop): Set Content-Type HTTP header when uploading with custom metadata. - - General (iOS): iOS SDKs are now built using Xcode 12.5.1. ### 8.11.0 - Changes From d6932175e38310d5be2f56e2ab4c1356406c9744 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 16:32:07 -0700 Subject: [PATCH 52/93] Change Functions iOS SDK and tvOS SDK version to 12.4 (minimum for Swift). --- .../project.pbxproj | 76 ++++++++++++------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/functions/integration_test/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index fe44e8d999..54d1704ee0 100644 --- a/functions/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/functions/integration_test/integration_test.xcodeproj/project.pbxproj @@ -3,16 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ - 277E62B375B47BB7CD0D4E62 /* libPods-integration_test_tvos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */; }; + 4C8058E5747A4DB92B775BE9 /* Pods_integration_test.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */; }; 520BC0391C869159008CFBC3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */; }; 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D51C85F68000C89379 /* Foundation.framework */; }; 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D71C85F68000C89379 /* CoreGraphics.framework */; }; 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; - 981D7B79193F1EDB1C9EF318 /* libPods-integration_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB44827137900B6A0CA149C /* libPods-integration_test.a */; }; + 7148E0FD75B60DC64DFAE85D /* Pods_integration_test_tvos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */; }; BC1D674F26799A44005DC2DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D674D26799A44005DC2DA /* Main.storyboard */; }; BC1D675426799A45005DC2DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D675226799A45005DC2DA /* LaunchScreen.storyboard */; }; BC1D675B26799A53005DC2DA /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; @@ -31,6 +31,12 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; + D68FA9DC2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */; }; + D68FA9DD2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */; }; + D68FA9DE2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */; }; + D68FA9DF2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */; }; + D68FA9E02818B6B8008C59DA /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DB2818B6B8008C59DA /* firebase.xcframework */; }; + D68FA9E12818B6B8008C59DA /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DB2818B6B8008C59DA /* firebase.xcframework */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -38,8 +44,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22934B574D2479C75CC4D751 /* Pods-integration_test_tvos.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.release.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.release.xcconfig"; sourceTree = ""; }; - 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test_tvos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 529226D21C85F68000C89379 /* integration_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; 529226D51C85F68000C89379 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -47,16 +53,12 @@ 529226D91C85F68000C89379 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 529226EE1C85F68000C89379 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 8675F0B26689AA876629E125 /* Pods-integration_test.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.debug.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.debug.xcconfig"; sourceTree = ""; }; - AAB44827137900B6A0CA149C /* libPods-integration_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D674526799A44005DC2DA /* integration_test_tvos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test_tvos.app; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D674E26799A44005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; BC1D675326799A45005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; BC1D676326799AA8005DC2DA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; BC1D676526799AAC005DC2DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; BC1D676726799AB0005DC2DA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - BC1D676926799AB8005DC2DA /* firebase_functions.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_functions.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_functions.xcframework"; sourceTree = ""; }; - BC1D676A26799AB8005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase.xcframework"; sourceTree = ""; }; - BC1D676B26799AB8005DC2DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_auth.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_auth.xcframework"; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; @@ -65,6 +67,9 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; + D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_auth.xcframework; sourceTree = ""; }; + D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_functions.xcframework; sourceTree = ""; }; + D68FA9DB2818B6B8008C59DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase.xcframework; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -73,6 +78,7 @@ D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; DC1961DDB894F0DB5BE0D891 /* Pods-integration_test_tvos.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.debug.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.debug.xcconfig"; sourceTree = ""; }; E30FEEB78B34075EC944F51F /* Pods-integration_test.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.release.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.release.xcconfig"; sourceTree = ""; }; + EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test_tvos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,10 +86,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D68FA9DC2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */, 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */, + D68FA9DE2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */, 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */, + D68FA9E02818B6B8008C59DA /* firebase.xcframework in Frameworks */, 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */, - 981D7B79193F1EDB1C9EF318 /* libPods-integration_test.a in Frameworks */, + 4C8058E5747A4DB92B775BE9 /* Pods_integration_test.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -91,10 +100,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D68FA9DD2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */, BC1D677126799B4D005DC2DA /* CoreGraphics.framework in Frameworks */, + D68FA9DF2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */, BC1D677026799B48005DC2DA /* UIKit.framework in Frameworks */, + D68FA9E12818B6B8008C59DA /* firebase.xcframework in Frameworks */, BC1D676F26799B42005DC2DA /* Foundation.framework in Frameworks */, - 277E62B375B47BB7CD0D4E62 /* libPods-integration_test_tvos.a in Frameworks */, + 7148E0FD75B60DC64DFAE85D /* Pods_integration_test_tvos.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -139,9 +151,9 @@ 529226D41C85F68000C89379 /* Frameworks */ = { isa = PBXGroup; children = ( - BC1D676B26799AB8005DC2DA /* firebase_auth.xcframework */, - BC1D676926799AB8005DC2DA /* firebase_functions.xcframework */, - BC1D676A26799AB8005DC2DA /* firebase.xcframework */, + D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */, + D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */, + D68FA9DB2818B6B8008C59DA /* firebase.xcframework */, BC1D676726799AB0005DC2DA /* CoreGraphics.framework */, BC1D676526799AAC005DC2DA /* UIKit.framework */, 529226D51C85F68000C89379 /* Foundation.framework */, @@ -149,8 +161,8 @@ 529226D71C85F68000C89379 /* CoreGraphics.framework */, 529226D91C85F68000C89379 /* UIKit.framework */, 529226EE1C85F68000C89379 /* XCTest.framework */, - AAB44827137900B6A0CA149C /* libPods-integration_test.a */, - 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */, + 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */, + EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */, ); name = Frameworks; sourceTree = ""; @@ -240,8 +252,6 @@ TargetAttributes = { 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = EQHXZ8M8AV; - ProvisioningStyle = Automatic; }; BC1D674426799A44005DC2DA = { CreatedOnToolsVersion = 12.5; @@ -425,7 +435,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -462,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -477,8 +487,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = EQHXZ8M8AV; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -495,7 +505,8 @@ INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; + TVOS_DEPLOYMENT_TARGET = 12.4; WRAPPER_EXTENSION = app; }; name = Debug; @@ -507,8 +518,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = EQHXZ8M8AV; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -525,7 +536,8 @@ INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; + TVOS_DEPLOYMENT_TARGET = 12.4; WRAPPER_EXTENSION = app; }; name = Release; @@ -573,7 +585,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; @@ -581,7 +596,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 12.4; }; name = Debug; }; @@ -627,14 +642,17 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 12.4; }; name = Release; }; From e30d0f4f98110599ffbb4e9b22dfd17acadeefb2 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 16:56:37 -0700 Subject: [PATCH 53/93] Since FIRStorageMetadata no longer implements NSCopying, copy it a different way. --- storage/src/ios/metadata_ios.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/src/ios/metadata_ios.mm b/storage/src/ios/metadata_ios.mm index 5296728afe..5551f87d11 100644 --- a/storage/src/ios/metadata_ios.mm +++ b/storage/src/ios/metadata_ios.mm @@ -26,7 +26,7 @@ // Create a copy of a FIRStorageMetadata. static FIRStorageMetadata* CopyObjCMetadataObject(const FIRStorageMetadata* src) { - return [src copy]; + return [[FIRStorageMetadata alloc] initWithDictionary:src.dictionaryRepresentation]; } // Convert a NSString to UTF8 string returning a reference to the buffer in From 93c8d79b82e300b81a4bdeb144e9f0d25f923224 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 16:56:54 -0700 Subject: [PATCH 54/93] Change deployment version to 12.4 for Storage, required for Swift support. --- .../project.pbxproj | 86 ++++++++++++++----- 1 file changed, 65 insertions(+), 21 deletions(-) diff --git a/storage/integration_test/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index 50006689d3..06e17d415d 100644 --- a/storage/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/storage/integration_test/integration_test.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -11,6 +11,7 @@ 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D51C85F68000C89379 /* Foundation.framework */; }; 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D71C85F68000C89379 /* CoreGraphics.framework */; }; 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; + 71146EFD64892127944BF765 /* Pods_integration_test_tvos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */; }; BC1D66962679868A005DC2DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D66942679868A005DC2DA /* Main.storyboard */; }; BC1D669B2679868B005DC2DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D66992679868B005DC2DA /* LaunchScreen.storyboard */; }; BC1D66A2267986B9005DC2DA /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; @@ -26,6 +27,12 @@ BC1D66D626798DCB005DC2DA /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; + D62A8E642818B9B20054E916 /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E612818B9B20054E916 /* firebase.xcframework */; }; + D62A8E652818B9B20054E916 /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E612818B9B20054E916 /* firebase.xcframework */; }; + D62A8E662818B9B20054E916 /* firebase_storage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E622818B9B20054E916 /* firebase_storage.xcframework */; }; + D62A8E672818B9B20054E916 /* firebase_storage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E622818B9B20054E916 /* firebase_storage.xcframework */; }; + D62A8E682818B9B20054E916 /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E632818B9B20054E916 /* firebase_auth.xcframework */; }; + D62A8E692818B9B20054E916 /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E632818B9B20054E916 /* firebase_auth.xcframework */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; @@ -33,9 +40,12 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; D6C179F022CB32A000C2651A /* app_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EF22CB32A000C2651A /* app_framework.cc */; }; + F5484553686431A91E06756E /* Pods_integration_test.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.release.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.release.xcconfig"; sourceTree = ""; }; + 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test_tvos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51947B312A8BC709F81C3E1F /* libPods-integration_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 529226D21C85F68000C89379 /* integration_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -43,6 +53,8 @@ 529226D71C85F68000C89379 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 529226D91C85F68000C89379 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 529226EE1C85F68000C89379 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.release.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.release.xcconfig"; sourceTree = ""; }; + 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B68CDE4B846F7B54E7421D3A /* libPods-integration_test_tvos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test_tvos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D668C2679868A005DC2DA /* integration_test_tvos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test_tvos.app; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D66952679868A005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -50,14 +62,13 @@ BC1D66A7267987A2005DC2DA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; BC1D66A9267987A7005DC2DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; BC1D66AB267987AC005DC2DA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - BC1D66AE26798821005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase.xcframework"; sourceTree = ""; }; - BC1D66B026798827005DC2DA /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_storage.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_storage.xcframework"; sourceTree = ""; }; - BC1D66B2267988D9005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_build/xcframeworks/firebase.xcframework"; sourceTree = ""; }; - BC1D66B4267988DE005DC2DA /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_storage.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_build/xcframeworks/firebase_storage.xcframework"; sourceTree = ""; }; - BC1D66D726798DEE005DC2DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_auth.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_auth.xcframework"; sourceTree = ""; }; + C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.debug.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.debug.xcconfig"; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; + D62A8E612818B9B20054E916 /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase.xcframework; sourceTree = ""; }; + D62A8E622818B9B20054E916 /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_storage.xcframework; sourceTree = ""; }; + D62A8E632818B9B20054E916 /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_auth.xcframework; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; @@ -69,6 +80,7 @@ D6C179EC22CB323300C2651A /* firebase_test_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = firebase_test_framework.cc; path = src/firebase_test_framework.cc; sourceTree = ""; }; D6C179ED22CB323300C2651A /* app_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = app_framework.h; path = src/app_framework.h; sourceTree = ""; }; D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; + E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.debug.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -77,8 +89,12 @@ buildActionMask = 2147483647; files = ( 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */, + D62A8E642818B9B20054E916 /* firebase.xcframework in Frameworks */, 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */, 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */, + D62A8E682818B9B20054E916 /* firebase_auth.xcframework in Frameworks */, + D62A8E662818B9B20054E916 /* firebase_storage.xcframework in Frameworks */, + F5484553686431A91E06756E /* Pods_integration_test.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -87,8 +103,12 @@ buildActionMask = 2147483647; files = ( BC1D66AC267987AC005DC2DA /* CoreGraphics.framework in Frameworks */, + D62A8E652818B9B20054E916 /* firebase.xcframework in Frameworks */, BC1D66AA267987A7005DC2DA /* UIKit.framework in Frameworks */, BC1D66A8267987A2005DC2DA /* Foundation.framework in Frameworks */, + D62A8E692818B9B20054E916 /* firebase_auth.xcframework in Frameworks */, + D62A8E672818B9B20054E916 /* firebase_storage.xcframework in Frameworks */, + 71146EFD64892127944BF765 /* Pods_integration_test_tvos.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -106,6 +126,7 @@ BC1D668D2679868A005DC2DA /* integration_test_tvos */, 529226D41C85F68000C89379 /* Frameworks */, 529226D31C85F68000C89379 /* Products */, + D4541C50C0EDE4345D91AFA8 /* Pods */, ); sourceTree = ""; }; @@ -121,11 +142,9 @@ 529226D41C85F68000C89379 /* Frameworks */ = { isa = PBXGroup; children = ( - BC1D66D726798DEE005DC2DA /* firebase_auth.xcframework */, - BC1D66B4267988DE005DC2DA /* firebase_storage.xcframework */, - BC1D66B2267988D9005DC2DA /* firebase.xcframework */, - BC1D66B026798827005DC2DA /* firebase_storage.xcframework */, - BC1D66AE26798821005DC2DA /* firebase.xcframework */, + D62A8E632818B9B20054E916 /* firebase_auth.xcframework */, + D62A8E622818B9B20054E916 /* firebase_storage.xcframework */, + D62A8E612818B9B20054E916 /* firebase.xcframework */, BC1D66AB267987AC005DC2DA /* CoreGraphics.framework */, BC1D66A9267987A7005DC2DA /* UIKit.framework */, 529226D51C85F68000C89379 /* Foundation.framework */, @@ -135,6 +154,8 @@ 529226EE1C85F68000C89379 /* XCTest.framework */, 51947B312A8BC709F81C3E1F /* libPods-integration_test.a */, B68CDE4B846F7B54E7421D3A /* libPods-integration_test_tvos.a */, + 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */, + 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */, ); name = Frameworks; sourceTree = ""; @@ -174,6 +195,17 @@ path = integration_test_tvos; sourceTree = ""; }; + D4541C50C0EDE4345D91AFA8 /* Pods */ = { + isa = PBXGroup; + children = ( + E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */, + 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */, + C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */, + 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -224,8 +256,6 @@ TargetAttributes = { 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = EQHXZ8M8AV; - ProvisioningStyle = Automatic; }; BC1D668B2679868A005DC2DA = { CreatedOnToolsVersion = 12.5; @@ -457,12 +487,13 @@ }; 529226FA1C85F68000C89379 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = EQHXZ8M8AV; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -477,21 +508,24 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; + TVOS_DEPLOYMENT_TARGET = 12.4; WRAPPER_EXTENSION = app; }; name = Debug; }; 529226FB1C85F68000C89379 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Manual; + DEVELOPMENT_TEAM = EQHXZ8M8AV; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -506,15 +540,18 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; + TVOS_DEPLOYMENT_TARGET = 12.4; WRAPPER_EXTENSION = app; }; name = Release; }; BC1D669F2679868B005DC2DA /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -555,7 +592,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; @@ -569,6 +609,7 @@ }; BC1D66A02679868B005DC2DA /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -608,7 +649,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; From 2f93b66e1d1c6be7954c305525282079a1c6d999 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 17:15:18 -0700 Subject: [PATCH 55/93] Update analytics headers from 9.0.0 Analytics RC. --- analytics/ios_headers/FIREventNames.h | 85 +------------------- analytics/ios_headers/FIRParameterNames.h | 59 +------------- analytics/ios_headers/FIRUserPropertyNames.h | 2 +- 3 files changed, 4 insertions(+), 142 deletions(-) diff --git a/analytics/ios_headers/FIREventNames.h b/analytics/ios_headers/FIREventNames.h index 292a9f6ce4..e26a2cff27 100644 --- a/analytics/ios_headers/FIREventNames.h +++ b/analytics/ios_headers/FIREventNames.h @@ -1,6 +1,6 @@ // Copyright 2022 Google LLC -// Copied from Firebase Analytics iOS SDK 8.15.0. +// Copied from Firebase Analytics iOS SDK 9.0.0. /// @file FIREventNames.h /// @@ -128,16 +128,6 @@ static NSString *const kFIREventBeginCheckout NS_SWIFT_NAME(AnalyticsEventBeginC static NSString *const kFIREventCampaignDetails NS_SWIFT_NAME(AnalyticsEventCampaignDetails) = @"campaign_details"; -/// Checkout progress. Params: -/// -///
      -///
    • @c AnalyticsParameterCheckoutStep (Int)
    • -///
    • @c AnalyticsParameterCheckoutOption (String) (optional)
    • -///
    -/// This constant has been deprecated. -static NSString *const kFIREventCheckoutProgress NS_SWIFT_NAME(AnalyticsEventCheckoutProgress) = - @"checkout_progress"; - /// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log /// this along with @c AnalyticsEventSpendVirtualCurrency to better understand your virtual economy. /// Params: @@ -149,33 +139,6 @@ static NSString *const kFIREventCheckoutProgress NS_SWIFT_NAME(AnalyticsEventChe static NSString *const kFIREventEarnVirtualCurrency NS_SWIFT_NAME(AnalyticsEventEarnVirtualCurrency) = @"earn_virtual_currency"; -/// E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note: -/// This is different from the in-app purchase event, which is reported automatically for App -/// Store-based apps. Note: If you supply the @c AnalyticsParameterValue parameter, you must also -/// supply the @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed -/// accurately. Params: -/// -///
      -///
    • @c AnalyticsParameterCurrency (String) (optional)
    • -///
    • @c AnalyticsParameterValue (Double) (optional)
    • -///
    • @c AnalyticsParameterTransactionID (String) (optional)
    • -///
    • @c AnalyticsParameterTax (Double) (optional)
    • -///
    • @c AnalyticsParameterShipping (Double) (optional)
    • -///
    • @c AnalyticsParameterCoupon (String) (optional)
    • -///
    • @c AnalyticsParameterLocation (String) (optional)
    • -///
    • @c AnalyticsParameterStartDate (String) (optional)
    • -///
    • @c AnalyticsParameterEndDate (String) (optional)
    • -///
    • @c AnalyticsParameterNumberOfNights (Int) (optional) for hotel bookings
    • -///
    • @c AnalyticsParameterNumberOfRooms (Int) (optional) for hotel bookings
    • -///
    • @c AnalyticsParameterNumberOfPassengers (Int) (optional) for travel bookings
    • -///
    • @c AnalyticsParameterOrigin (String) (optional)
    • -///
    • @c AnalyticsParameterDestination (String) (optional)
    • -///
    • @c AnalyticsParameterTravelClass (String) (optional) for travel bookings
    • -///
    -/// This constant has been deprecated. Use @c AnalyticsEventPurchase constant instead. -static NSString *const kFIREventEcommercePurchase NS_SWIFT_NAME(AnalyticsEventEcommercePurchase) = - @"ecommerce_purchase"; - /// Generate Lead event. Log this event when a lead has been generated in the app to understand the /// efficacy of your install and re-engagement campaigns. Note: If you supply the /// @c AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency @@ -236,26 +199,6 @@ static NSString *const kFIREventLogin NS_SWIFT_NAME(AnalyticsEventLogin) = @"log ///
static NSString *const kFIREventPostScore NS_SWIFT_NAME(AnalyticsEventPostScore) = @"post_score"; -/// Present Offer event. This event signifies that the app has presented a purchase offer to a user. -/// Add this event to a funnel with the @c AnalyticsEventAddToCart and @c -/// AnalyticsEventEcommercePurchase to gauge your conversion process. Note: If you supply the @c -/// AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency -/// parameter so that revenue metrics can be computed accurately. Params: -/// -///
    -///
  • @c AnalyticsParameterQuantity (Int)
  • -///
  • @c AnalyticsParameterItemID (String)
  • -///
  • @c AnalyticsParameterItemName (String)
  • -///
  • @c AnalyticsParameterItemCategory (String)
  • -///
  • @c AnalyticsParameterItemLocationID (String) (optional)
  • -///
  • @c AnalyticsParameterPrice (Double) (optional)
  • -///
  • @c AnalyticsParameterCurrency (String) (optional)
  • -///
  • @c AnalyticsParameterValue (Double) (optional)
  • -///
-/// This constant has been deprecated. Use @c AnalyticsEventViewPromotion constant instead. -static NSString *const kFIREventPresentOffer NS_SWIFT_NAME(AnalyticsEventPresentOffer) = - @"present_offer"; - /// E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user. Note: /// This is different from the in-app purchase event, which is reported automatically for App /// Store-based apps. Note: If you supply the @c AnalyticsParameterValue parameter, you must also @@ -274,20 +217,6 @@ static NSString *const kFIREventPresentOffer NS_SWIFT_NAME(AnalyticsEventPresent /// static NSString *const kFIREventPurchase NS_SWIFT_NAME(AnalyticsEventPurchase) = @"purchase"; -/// E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded. -/// Note: If you supply the @c AnalyticsParameterValue parameter, you must also supply the -/// @c AnalyticsParameterCurrency parameter so that revenue metrics can be computed accurately. -/// Params: -/// -///
    -///
  • @c AnalyticsParameterCurrency (String) (optional)
  • -///
  • @c AnalyticsParameterValue (Double) (optional)
  • -///
  • @c AnalyticsParameterTransactionID (String) (optional)
  • -///
-/// This constant has been deprecated. Use @c AnalyticsEventRefund constant instead. -static NSString *const kFIREventPurchaseRefund NS_SWIFT_NAME(AnalyticsEventPurchaseRefund) = - @"purchase_refund"; - /// E-Commerce Refund event. This event signifies that a refund was issued. Note: If you supply the /// @c AnalyticsParameterValue parameter, you must also supply the @c AnalyticsParameterCurrency /// parameter so that revenue metrics can be computed accurately. Params: @@ -379,16 +308,6 @@ static NSString *const kFIREventSelectItem NS_SWIFT_NAME(AnalyticsEventSelectIte static NSString *const kFIREventSelectPromotion NS_SWIFT_NAME(AnalyticsEventSelectPromotion) = @"select_promotion"; -/// Set checkout option. Params: -/// -///
    -///
  • @c AnalyticsParameterCheckoutStep (Int)
  • -///
  • @c AnalyticsParameterCheckoutOption (String)
  • -///
-/// This constant has been deprecated. -static NSString *const kFIREventSetCheckoutOption NS_SWIFT_NAME(AnalyticsEventSetCheckoutOption) = - @"set_checkout_option"; - /// Share event. Apps with social features can log the Share event to identify the most viral /// content. Params: /// @@ -403,7 +322,7 @@ static NSString *const kFIREventShare NS_SWIFT_NAME(AnalyticsEventShare) = @"sha /// different behaviors between logged in and logged out users. Params: /// ///
    -///
  • @c AnalyticsParameterSignUpMethod (String)
  • +///
  • @c AnalyticsParameterMethod (String)
  • ///
static NSString *const kFIREventSignUp NS_SWIFT_NAME(AnalyticsEventSignUp) = @"sign_up"; diff --git a/analytics/ios_headers/FIRParameterNames.h b/analytics/ios_headers/FIRParameterNames.h index eb586c8120..ebeff1e2b4 100644 --- a/analytics/ios_headers/FIRParameterNames.h +++ b/analytics/ios_headers/FIRParameterNames.h @@ -1,6 +1,6 @@ // Copyright 2022 Google LLC -// Copied from Firebase Analytics iOS SDK 8.15.0. +// Copied from Firebase Analytics iOS SDK 9.0.0. /// @file FIRParameterNames.h /// @@ -130,28 +130,6 @@ static NSString *const kFIRParameterCampaignID NS_SWIFT_NAME(AnalyticsParameterC static NSString *const kFIRParameterCharacter NS_SWIFT_NAME(AnalyticsParameterCharacter) = @"character"; -/// Some option on a step in an ecommerce flow (String). -///
-///     let params = [
-///       AnalyticsParameterCheckoutOption : "Visa",
-///       // ...
-///     ]
-/// 
-/// This constant has been deprecated. -static NSString *const kFIRParameterCheckoutOption - NS_SWIFT_NAME(AnalyticsParameterCheckoutOption) = @"checkout_option"; - -/// The checkout step (1..N) (Int). -///
-///     let params = [
-///       AnalyticsParameterCheckoutStep : 1,
-///       // ...
-///     ]
-/// 
-/// This constant has been deprecated. -static NSString *const kFIRParameterCheckoutStep NS_SWIFT_NAME(AnalyticsParameterCheckoutStep) = - @"checkout_step"; - /// Campaign content (String). static NSString *const kFIRParameterContent NS_SWIFT_NAME(AnalyticsParameterContent) = @"content"; @@ -356,17 +334,6 @@ static NSString *const kFIRParameterItemCategory5 NS_SWIFT_NAME(AnalyticsParamet /// static NSString *const kFIRParameterItemID NS_SWIFT_NAME(AnalyticsParameterItemID) = @"item_id"; -/// The list in which the item was presented to the user (String). -///
-///     let params = [
-///       AnalyticsParameterItemList : "Search Results",
-///       // ...
-///     ]
-/// 
-/// This constant has been deprecated. Use @c AnalyticsParameterItemListName instead. -static NSString *const kFIRParameterItemList NS_SWIFT_NAME(AnalyticsParameterItemList) = - @"item_list"; - /// The ID of the list in which the item was presented to the user (String). ///
 ///     let params = [
@@ -387,18 +354,6 @@ static NSString *const kFIRParameterItemListID NS_SWIFT_NAME(AnalyticsParameterI
 static NSString *const kFIRParameterItemListName NS_SWIFT_NAME(AnalyticsParameterItemListName) =
     @"item_list_name";
 
-/// The Google Place ID (String) that
-/// corresponds to the associated item. Alternatively, you can supply your own custom Location ID.
-/// 
-///     let params = [
-///       AnalyticsParameterItemLocationID : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
-///       // ...
-///     ]
-/// 
-/// This constant has been deprecated. Use @c AnalyticsParameterLocationID constant instead. -static NSString *const kFIRParameterItemLocationID - NS_SWIFT_NAME(AnalyticsParameterItemLocationID) = @"item_location_id"; - /// Item Name (context-specific) (String). ///
 ///     let params = [
@@ -656,18 +611,6 @@ static NSString *const kFIRParameterShipping NS_SWIFT_NAME(AnalyticsParameterShi
 static NSString *const kFIRParameterShippingTier NS_SWIFT_NAME(AnalyticsParameterShippingTier) =
     @"shipping_tier";
 
-/// Sign up method (String).
-/// 
-///     let params = [
-///       AnalyticsParameterSignUpMethod : "google",
-///       // ...
-///     ]
-/// 
-/// -/// This constant has been deprecated. Use Method constant instead. -static NSString *const kFIRParameterSignUpMethod NS_SWIFT_NAME(AnalyticsParameterSignUpMethod) = - @"sign_up_method"; - /// The origin of your traffic, such as an Ad network (for example, google) or partner (urban /// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your /// property. Highly recommended (String). diff --git a/analytics/ios_headers/FIRUserPropertyNames.h b/analytics/ios_headers/FIRUserPropertyNames.h index 871bae7d9c..63e56d0d07 100644 --- a/analytics/ios_headers/FIRUserPropertyNames.h +++ b/analytics/ios_headers/FIRUserPropertyNames.h @@ -1,6 +1,6 @@ // Copyright 2022 Google LLC -// Copied from Firebase Analytics iOS SDK 8.15.0. +// Copied from Firebase Analytics iOS SDK 9.0.0. /// @file FIRUserPropertyNames.h /// From 06fd33d96762ab6c7ad2ee614b635cc445ab45bc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 17:18:47 -0700 Subject: [PATCH 56/93] Add note about removal of deprecated analytics constants. --- release_build_files/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 66feb9f11c..ff4ea6374c 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -573,6 +573,7 @@ code. - AdMob (iOS): Temporarily pinned AdMob dependency to a special version of the Google-Mobile-Ads-SDK Cocoapod, "7.69.0-cppsdk2", to maintain compatibility with version 9.x of the Firebase iOS SDK. + - Analytics: Removed deprecated event names and parameters. - Storage (Desktop): Set Content-Type HTTP header when uploading with custom metadata. From 0b1cde87e70107a126497d8fead429eed3d15264 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 22:35:01 -0700 Subject: [PATCH 57/93] Set analytics deployment target --- .../integration_test.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj index d65135e132..f7653171c0 100644 --- a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj @@ -399,7 +399,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -436,7 +436,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -547,7 +547,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 12.4; }; name = Debug; }; @@ -596,7 +596,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 12.4; }; name = Release; }; From 63133eb14488fb5fc160819ba153f3461697d0b4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 26 Apr 2022 22:40:46 -0700 Subject: [PATCH 58/93] Set deployment targets --- .../project.pbxproj | 68 +++++--------- .../project.pbxproj | 94 +++++-------------- 2 files changed, 50 insertions(+), 112 deletions(-) diff --git a/functions/integration_test/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index 54d1704ee0..a6396a925f 100644 --- a/functions/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/functions/integration_test/integration_test.xcodeproj/project.pbxproj @@ -3,16 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ - 4C8058E5747A4DB92B775BE9 /* Pods_integration_test.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */; }; + 277E62B375B47BB7CD0D4E62 /* libPods-integration_test_tvos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */; }; 520BC0391C869159008CFBC3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */; }; 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D51C85F68000C89379 /* Foundation.framework */; }; 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D71C85F68000C89379 /* CoreGraphics.framework */; }; 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; - 7148E0FD75B60DC64DFAE85D /* Pods_integration_test_tvos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */; }; + 981D7B79193F1EDB1C9EF318 /* libPods-integration_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB44827137900B6A0CA149C /* libPods-integration_test.a */; }; BC1D674F26799A44005DC2DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D674D26799A44005DC2DA /* Main.storyboard */; }; BC1D675426799A45005DC2DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D675226799A45005DC2DA /* LaunchScreen.storyboard */; }; BC1D675B26799A53005DC2DA /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; @@ -31,12 +31,6 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; - D68FA9DC2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */; }; - D68FA9DD2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */; }; - D68FA9DE2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */; }; - D68FA9DF2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */; }; - D68FA9E02818B6B8008C59DA /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DB2818B6B8008C59DA /* firebase.xcframework */; }; - D68FA9E12818B6B8008C59DA /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68FA9DB2818B6B8008C59DA /* firebase.xcframework */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -44,8 +38,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22934B574D2479C75CC4D751 /* Pods-integration_test_tvos.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.release.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.release.xcconfig"; sourceTree = ""; }; + 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test_tvos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 529226D21C85F68000C89379 /* integration_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; 529226D51C85F68000C89379 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -53,12 +47,16 @@ 529226D91C85F68000C89379 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 529226EE1C85F68000C89379 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 8675F0B26689AA876629E125 /* Pods-integration_test.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.debug.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.debug.xcconfig"; sourceTree = ""; }; + AAB44827137900B6A0CA149C /* libPods-integration_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D674526799A44005DC2DA /* integration_test_tvos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test_tvos.app; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D674E26799A44005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; BC1D675326799A45005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; BC1D676326799AA8005DC2DA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; BC1D676526799AAC005DC2DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; BC1D676726799AB0005DC2DA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + BC1D676926799AB8005DC2DA /* firebase_functions.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_functions.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_functions.xcframework"; sourceTree = ""; }; + BC1D676A26799AB8005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase.xcframework"; sourceTree = ""; }; + BC1D676B26799AB8005DC2DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_auth.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_auth.xcframework"; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; @@ -67,9 +65,6 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; - D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_auth.xcframework; sourceTree = ""; }; - D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_functions.xcframework; sourceTree = ""; }; - D68FA9DB2818B6B8008C59DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase.xcframework; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -78,7 +73,6 @@ D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; DC1961DDB894F0DB5BE0D891 /* Pods-integration_test_tvos.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.debug.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.debug.xcconfig"; sourceTree = ""; }; E30FEEB78B34075EC944F51F /* Pods-integration_test.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.release.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.release.xcconfig"; sourceTree = ""; }; - EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test_tvos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -86,13 +80,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D68FA9DC2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */, 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */, - D68FA9DE2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */, 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */, - D68FA9E02818B6B8008C59DA /* firebase.xcframework in Frameworks */, 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */, - 4C8058E5747A4DB92B775BE9 /* Pods_integration_test.framework in Frameworks */, + 981D7B79193F1EDB1C9EF318 /* libPods-integration_test.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,13 +91,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D68FA9DD2818B6B8008C59DA /* firebase_auth.xcframework in Frameworks */, BC1D677126799B4D005DC2DA /* CoreGraphics.framework in Frameworks */, - D68FA9DF2818B6B8008C59DA /* firebase_functions.xcframework in Frameworks */, BC1D677026799B48005DC2DA /* UIKit.framework in Frameworks */, - D68FA9E12818B6B8008C59DA /* firebase.xcframework in Frameworks */, BC1D676F26799B42005DC2DA /* Foundation.framework in Frameworks */, - 7148E0FD75B60DC64DFAE85D /* Pods_integration_test_tvos.framework in Frameworks */, + 277E62B375B47BB7CD0D4E62 /* libPods-integration_test_tvos.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -151,9 +139,9 @@ 529226D41C85F68000C89379 /* Frameworks */ = { isa = PBXGroup; children = ( - D68FA9D92818B6B8008C59DA /* firebase_auth.xcframework */, - D68FA9DA2818B6B8008C59DA /* firebase_functions.xcframework */, - D68FA9DB2818B6B8008C59DA /* firebase.xcframework */, + BC1D676B26799AB8005DC2DA /* firebase_auth.xcframework */, + BC1D676926799AB8005DC2DA /* firebase_functions.xcframework */, + BC1D676A26799AB8005DC2DA /* firebase.xcframework */, BC1D676726799AB0005DC2DA /* CoreGraphics.framework */, BC1D676526799AAC005DC2DA /* UIKit.framework */, 529226D51C85F68000C89379 /* Foundation.framework */, @@ -161,8 +149,8 @@ 529226D71C85F68000C89379 /* CoreGraphics.framework */, 529226D91C85F68000C89379 /* UIKit.framework */, 529226EE1C85F68000C89379 /* XCTest.framework */, - 12E4F03D4A54AACA6801D378 /* Pods_integration_test.framework */, - EDC9520870172CA7B3E34D92 /* Pods_integration_test_tvos.framework */, + AAB44827137900B6A0CA149C /* libPods-integration_test.a */, + 4D9F70D4C409428D66F5C43C /* libPods-integration_test_tvos.a */, ); name = Frameworks; sourceTree = ""; @@ -252,6 +240,8 @@ TargetAttributes = { 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; + DevelopmentTeam = EQHXZ8M8AV; + ProvisioningStyle = Automatic; }; BC1D674426799A44005DC2DA = { CreatedOnToolsVersion = 12.5; @@ -487,8 +477,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = EQHXZ8M8AV; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -505,8 +495,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; - TVOS_DEPLOYMENT_TARGET = 12.4; + PROVISIONING_PROFILE_SPECIFIER = ""; WRAPPER_EXTENSION = app; }; name = Debug; @@ -518,8 +507,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = EQHXZ8M8AV; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -536,8 +525,7 @@ INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; - TVOS_DEPLOYMENT_TARGET = 12.4; + PROVISIONING_PROFILE_SPECIFIER = ""; WRAPPER_EXTENSION = app; }; name = Release; @@ -585,10 +573,7 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; @@ -642,10 +627,7 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/storage/integration_test/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index 06e17d415d..6052eec685 100644 --- a/storage/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/storage/integration_test/integration_test.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -11,7 +11,6 @@ 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D51C85F68000C89379 /* Foundation.framework */; }; 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D71C85F68000C89379 /* CoreGraphics.framework */; }; 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; - 71146EFD64892127944BF765 /* Pods_integration_test_tvos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */; }; BC1D66962679868A005DC2DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D66942679868A005DC2DA /* Main.storyboard */; }; BC1D669B2679868B005DC2DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D66992679868B005DC2DA /* LaunchScreen.storyboard */; }; BC1D66A2267986B9005DC2DA /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; @@ -27,12 +26,6 @@ BC1D66D626798DCB005DC2DA /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; - D62A8E642818B9B20054E916 /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E612818B9B20054E916 /* firebase.xcframework */; }; - D62A8E652818B9B20054E916 /* firebase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E612818B9B20054E916 /* firebase.xcframework */; }; - D62A8E662818B9B20054E916 /* firebase_storage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E622818B9B20054E916 /* firebase_storage.xcframework */; }; - D62A8E672818B9B20054E916 /* firebase_storage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E622818B9B20054E916 /* firebase_storage.xcframework */; }; - D62A8E682818B9B20054E916 /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E632818B9B20054E916 /* firebase_auth.xcframework */; }; - D62A8E692818B9B20054E916 /* firebase_auth.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = D62A8E632818B9B20054E916 /* firebase_auth.xcframework */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; @@ -40,12 +33,9 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; D6C179F022CB32A000C2651A /* app_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EF22CB32A000C2651A /* app_framework.cc */; }; - F5484553686431A91E06756E /* Pods_integration_test.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.release.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.release.xcconfig"; sourceTree = ""; }; - 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test_tvos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51947B312A8BC709F81C3E1F /* libPods-integration_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 520BC0381C869159008CFBC3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 529226D21C85F68000C89379 /* integration_test.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -53,8 +43,6 @@ 529226D71C85F68000C89379 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 529226D91C85F68000C89379 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 529226EE1C85F68000C89379 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.release.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.release.xcconfig"; sourceTree = ""; }; - 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_integration_test.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B68CDE4B846F7B54E7421D3A /* libPods-integration_test_tvos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test_tvos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D668C2679868A005DC2DA /* integration_test_tvos.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integration_test_tvos.app; sourceTree = BUILT_PRODUCTS_DIR; }; BC1D66952679868A005DC2DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -62,13 +50,14 @@ BC1D66A7267987A2005DC2DA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; BC1D66A9267987A7005DC2DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; BC1D66AB267987AC005DC2DA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test_tvos.debug.xcconfig"; path = "Target Support Files/Pods-integration_test_tvos/Pods-integration_test_tvos.debug.xcconfig"; sourceTree = ""; }; + BC1D66AE26798821005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase.xcframework"; sourceTree = ""; }; + BC1D66B026798827005DC2DA /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_storage.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_storage.xcframework"; sourceTree = ""; }; + BC1D66B2267988D9005DC2DA /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_build/xcframeworks/firebase.xcframework"; sourceTree = ""; }; + BC1D66B4267988DE005DC2DA /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_storage.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_build/xcframeworks/firebase_storage.xcframework"; sourceTree = ""; }; + BC1D66D726798DEE005DC2DA /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = firebase_auth.xcframework; path = "../../../../firebase-cpp-sdk/ios_tvos_package/xcframeworks/firebase_auth.xcframework"; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; - D62A8E612818B9B20054E916 /* firebase.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase.xcframework; sourceTree = ""; }; - D62A8E622818B9B20054E916 /* firebase_storage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_storage.xcframework; sourceTree = ""; }; - D62A8E632818B9B20054E916 /* firebase_auth.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = firebase_auth.xcframework; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; @@ -80,7 +69,6 @@ D6C179EC22CB323300C2651A /* firebase_test_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = firebase_test_framework.cc; path = src/firebase_test_framework.cc; sourceTree = ""; }; D6C179ED22CB323300C2651A /* app_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = app_framework.h; path = src/app_framework.h; sourceTree = ""; }; D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; - E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integration_test.debug.xcconfig"; path = "Target Support Files/Pods-integration_test/Pods-integration_test.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -89,12 +77,8 @@ buildActionMask = 2147483647; files = ( 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */, - D62A8E642818B9B20054E916 /* firebase.xcframework in Frameworks */, 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */, 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */, - D62A8E682818B9B20054E916 /* firebase_auth.xcframework in Frameworks */, - D62A8E662818B9B20054E916 /* firebase_storage.xcframework in Frameworks */, - F5484553686431A91E06756E /* Pods_integration_test.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -103,12 +87,8 @@ buildActionMask = 2147483647; files = ( BC1D66AC267987AC005DC2DA /* CoreGraphics.framework in Frameworks */, - D62A8E652818B9B20054E916 /* firebase.xcframework in Frameworks */, BC1D66AA267987A7005DC2DA /* UIKit.framework in Frameworks */, BC1D66A8267987A2005DC2DA /* Foundation.framework in Frameworks */, - D62A8E692818B9B20054E916 /* firebase_auth.xcframework in Frameworks */, - D62A8E672818B9B20054E916 /* firebase_storage.xcframework in Frameworks */, - 71146EFD64892127944BF765 /* Pods_integration_test_tvos.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -126,7 +106,6 @@ BC1D668D2679868A005DC2DA /* integration_test_tvos */, 529226D41C85F68000C89379 /* Frameworks */, 529226D31C85F68000C89379 /* Products */, - D4541C50C0EDE4345D91AFA8 /* Pods */, ); sourceTree = ""; }; @@ -142,9 +121,11 @@ 529226D41C85F68000C89379 /* Frameworks */ = { isa = PBXGroup; children = ( - D62A8E632818B9B20054E916 /* firebase_auth.xcframework */, - D62A8E622818B9B20054E916 /* firebase_storage.xcframework */, - D62A8E612818B9B20054E916 /* firebase.xcframework */, + BC1D66D726798DEE005DC2DA /* firebase_auth.xcframework */, + BC1D66B4267988DE005DC2DA /* firebase_storage.xcframework */, + BC1D66B2267988D9005DC2DA /* firebase.xcframework */, + BC1D66B026798827005DC2DA /* firebase_storage.xcframework */, + BC1D66AE26798821005DC2DA /* firebase.xcframework */, BC1D66AB267987AC005DC2DA /* CoreGraphics.framework */, BC1D66A9267987A7005DC2DA /* UIKit.framework */, 529226D51C85F68000C89379 /* Foundation.framework */, @@ -154,8 +135,6 @@ 529226EE1C85F68000C89379 /* XCTest.framework */, 51947B312A8BC709F81C3E1F /* libPods-integration_test.a */, B68CDE4B846F7B54E7421D3A /* libPods-integration_test_tvos.a */, - 9F45261E0BDCA01D7B4C3209 /* Pods_integration_test.framework */, - 43E671C159FCDAE49E4EBA2D /* Pods_integration_test_tvos.framework */, ); name = Frameworks; sourceTree = ""; @@ -195,17 +174,6 @@ path = integration_test_tvos; sourceTree = ""; }; - D4541C50C0EDE4345D91AFA8 /* Pods */ = { - isa = PBXGroup; - children = ( - E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */, - 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */, - C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */, - 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -256,6 +224,8 @@ TargetAttributes = { 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; + DevelopmentTeam = EQHXZ8M8AV; + ProvisioningStyle = Automatic; }; BC1D668B2679868A005DC2DA = { CreatedOnToolsVersion = 12.5; @@ -440,7 +410,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -477,7 +447,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.4; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -487,13 +457,12 @@ }; 529226FA1C85F68000C89379 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E839DFFFDB7AB7AB690F51D3 /* Pods-integration_test.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = EQHXZ8M8AV; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -508,24 +477,21 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; - TVOS_DEPLOYMENT_TARGET = 12.4; + PROVISIONING_PROFILE_SPECIFIER = ""; WRAPPER_EXTENSION = app; }; name = Debug; }; 529226FB1C85F68000C89379 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 79A3B516F7898DC2FC41D233 /* Pods-integration_test.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = EQHXZ8M8AV; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -540,18 +506,15 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = "Firebase Dev Wildcard"; - TVOS_DEPLOYMENT_TARGET = 12.4; + PROVISIONING_PROFILE_SPECIFIER = ""; WRAPPER_EXTENSION = app; }; name = Release; }; BC1D669F2679868B005DC2DA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9F165D29F7752A7361A25F3 /* Pods-integration_test_tvos.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -592,10 +555,7 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; @@ -603,13 +563,12 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 13.4; }; name = Debug; }; BC1D66A02679868B005DC2DA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0AE592F3360FAD2677ED95D6 /* Pods-integration_test_tvos.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -649,17 +608,14 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 10.1; + TVOS_DEPLOYMENT_TARGET = 13.4; }; name = Release; }; From 6315d3259e7e84b7bd1d65352628e0f4189b184e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 11:26:50 -0700 Subject: [PATCH 59/93] Add empty Swift file to sample framework. --- testing/sample_framework/src/empty.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testing/sample_framework/src/empty.swift diff --git a/testing/sample_framework/src/empty.swift b/testing/sample_framework/src/empty.swift new file mode 100644 index 0000000000..e1cb622251 --- /dev/null +++ b/testing/sample_framework/src/empty.swift @@ -0,0 +1,15 @@ +// Copyright 2019 Google Inc. All rights reserved. +// +// 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. + +// This empty Swift file is needed to ensure the Swift runtime is included. From 373c9c8425fc663d728984dc278d4168ecec9cbf Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 11:30:57 -0700 Subject: [PATCH 60/93] Switch Podfile postprocessing to use python3 --- admob/integration_test/Podfile | 4 ++-- analytics/integration_test/Podfile | 4 ++-- app/integration_test/Podfile | 4 ++-- auth/integration_test/Podfile | 4 ++-- database/integration_test/Podfile | 4 ++-- dynamic_links/integration_test/Podfile | 4 ++-- firestore/integration_test/Podfile | 4 ++-- firestore/integration_test_internal/Podfile | 4 ++-- functions/integration_test/Podfile | 4 ++-- installations/integration_test/Podfile | 4 ++-- remote_config/integration_test/Podfile | 4 ++-- storage/integration_test/Podfile | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/admob/integration_test/Podfile b/admob/integration_test/Podfile index 82266d3d82..341d715025 100644 --- a/admob/integration_test/Podfile +++ b/admob/integration_test/Podfile @@ -11,7 +11,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/analytics/integration_test/Podfile b/analytics/integration_test/Podfile index eacd58f9fe..a685a4f6fe 100644 --- a/analytics/integration_test/Podfile +++ b/analytics/integration_test/Podfile @@ -16,7 +16,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/app/integration_test/Podfile b/app/integration_test/Podfile index a87b4c431f..bde5a25dc4 100644 --- a/app/integration_test/Podfile +++ b/app/integration_test/Podfile @@ -10,7 +10,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/auth/integration_test/Podfile b/auth/integration_test/Podfile index 4029193e88..4ad5dd183f 100644 --- a/auth/integration_test/Podfile +++ b/auth/integration_test/Podfile @@ -15,7 +15,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/database/integration_test/Podfile b/database/integration_test/Podfile index 2407373b24..7a638b4163 100644 --- a/database/integration_test/Podfile +++ b/database/integration_test/Podfile @@ -17,7 +17,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/dynamic_links/integration_test/Podfile b/dynamic_links/integration_test/Podfile index 36a1794069..925a2100ab 100644 --- a/dynamic_links/integration_test/Podfile +++ b/dynamic_links/integration_test/Podfile @@ -10,7 +10,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/firestore/integration_test/Podfile b/firestore/integration_test/Podfile index 34db9bc827..63d4211609 100644 --- a/firestore/integration_test/Podfile +++ b/firestore/integration_test/Podfile @@ -17,7 +17,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/firestore/integration_test_internal/Podfile b/firestore/integration_test_internal/Podfile index fce9c0e854..53c19ffa04 100644 --- a/firestore/integration_test_internal/Podfile +++ b/firestore/integration_test_internal/Podfile @@ -17,7 +17,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/functions/integration_test/Podfile b/functions/integration_test/Podfile index acaa8d30fa..4b4c88dd93 100644 --- a/functions/integration_test/Podfile +++ b/functions/integration_test/Podfile @@ -17,7 +17,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/installations/integration_test/Podfile b/installations/integration_test/Podfile index 40879f519a..edc3513624 100644 --- a/installations/integration_test/Podfile +++ b/installations/integration_test/Podfile @@ -11,7 +11,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/remote_config/integration_test/Podfile b/remote_config/integration_test/Podfile index 004d17eb09..28e9bfc7de 100644 --- a/remote_config/integration_test/Podfile +++ b/remote_config/integration_test/Podfile @@ -15,7 +15,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end diff --git a/storage/integration_test/Podfile b/storage/integration_test/Podfile index c6d4871a3b..88cdcf6cc0 100644 --- a/storage/integration_test/Podfile +++ b/storage/integration_test/Podfile @@ -17,7 +17,7 @@ end post_install do |installer| # If this is running from inside the SDK directory, run the setup script. - system("if [[ -r ../../setup_integration_tests.py ]]; then python ../../setup_integration_tests.py .; fi") - system("/usr/bin/python ./download_googletest.py") + system("if [[ -r ../../setup_integration_tests.py ]]; then python3 ../../setup_integration_tests.py .; fi") + system("python3 ./download_googletest.py") end From 1bc7910d91fabf234089ffc43edcebae4efe7244 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 11:49:22 -0700 Subject: [PATCH 61/93] Add empty Swift file to integration test project. --- .../project.pbxproj | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/database/integration_test/integration_test.xcodeproj/project.pbxproj b/database/integration_test/integration_test.xcodeproj/project.pbxproj index 0ebc4e0715..172df6cd81 100644 --- a/database/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/database/integration_test/integration_test.xcodeproj/project.pbxproj @@ -26,6 +26,8 @@ BCF6A9522682C03700578FDD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCF6A9512682C03700578FDD /* UIKit.framework */; }; D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; + D61DACA92819C7610022DDC4 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D61DACA82819C7610022DDC4 /* empty.swift */; }; + D61DACAA2819C7610022DDC4 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D61DACA82819C7610022DDC4 /* empty.swift */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; @@ -51,6 +53,7 @@ D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; + D61DACA82819C7610022DDC4 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; @@ -128,6 +131,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D61DACA82819C7610022DDC4 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -209,10 +213,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; 9F2ABA25267A4720001A35CE = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -270,6 +276,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D61DACA92819C7610022DDC4 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -284,6 +291,7 @@ 9F2ABA3C267A4744001A35CE /* gmock-all.cc in Sources */, 9F4C472E267A4DB6001E25DA /* ios_app_framework.mm in Sources */, 9F2ABA3F267A474A001A35CE /* app_framework.cc in Sources */, + D61DACAA2819C7610022DDC4 /* empty.swift in Sources */, 9F2ABA3E267A4747001A35CE /* gtest-all.cc in Sources */, 9F2ABA40267A474D001A35CE /* firebase_test_framework.cc in Sources */, ); @@ -396,6 +404,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -413,9 +422,12 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.database.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -425,6 +437,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -442,9 +455,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.database.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -457,6 +472,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -495,6 +511,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.database.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -508,6 +526,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -544,6 +563,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.database.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; From 85567bebf102a20ec6c0e8d5f31b0a154e6db6f1 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 11:51:00 -0700 Subject: [PATCH 62/93] Add empty Swift file to analytics project --- .../integration_test.xcodeproj/project.pbxproj | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/integration_test/integration_test.xcodeproj/project.pbxproj b/app/integration_test/integration_test.xcodeproj/project.pbxproj index ca08168ca8..03e93aa3e0 100644 --- a/app/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/app/integration_test/integration_test.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; + D6BDBF0C2819C7FE004AD146 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6BDBF0B2819C7FE004AD146 /* empty.swift */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -37,6 +38,7 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; + D6BDBF0B2819C7FE004AD146 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -94,6 +96,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D6BDBF0B2819C7FE004AD146 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -149,6 +152,7 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -158,6 +162,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 529226C91C85F68000C89379; @@ -193,6 +198,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D6BDBF0C2819C7FE004AD146 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -286,6 +292,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -303,8 +310,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -314,6 +324,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -331,8 +342,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; From 33fc564dd71b3605be30a3bb27709412282bab2b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 11:57:30 -0700 Subject: [PATCH 63/93] Add empty.swift to remaining integration test projects. --- .../project.pbxproj | 13 +++++ .../project.pbxproj | 20 ++++++++ .../project.pbxproj | 18 +++++++ .../project.pbxproj | 13 +++++ .../project.pbxproj | 20 ++++++++ .../project.pbxproj | 47 +++++++++++++++---- .../project.pbxproj | 20 ++++++++ .../project.pbxproj | 13 +++++ .../project.pbxproj | 20 ++++++++ .../project.pbxproj | 20 ++++++++ .../project.pbxproj | 20 ++++++++ 11 files changed, 214 insertions(+), 10 deletions(-) diff --git a/admob/integration_test/integration_test.xcodeproj/project.pbxproj b/admob/integration_test/integration_test.xcodeproj/project.pbxproj index ca08168ca8..2587fd7a06 100644 --- a/admob/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/admob/integration_test/integration_test.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; + D640F3172819C85800AC956E /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D640F3162819C85800AC956E /* empty.swift */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; @@ -34,6 +35,7 @@ D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; + D640F3162819C85800AC956E /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; @@ -94,6 +96,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D640F3162819C85800AC956E /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -149,6 +152,7 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -158,6 +162,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 529226C91C85F68000C89379; @@ -193,6 +198,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D640F3172819C85800AC956E /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -286,6 +292,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -303,8 +310,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -314,6 +324,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -331,8 +342,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj index f7653171c0..1468b0f8d5 100644 --- a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj @@ -28,6 +28,8 @@ D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; + D66D22512819C88C009FAEB5 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66D22502819C88C009FAEB5 /* empty.swift */; }; + D66D22522819C88C009FAEB5 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D66D22502819C88C009FAEB5 /* empty.swift */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; @@ -56,6 +58,7 @@ D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + D66D22502819C88C009FAEB5 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; @@ -132,6 +135,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D66D22502819C88C009FAEB5 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -215,10 +219,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BC1D664B2668D109005DC2DA = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -323,6 +329,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D66D22512819C88C009FAEB5 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -337,6 +344,7 @@ BC1D66622668D287005DC2DA /* gmock-all.cc in Sources */, BC1D66672668D2BE005DC2DA /* ios_app_framework.mm in Sources */, BC1D66642668D2B3005DC2DA /* app_framework.cc in Sources */, + D66D22522819C88C009FAEB5 /* empty.swift in Sources */, BC1D66632668D2AF005DC2DA /* gtest-all.cc in Sources */, BC1D66652668D2B6005DC2DA /* firebase_test_framework.cc in Sources */, ); @@ -449,6 +457,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -466,8 +475,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -477,6 +489,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -494,8 +507,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -508,6 +523,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -546,6 +562,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.ios.analytics.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 12.4; }; @@ -559,6 +577,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -595,6 +614,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.ios.analytics.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 12.4; }; diff --git a/auth/integration_test/integration_test.xcodeproj/project.pbxproj b/auth/integration_test/integration_test.xcodeproj/project.pbxproj index 905e2115b3..8349a00ed8 100644 --- a/auth/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/auth/integration_test/integration_test.xcodeproj/project.pbxproj @@ -32,6 +32,8 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; D6C179F022CB32A000C2651A /* app_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EF22CB32A000C2651A /* app_framework.cc */; }; + D6DF8F3D2819C8A400214018 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6DF8F3C2819C8A400214018 /* empty.swift */; }; + D6DF8F3E2819C8A400214018 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6DF8F3C2819C8A400214018 /* empty.swift */; }; /* End PBXBuildFile section */ /* Begin PBXBuildRule section */ @@ -76,6 +78,7 @@ D6C179EC22CB323300C2651A /* firebase_test_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = firebase_test_framework.cc; path = src/firebase_test_framework.cc; sourceTree = ""; }; D6C179ED22CB323300C2651A /* app_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = app_framework.h; path = src/app_framework.h; sourceTree = ""; }; D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; + D6DF8F3C2819C8A400214018 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D6E7D43C22D51D9900EDBD35 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; DE5DF88312698BE99BFA8CD9 /* libPods-integration_test_tvos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test_tvos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -147,6 +150,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D6DF8F3C2819C8A400214018 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -231,6 +235,7 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.BackgroundModes = { @@ -243,6 +248,7 @@ }; 9F3A08EA266978C300E1D69F = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -347,6 +353,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D6DF8F3D2819C8A400214018 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -357,6 +364,7 @@ buildActionMask = 2147483647; files = ( 9F3A09012669791B00E1D69F /* gmock-all.cc in Sources */, + D6DF8F3E2819C8A400214018 /* empty.swift in Sources */, 9F3A09032669792100E1D69F /* app_framework.cc in Sources */, 9F3A09022669791E00E1D69F /* gtest-all.cc in Sources */, 9F3A09042669792400E1D69F /* firebase_test_framework.cc in Sources */, @@ -472,6 +480,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -493,6 +502,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseCppAuthTestApp.dev; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -502,6 +513,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -523,6 +535,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseCppAuthTestApp.dev; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -535,6 +548,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -573,6 +587,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseCppAuthTestApp.dev; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -586,6 +602,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -622,6 +639,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseCppAuthTestApp.dev; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; diff --git a/dynamic_links/integration_test/integration_test.xcodeproj/project.pbxproj b/dynamic_links/integration_test/integration_test.xcodeproj/project.pbxproj index ca08168ca8..8c01e30e2c 100644 --- a/dynamic_links/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/dynamic_links/integration_test/integration_test.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 529226D61C85F68000C89379 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D51C85F68000C89379 /* Foundation.framework */; }; 529226D81C85F68000C89379 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D71C85F68000C89379 /* CoreGraphics.framework */; }; 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; + D603B7262819C8CA008A979F /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D603B7252819C8CA008A979F /* empty.swift */; }; D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; @@ -29,6 +30,7 @@ 529226D71C85F68000C89379 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 529226D91C85F68000C89379 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 529226EE1C85F68000C89379 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + D603B7252819C8CA008A979F /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; @@ -94,6 +96,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D603B7252819C8CA008A979F /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -149,6 +152,7 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -158,6 +162,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 529226C91C85F68000C89379; @@ -193,6 +198,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D603B7262819C8CA008A979F /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -286,6 +292,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -303,8 +310,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -314,6 +324,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -331,8 +342,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/firestore/integration_test/integration_test.xcodeproj/project.pbxproj b/firestore/integration_test/integration_test.xcodeproj/project.pbxproj index d85574baff..88d6e2c186 100644 --- a/firestore/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/firestore/integration_test/integration_test.xcodeproj/project.pbxproj @@ -29,6 +29,8 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; + D68DFCF82819C8E800FBAAED /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D68DFCF72819C8E800FBAAED /* empty.swift */; }; + D68DFCF92819C8E800FBAAED /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D68DFCF72819C8E800FBAAED /* empty.swift */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -61,6 +63,7 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; + D68DFCF72819C8E800FBAAED /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -138,6 +141,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D68DFCF72819C8E800FBAAED /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -222,10 +226,12 @@ TargetAttributes = { 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; + LastSwiftMigration = 1320; ProvisioningStyle = Manual; }; BC1D677826799F8C005DC2DA = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -366,6 +372,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D68DFCF82819C8E800FBAAED /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -380,6 +387,7 @@ BC1D678F26799F9A005DC2DA /* gmock-all.cc in Sources */, BC1D679426799FAA005DC2DA /* ios_app_framework.mm in Sources */, BC1D679126799FA0005DC2DA /* app_framework.cc in Sources */, + D68DFCF92819C8E800FBAAED /* empty.swift in Sources */, BC1D679026799F9D005DC2DA /* gtest-all.cc in Sources */, BC1D679226799FA3005DC2DA /* firebase_test_framework.cc in Sources */, ); @@ -492,6 +500,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; @@ -509,9 +518,12 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -521,6 +533,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = ""; @@ -538,9 +551,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -553,6 +568,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -594,6 +610,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -607,6 +625,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -646,6 +665,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; diff --git a/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj b/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj index f6d13725de..75c12490f8 100644 --- a/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj +++ b/firestore/integration_test_internal/integration_test.xcodeproj/project.pbxproj @@ -16,7 +16,7 @@ 529226DA1C85F68000C89379 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 529226D91C85F68000C89379 /* UIKit.framework */; }; 6013D96CC99BE0D747E924BF /* firebase_auth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F2D5AB4DBDD804A38B51636 /* firebase_auth.framework */; }; 7B510B28CC034B1F8E1A89E0 /* firebase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C04D181B10689799EE4823D /* firebase.framework */; }; - 8822447D5AD56650C3762A3C /* firebase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F587446811C107616587386 /* firebase.framework */; }; + 8822447D5AD56650C3762A3C /* (null) in Frameworks */ = {isa = PBXBuildFile; }; B03DCEF24BED9C02CFA71109 /* firebase_auth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C4AC9C038C468519B583C7C /* firebase_auth.framework */; }; BC1D682C267B0030005DC2DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D682A267B0030005DC2DA /* Main.storyboard */; }; BC1D6831267B0032005DC2DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BC1D682F267B0032005DC2DA /* LaunchScreen.storyboard */; }; @@ -57,6 +57,8 @@ BC1D685C267B0112005DC2DA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC1D685B267B0112005DC2DA /* UIKit.framework */; }; BC1D685E267B0116005DC2DA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC1D685D267B0116005DC2DA /* CoreGraphics.framework */; }; C0EB70BFD56F6FD455E7A583 /* libPods-integration_test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C6A6C05283DCA99207D26DC2 /* libPods-integration_test.a */; }; + D60C58872819C902002E8A04 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60C58862819C902002E8A04 /* empty.swift */; }; + D60C58882819C902002E8A04 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D60C58862819C902002E8A04 /* empty.swift */; }; D61A465D2606EA0B007EBE9B /* transaction_extra_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61A465C2606EA0B007EBE9B /* transaction_extra_test.cc */; }; D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61CFBC126091C3B0035CB2A /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61CFBC026091C3A0035CB2A /* integration_test.cc */; }; @@ -124,6 +126,7 @@ BC1D685B267B0112005DC2DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; BC1D685D267B0116005DC2DA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; C6A6C05283DCA99207D26DC2 /* libPods-integration_test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integration_test.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D60C58862819C902002E8A04 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D61A465C2606EA0B007EBE9B /* transaction_extra_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = transaction_extra_test.cc; path = src/transaction_extra_test.cc; sourceTree = ""; }; D61C5F8C22BABA9B00A79141 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D61C5F8D22BABA9C00A79141 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -183,7 +186,7 @@ B03DCEF24BED9C02CFA71109 /* firebase_auth.framework in Frameworks */, D86FB1D3D4A592C451A29369 /* firebase_firestore.framework in Frameworks */, C0EB70BFD56F6FD455E7A583 /* libPods-integration_test.a in Frameworks */, - 8822447D5AD56650C3762A3C /* firebase.framework in Frameworks */, + 8822447D5AD56650C3762A3C /* (null) in Frameworks */, 6013D96CC99BE0D747E924BF /* firebase_auth.framework in Frameworks */, 5270BB448DF5ECE860FDD68B /* firebase_firestore.framework in Frameworks */, ); @@ -196,7 +199,6 @@ BC1D685E267B0116005DC2DA /* CoreGraphics.framework in Frameworks */, BC1D685C267B0112005DC2DA /* UIKit.framework in Frameworks */, BC1D685A267B010D005DC2DA /* Foundation.framework in Frameworks */, - 349D894BC9921EE411628083 /* libPods-integration_test_tvos.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -208,10 +210,8 @@ children = ( AA66DDF2F9BB2D8480FAB9BD /* Pods-integration_test.debug.xcconfig */, 5FB592CD6A6DDFBF795F22C1 /* Pods-integration_test.release.xcconfig */, - 0E2C285E6C7E246C8636B9B5 /* Pods-integration_test_tvos.debug.xcconfig */, 3DE393E827F88B06CD3C39CD /* Pods-integration_test_tvos.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -227,6 +227,7 @@ 529226D41C85F68000C89379 /* Frameworks */, 529226D31C85F68000C89379 /* Products */, 241B330D425A3B220F54AE8D /* Pods */, + D60C58852819C8F0002E8A04 /* Recovered References */, ); sourceTree = ""; }; @@ -261,6 +262,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D60C58862819C902002E8A04 /* empty.swift */, EDEEC7622800CD0000EFBAAF /* leveldb_snappy_test.cc */, 12D513182684C8D100A83FAA /* bundle_builder.cc */, 12D513192684C8D100A83FAA /* bundle_builder.h */, @@ -326,6 +328,18 @@ path = integration_test_tvos; sourceTree = ""; }; + D60C58852819C8F0002E8A04 /* Recovered References */ = { + isa = PBXGroup; + children = ( + 6C04D181B10689799EE4823D /* firebase.framework */, + 8C4AC9C038C468519B583C7C /* firebase_auth.framework */, + B7F45B5446094E107E88721A /* firebase_firestore.framework */, + 6F2D5AB4DBDD804A38B51636 /* firebase_auth.framework */, + EAFAF9474EC412ADCC65F2CC /* firebase_firestore.framework */, + ); + name = "Recovered References"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -379,10 +393,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BC1D6821267B0030005DC2DA = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -523,6 +539,7 @@ D6AAAD492606C22D0025C53B /* collection_reference_test.cc in Sources */, D6AAAD572606C22D0025C53B /* document_reference_test.cc in Sources */, D67D355822BABD2200292C1D /* gtest-all.cc in Sources */, + D60C58872819C902002E8A04 /* empty.swift in Sources */, D6AAAD4D2606C22D0025C53B /* query_snapshot_test.cc in Sources */, 12D513142684C8C200A83FAA /* bundle_test.cc in Sources */, D6AAAD4F2606C22D0025C53B /* transaction_test.cc in Sources */, @@ -565,8 +582,8 @@ BC1D683E267B00EB005DC2DA /* integration_test_util.cc in Sources */, BC1D683D267B00EB005DC2DA /* query_snapshot_test.cc in Sources */, BC1D6855267B00EB005DC2DA /* transaction_test.cc in Sources */, + D60C58882819C902002E8A04 /* empty.swift in Sources */, BC1D684A267B00EB005DC2DA /* firebase_test_framework.cc in Sources */, - 12D513152684C8C200A83FAA /* bundle_test.cc in Sources */, BC1D6852267B00EB005DC2DA /* smoke_test.cc in Sources */, BC1D6848267B00EB005DC2DA /* sanity_test.cc in Sources */, BC1D6856267B00EE005DC2DA /* ios_app_framework.mm in Sources */, @@ -585,7 +602,6 @@ BC1D683B267B00EB005DC2DA /* firestore_test.cc in Sources */, BC1D6842267B00EB005DC2DA /* field_value_test.cc in Sources */, BC1D684D267B00EB005DC2DA /* server_timestamp_test.cc in Sources */, - 12D5131B2684C8D100A83FAA /* bundle_builder.cc in Sources */, EDEEC7642800CD0000EFBAAF /* leveldb_snappy_test.cc in Sources */, BC1D6841267B00EB005DC2DA /* query_test.cc in Sources */, BC1D684F267B00EB005DC2DA /* document_reference_test.cc in Sources */, @@ -706,6 +722,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -736,9 +753,12 @@ "\"$(SRCROOT)/../..\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -749,6 +769,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -779,22 +800,24 @@ "\"$(SRCROOT)/../..\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; }; BC1D6836267B0032005DC2DA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0E2C285E6C7E246C8636B9B5 /* Pods-integration_test_tvos.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -844,10 +867,12 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.firebase.cpp.firestore.testapp"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -862,6 +887,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -909,10 +935,11 @@ INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.google.firebase.cpp.firestore.testapp"; + PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.firestore.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; diff --git a/functions/integration_test/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index a6396a925f..d58eb6dcb3 100644 --- a/functions/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/functions/integration_test/integration_test.xcodeproj/project.pbxproj @@ -31,6 +31,8 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; + D6ACCB082819C91E001AB18F /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6ACCB072819C91E001AB18F /* empty.swift */; }; + D6ACCB092819C91E001AB18F /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6ACCB072819C91E001AB18F /* empty.swift */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -65,6 +67,7 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; + D6ACCB072819C91E001AB18F /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -158,6 +161,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D6ACCB072819C91E001AB18F /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -241,10 +245,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BC1D674426799A44005DC2DA = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -349,6 +355,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D6ACCB082819C91E001AB18F /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -363,6 +370,7 @@ BC1D675C26799A55005DC2DA /* ios_app_framework.mm in Sources */, BC1D675D26799A57005DC2DA /* integration_test.cc in Sources */, BC1D675B26799A53005DC2DA /* ios_firebase_test_framework.mm in Sources */, + D6ACCB092819C91E001AB18F /* empty.swift in Sources */, BC1D675E26799A5C005DC2DA /* firebase_test_framework.cc in Sources */, BC1D676026799A61005DC2DA /* gtest-all.cc in Sources */, ); @@ -476,6 +484,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -493,9 +502,12 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -506,6 +518,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -523,9 +536,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.functions.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -539,6 +554,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -580,6 +596,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 12.4; }; @@ -594,6 +612,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -633,6 +652,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 12.4; }; diff --git a/installations/integration_test/integration_test.xcodeproj/project.pbxproj b/installations/integration_test/integration_test.xcodeproj/project.pbxproj index ca08168ca8..9a53686fe7 100644 --- a/installations/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/installations/integration_test/integration_test.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; + D64587C42819C938006D01A4 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64587C32819C938006D01A4 /* empty.swift */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; @@ -34,6 +35,7 @@ D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; + D64587C32819C938006D01A4 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; @@ -94,6 +96,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D64587C32819C938006D01A4 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -149,6 +152,7 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -158,6 +162,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 529226C91C85F68000C89379; @@ -193,6 +198,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D64587C42819C938006D01A4 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -286,6 +292,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -303,8 +310,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -314,6 +324,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -331,8 +342,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/messaging/integration_test/integration_test.xcodeproj/project.pbxproj b/messaging/integration_test/integration_test.xcodeproj/project.pbxproj index f39c4bc748..13c995bd36 100644 --- a/messaging/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/messaging/integration_test/integration_test.xcodeproj/project.pbxproj @@ -29,6 +29,8 @@ D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; + D6BF54672819C95800C0093A /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6BF54662819C95800C0093A /* empty.swift */; }; + D6BF54682819C95800C0093A /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6BF54662819C95800C0093A /* empty.swift */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; @@ -66,6 +68,7 @@ D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; + D6BF54662819C95800C0093A /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D6C179E722CB322900C2651A /* ios_app_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_app_framework.mm; path = src/ios/ios_app_framework.mm; sourceTree = ""; }; D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ios_firebase_test_framework.mm; path = src/ios/ios_firebase_test_framework.mm; sourceTree = ""; }; D6C179EB22CB323300C2651A /* firebase_test_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = firebase_test_framework.h; path = src/firebase_test_framework.h; sourceTree = ""; }; @@ -145,6 +148,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D6BF54662819C95800C0093A /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -239,10 +243,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BCFD5BD726A5DD3400538907 = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -347,6 +353,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D6BF54672819C95800C0093A /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -361,6 +368,7 @@ BCFD5BF926A60D1E00538907 /* gmock-all.cc in Sources */, BCFD5BFE26A60D2B00538907 /* ios_app_framework.mm in Sources */, BCFD5BFB26A60D2400538907 /* app_framework.cc in Sources */, + D6BF54682819C95800C0093A /* empty.swift in Sources */, BCFD5BFA26A60D2100538907 /* gtest-all.cc in Sources */, BCFD5BFC26A60D2600538907 /* firebase_test_framework.cc in Sources */, ); @@ -474,6 +482,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -491,8 +500,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -503,6 +515,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -520,8 +533,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -535,6 +550,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -573,6 +589,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.google.FirebaseCppMessagingTestApp.dev.integration-test-tvos"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -587,6 +605,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -623,6 +642,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.google.FirebaseCppMessagingTestApp.dev.integration-test-tvos"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; diff --git a/remote_config/integration_test/integration_test.xcodeproj/project.pbxproj b/remote_config/integration_test/integration_test.xcodeproj/project.pbxproj index 18d7069b84..a2804b2a1e 100644 --- a/remote_config/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/remote_config/integration_test/integration_test.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ D61C5F8E22BABA9C00A79141 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61C5F8C22BABA9B00A79141 /* Images.xcassets */; }; D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D61C5F9222BABAD100A79141 /* integration_test.cc */; }; D62CCBC022F367140099BE9F /* gmock-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D62CCBBF22F367140099BE9F /* gmock-all.cc */; }; + D65681252819C97900FA5EB8 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65681242819C97900FA5EB8 /* empty.swift */; }; + D65681262819C97900FA5EB8 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65681242819C97900FA5EB8 /* empty.swift */; }; D66B16871CE46E8900E5638A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */; }; D67D355822BABD2200292C1D /* gtest-all.cc in Sources */ = {isa = PBXBuildFile; fileRef = D67D355622BABD2100292C1D /* gtest-all.cc */; }; D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E722CB322900C2651A /* ios_app_framework.mm */; }; @@ -55,6 +57,7 @@ D61C5F9222BABAD100A79141 /* integration_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = integration_test.cc; path = src/integration_test.cc; sourceTree = ""; }; D62CCBBF22F367140099BE9F /* gmock-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gmock-all.cc"; path = "external/googletest/src/googlemock/src/gmock-all.cc"; sourceTree = ""; }; D62CCBC122F367320099BE9F /* gmock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gmock.h; path = external/googletest/src/googlemock/include/gmock/gmock.h; sourceTree = ""; }; + D65681242819C97900FA5EB8 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; D66B16861CE46E8900E5638A /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; D67D355622BABD2100292C1D /* gtest-all.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "gtest-all.cc"; path = "external/googletest/src/googletest/src/gtest-all.cc"; sourceTree = ""; }; D67D355722BABD2100292C1D /* gtest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gtest.h; path = external/googletest/src/googletest/include/gtest/gtest.h; sourceTree = ""; }; @@ -132,6 +135,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D65681242819C97900FA5EB8 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -215,10 +219,12 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BC1D664B2668D109005DC2DA = { CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -323,6 +329,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D65681252819C97900FA5EB8 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -337,6 +344,7 @@ BC1D66622668D287005DC2DA /* gmock-all.cc in Sources */, BC1D66672668D2BE005DC2DA /* ios_app_framework.mm in Sources */, BC1D66642668D2B3005DC2DA /* app_framework.cc in Sources */, + D65681262819C97900FA5EB8 /* empty.swift in Sources */, BC1D66632668D2AF005DC2DA /* gtest-all.cc in Sources */, BC1D66652668D2B6005DC2DA /* firebase_test_framework.cc in Sources */, ); @@ -449,6 +457,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -466,8 +475,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -477,6 +489,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -494,8 +507,10 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -508,6 +523,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -546,6 +562,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.ios.remoteconfig.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; @@ -559,6 +577,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -595,6 +614,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.google.ios.remoteconfig.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; diff --git a/storage/integration_test/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index 6052eec685..686bf18848 100644 --- a/storage/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/storage/integration_test/integration_test.xcodeproj/project.pbxproj @@ -33,6 +33,8 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */ = {isa = PBXBuildFile; fileRef = D6C179E822CB322900C2651A /* ios_firebase_test_framework.mm */; }; D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EC22CB323300C2651A /* firebase_test_framework.cc */; }; D6C179F022CB32A000C2651A /* app_framework.cc in Sources */ = {isa = PBXBuildFile; fileRef = D6C179EF22CB32A000C2651A /* app_framework.cc */; }; + D6E9628F2819C99600ADA1E4 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E9628E2819C99600ADA1E4 /* empty.swift */; }; + D6E962902819C99600ADA1E4 /* empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E9628E2819C99600ADA1E4 /* empty.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -69,6 +71,7 @@ D6C179EC22CB323300C2651A /* firebase_test_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = firebase_test_framework.cc; path = src/firebase_test_framework.cc; sourceTree = ""; }; D6C179ED22CB323300C2651A /* app_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = app_framework.h; path = src/app_framework.h; sourceTree = ""; }; D6C179EF22CB32A000C2651A /* app_framework.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = app_framework.cc; path = src/app_framework.cc; sourceTree = ""; }; + D6E9628E2819C99600ADA1E4 /* empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = empty.swift; path = src/empty.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -142,6 +145,7 @@ 5292271D1C85FB5500C89379 /* src */ = { isa = PBXGroup; children = ( + D6E9628E2819C99600ADA1E4 /* empty.swift */, D62CCBC122F367320099BE9F /* gmock.h */, D62CCBBF22F367140099BE9F /* gmock-all.cc */, D67D355622BABD2100292C1D /* gtest-all.cc */, @@ -225,11 +229,13 @@ 529226D11C85F68000C89379 = { CreatedOnToolsVersion = 6.4; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; BC1D668B2679868A005DC2DA = { CreatedOnToolsVersion = 12.5; DevelopmentTeam = EQHXZ8M8AV; + LastSwiftMigration = 1320; ProvisioningStyle = Automatic; }; }; @@ -334,6 +340,7 @@ D6C179EA22CB322900C2651A /* ios_firebase_test_framework.mm in Sources */, D61C5F9622BABAD200A79141 /* integration_test.cc in Sources */, D6C179E922CB322900C2651A /* ios_app_framework.mm in Sources */, + D6E9628F2819C99600ADA1E4 /* empty.swift in Sources */, D6C179F022CB32A000C2651A /* app_framework.cc in Sources */, D6C179EE22CB323300C2651A /* firebase_test_framework.cc in Sources */, ); @@ -348,6 +355,7 @@ BC1D66A2267986B9005DC2DA /* gmock-all.cc in Sources */, BC1D66D526798DC9005DC2DA /* ios_app_framework.mm in Sources */, BC1D66A4267986BE005DC2DA /* app_framework.cc in Sources */, + D6E962902819C99600ADA1E4 /* empty.swift in Sources */, BC1D66A3267986BB005DC2DA /* gtest-all.cc in Sources */, BC1D66A5267986C1005DC2DA /* firebase_test_framework.cc in Sources */, ); @@ -460,6 +468,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -477,9 +486,12 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Debug; @@ -489,6 +501,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; @@ -506,9 +519,11 @@ "\"$(SRCROOT)/external/googletest/src/googlemock\"", ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.cpp.storage.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; WRAPPER_EXTENSION = app; }; name = Release; @@ -521,6 +536,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -562,6 +578,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 13.4; }; @@ -575,6 +593,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; @@ -614,6 +633,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 13.4; }; From e1e2ea0fff5c6ea353355534c56f08bc12f826a6 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 14:32:02 -0700 Subject: [PATCH 64/93] Check to make sure that the controller can pause/resume/etc. --- storage/src/ios/controller_ios.mm | 42 ++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/storage/src/ios/controller_ios.mm b/storage/src/ios/controller_ios.mm index 08b06e6649..556ee912d8 100644 --- a/storage/src/ios/controller_ios.mm +++ b/storage/src/ios/controller_ios.mm @@ -42,10 +42,16 @@ bool ControllerInternal::Pause() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() pause]; - }); + FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(pause)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task pause]; + }); + } + else { + return false; + } } else { pending_pause_ = true; } @@ -54,10 +60,16 @@ bool ControllerInternal::Resume() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() resume]; - }); + FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(resume)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task resume]; + }); + } + else { + return false; + } } else { pending_pause_ = false; } @@ -66,10 +78,16 @@ bool ControllerInternal::Cancel() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() cancel]; - }); + FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(cancel)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task cancel]; + }); + } + else { + return false; + } } else { pending_cancel_ = true; } From ad49def7a28f8abc959b246bbe8d5adb897c1a35 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:02:01 -0700 Subject: [PATCH 65/93] Workaround for pause/cancel/resume semantics changing in 9.x. --- storage/src/ios/listener_ios.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/src/ios/listener_ios.mm b/storage/src/ios/listener_ios.mm index 8a09b9cc9c..fb1247bbdd 100644 --- a/storage/src/ios/listener_ios.mm +++ b/storage/src/ios/listener_ios.mm @@ -68,7 +68,7 @@ @implementation FIRCPPStorageListenerHandle ListenerInternal* listener_internal = listener_handle.listenerInternal; if (listener_internal) { Controller controller; - controller.internal_->AssignTask(storage, snapshot.task); + controller.internal_->AssignTask(storage, listener_internal->task()); listener_internal->listener_->OnPaused(&controller); } [my_listener_handle_lock unlock]; @@ -85,7 +85,7 @@ @implementation FIRCPPStorageListenerHandle listener_internal->previous_progress_count_ != progress.completedUnitCount) { listener_internal->previous_progress_count_ = progress.completedUnitCount; Controller controller; - controller.internal_->AssignTask(storage, snapshot.task); + controller.internal_->AssignTask(storage, listener_internal->task()); listener_internal->listener_->OnProgress(&controller); } } From 18ef4695c3a8714107e6ccf2f069398af84cb2dc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:06:07 -0700 Subject: [PATCH 66/93] Switch from nightly to release tag for Firestore external dep. --- cmake/external/firestore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 7b67544c56..7cb97c0ce9 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -20,7 +20,7 @@ endif() # If the format of the line below changes, then be sure to update # https://github.com/firebase/firebase-cpp-sdk/blob/fd054fa016/.github/workflows/update-dependencies.yml#L81 -set(version CocoaPods-9.0.0.nightly) +set(version CocoaPods-9.0.0) function(GetReleasedDep) message("Getting released firebase-ios-sdk @ ${version}") From b56a26cc6f4b21159b5bc83ca4cde1cd636e77fc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:23:34 -0700 Subject: [PATCH 67/93] Update Xcode version to 13.2.1, required version for iOS SDK. --- .github/workflows/android.yml | 2 +- .github/workflows/cpp-packaging.yml | 4 ++-- release_build_files/readme.md | 4 ++-- scripts/gha/print_matrix_configuration.py | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b15871c789..a19bf72009 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,7 +13,7 @@ on: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir GITHUB_TOKEN: ${{ github.token }} - xcodeVersion: "12.4" # Only affects Mac runners, and only for prerequisites. + xcodeVersion: "13.2.1" # Only affects Mac runners, and only for prerequisites. concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 0aaf2c68ba..1eedc74afc 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -32,9 +32,9 @@ env: demumbleVer: "1.1.0" # Use SHA256 for hashing files. hashCommand: "sha256sum" - # Xcode version 12.5.1 is the version we build the SDK with. + # Xcode version 13.2.1 is the version we build the SDK with. # Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app - xcodeVersion: "12.5.1" + xcodeVersion: "13.2.1" # LLVM version with ARM MachO support has no version number yet. llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534" GITHUB_TOKEN: ${{ github.token }} diff --git a/release_build_files/readme.md b/release_build_files/readme.md index ff4ea6374c..ce0c39cdc3 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -371,7 +371,7 @@ Firebase Installations (stub) | firebase_installations.framework Firebase Cloud Messaging (stub) | firebase_messaging.framework | | firebase.framework -The provided libraries have been tested using Xcode 12.5.1. When building C++ +The provided libraries have been tested using Xcode 13.2.1. When building C++ desktop apps on OS X, you will need to link the `gssapi_krb5` and `pthread` system libraries, as well as the `CoreFoundation`, `Foundation`, `GSS`, and `Security` OS X system frameworks (consult your compiler documentation for more @@ -569,7 +569,7 @@ code. ## Release Notes ### Upcoming release - Changes - - General (iOS): iOS SDKs are now built using Xcode 12.5.1. + - General (iOS): iOS SDKs are now built using Xcode 13.2.1. - AdMob (iOS): Temporarily pinned AdMob dependency to a special version of the Google-Mobile-Ads-SDK Cocoapod, "7.69.0-cppsdk2", to maintain compatibility with version 9.x of the Firebase iOS SDK. diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index c898bb113b..4283268b04 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -76,12 +76,12 @@ "build_type": ["Release", "Debug"], "architecture": ["x64", "x86", "arm64"], "msvc_runtime": ["static","dynamic"], - "xcode_version": ["12.5.1"], + "xcode_version": ["13.2.1"], "python_version": ["3.7"], EXPANDED_KEY: { "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "xcode_version": ["11.7", "12.5.1", "13.2.1"], + "xcode_version": ["13.2.1"], } } }, @@ -112,7 +112,7 @@ "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], - "xcode_version": ["12.5.1"], # only the first one is used + "xcode_version": ["13.2.1"], # only the first one is used "ndk_version": ["r22b"], "platform_version": ["28"], "build_tools_version": ["28.0.3"], @@ -138,10 +138,10 @@ "ios": { "matrix": { - "xcode_version": ["12.5.1"], + "xcode_version": ["13.2.1"], EXPANDED_KEY: { - "xcode_version": ["12.5.1", "13.2.1"] + "xcode_version": ["13.2.1"] } } }, From 42236c854cc4a2c3a095060d50c0e625a93ce84b Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:26:45 -0700 Subject: [PATCH 68/93] Change deployment target back to 10.x. --- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj index 1468b0f8d5..c81e09382f 100644 --- a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj @@ -565,7 +565,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; @@ -616,7 +616,7 @@ SDKROOT = appletvos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; diff --git a/functions/integration_test/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index d58eb6dcb3..685d34fd7e 100644 --- a/functions/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/functions/integration_test/integration_test.xcodeproj/project.pbxproj @@ -599,7 +599,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; @@ -654,7 +654,7 @@ SDKROOT = appletvos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 12.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; diff --git a/storage/integration_test/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index 686bf18848..da8985c374 100644 --- a/storage/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/storage/integration_test/integration_test.xcodeproj/project.pbxproj @@ -581,7 +581,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 13.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; @@ -635,7 +635,7 @@ SDKROOT = appletvos; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 13.4; + TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; From cb3deda70792859f5a214ee14cdfb7bee89b62bc Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:30:04 -0700 Subject: [PATCH 69/93] Fix iOS deployment version back to 10.0 --- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- .../integration_test.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj index c81e09382f..53b960e16b 100644 --- a/analytics/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj @@ -407,7 +407,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -444,7 +444,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/functions/integration_test/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index 685d34fd7e..a8d92dae8e 100644 --- a/functions/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/functions/integration_test/integration_test.xcodeproj/project.pbxproj @@ -433,7 +433,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -470,7 +470,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/storage/integration_test/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index da8985c374..d24b64205c 100644 --- a/storage/integration_test/integration_test.xcodeproj/project.pbxproj +++ b/storage/integration_test/integration_test.xcodeproj/project.pbxproj @@ -418,7 +418,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -455,7 +455,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; From 692f44d516a207ec021cd98edc4a2cea6f65dd29 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 15:49:19 -0700 Subject: [PATCH 70/93] Add notes about including a swift file --- release_build_files/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index ce0c39cdc3..b1002d2b24 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -230,6 +230,10 @@ CocoaPod (9.x). Please ensure that you use the special version of Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk2) to maintain compatibility with Firebase 9.x. +Note: Parts of the Firebase iOS SDK are written in Swift. If your application +does not use any Swift code, you may need to add an empty .swift file to your +Xcode project to ensure that the Swift runtime is included in your app. + #### Libraries If you prefer to link against static libraries instead of xcframeworks (see the @@ -290,6 +294,10 @@ CocoaPod (9.x). Please ensure that you use the special version of Google-Mobile-Ads-SDK Cocoapod listed above (7.69.0-cppsdk2) to maintain compatibility with Firebase 9.x. +Note: Parts of the Firebase iOS SDK are written in Swift. If your application +does not use any Swift code, you may need to add an empty .swift file to your +Xcode project to ensure that the Swift runtime is included in your app. + ### Desktop Implementation Dependencies #### Linux libraries From c72baab4d1fd05eeab79657906c51b926ecaa11e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 17:21:06 -0700 Subject: [PATCH 71/93] Change comparison to lower-case to prevent restore_secrets overriding it. --- messaging/integration_test/src/integration_test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/messaging/integration_test/src/integration_test.cc b/messaging/integration_test/src/integration_test.cc index dcd5ec862d..e4d4bbeb03 100644 --- a/messaging/integration_test/src/integration_test.cc +++ b/messaging/integration_test/src/integration_test.cc @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include #include @@ -43,7 +44,7 @@ namespace firebase_testapp_automated { // Your Firebase project's Server Key for Cloud Messaging goes here. // You can get this from Firebase Console, in your Project settings under Cloud // Messaging. -const char kFcmServerKey[] = "REPLACE_WITH_YOUR_SERVER_KEY"; +const char kFcmServerKey[] = "AAAAM2ROZHA:APA91bHVTMuAdnIw014jKETAUYiy7qLvIo1zMHGMOszbZyZJaf_cEEd6MF9ad8qwS_DbgjYo36FeELhtTf-dsJCsLt6hurDnbRPIGcxMPtNMNSYC1Krh-KSn9GURceEwEA-sr-i3HTDU"; const char kRestEndpoint[] = "https://fcm.googleapis.com/fcm/send"; @@ -222,7 +223,7 @@ bool FirebaseMessagingTest::CreateTestMessage( // Don't send HTTP requests in stub mode. return false; } - if (strcmp(kFcmServerKey, "REPLACE_WITH_YOUR_SERVER_KEY") == 0) { + if (strcasecmp(kFcmServerKey, "replace_with_your_server_key") == 0) { LogWarning( "Please put your Firebase Cloud Messaging server key in " "kFcmServerKey."); From da537238dfc85d782d6e6a5ae01e96d3c5b8c395 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 27 Apr 2022 17:56:41 -0700 Subject: [PATCH 72/93] Clean up the verbose log of file size --- .../integration_test/src/integration_test.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/storage/integration_test/src/integration_test.cc b/storage/integration_test/src/integration_test.cc index 1f495a6bf6..ae8dd96432 100644 --- a/storage/integration_test/src/integration_test.cc +++ b/storage/integration_test/src/integration_test.cc @@ -591,7 +591,8 @@ TEST_F(FirebaseStorageTest, TestPutFileAndGetFile) { LogDebug("Creating local file: %s", path.c_str()); FILE* file = fopen(path.c_str(), "wb"); - std::fwrite(kSimpleTestFile.c_str(), 1, kSimpleTestFile.size(), file); + size_t bytes_written = std::fwrite(kSimpleTestFile.c_str(), 1, kSimpleTestFile.size(), file); + EXPECT_EQ(bytes_written, kSimpleTestFile.size()); fclose(file); firebase::storage::Metadata new_metadata; @@ -641,7 +642,8 @@ TEST_F(FirebaseStorageTest, TestPutFileAndGetFile) { std::vector buffer(kSimpleTestFile.size()); FILE* file = fopen(path.c_str(), "rb"); EXPECT_NE(file, nullptr); - std::fread(&buffer[0], 1, kSimpleTestFile.size(), file); + size_t bytes_read = std::fread(&buffer[0], 1, kSimpleTestFile.size(), file); + EXPECT_EQ(bytes_read, kSimpleTestFile.size()); fclose(file); EXPECT_EQ(memcmp(&kSimpleTestFile[0], &buffer[0], buffer.size()), 0); } @@ -1195,7 +1197,8 @@ class StorageListener : public firebase::storage::Listener { StorageListener() : on_paused_was_called_(false), on_progress_was_called_(false), - resume_succeeded_(false) {} + resume_succeeded_(false), + last_bytes_transferred_(-1) {} // Tracks whether OnPaused was ever called and resumes the transfer. void OnPaused(firebase::storage::Controller* controller) override { @@ -1217,8 +1220,13 @@ class StorageListener : public firebase::storage::Listener { } void OnProgress(firebase::storage::Controller* controller) override { - LogDebug("Transferred %lld of %lld", controller->bytes_transferred(), - controller->total_byte_count()); + int64_t bytes_transferred = controller->bytes_transferred(); + // Only update when the byte count changed, to avoid spamming the log. + if (last_bytes_transferred_ != bytes_transferred) { + LogDebug("Transferred %lld of %lld", bytes_transferred, + controller->total_byte_count()); + last_bytes_transferred_ = bytes_transferred; + } on_progress_was_called_ = true; } @@ -1230,6 +1238,7 @@ class StorageListener : public firebase::storage::Listener { bool on_paused_was_called_; bool on_progress_was_called_; bool resume_succeeded_; + int64_t last_bytes_transferred_; }; // Contents of a large file, "X" will be replaced with a different character From b47fcf5c88ef30badec466441551d0c2a732adbc Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Wed, 27 Apr 2022 22:17:47 -0400 Subject: [PATCH 73/93] firestore_snappy.patch.txt: remove the patching for https://github.com/firebase/firebase-ios-sdk/pull/9662 (Create individual Python virtualenv's in cmake builds) since it's incorporated into the CocoaPods-9.0.0.nightly tag --- cmake/external/firestore_snappy.patch.txt | 272 +--------------------- 1 file changed, 1 insertion(+), 271 deletions(-) diff --git a/cmake/external/firestore_snappy.patch.txt b/cmake/external/firestore_snappy.patch.txt index 3cab9246f1..317ecc6823 100644 --- a/cmake/external/firestore_snappy.patch.txt +++ b/cmake/external/firestore_snappy.patch.txt @@ -19,7 +19,7 @@ diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt index 2179633a8..c1de37b6d 100644 --- a/cmake/external/CMakeLists.txt +++ b/cmake/external/CMakeLists.txt -@@ -30,6 +30,7 @@ include(c-ares) +@@ -35,6 +35,7 @@ include(c-ares) include(googletest) include(GoogleUtilities) include(grpc) @@ -617,273 +617,3 @@ index 000000000..28bfb0837 + const uint8_t*& ip = *ip_p; + // This section is crucial for the throughput of the decompression loop. + // The latency of an iteration is fundamentally constrained by the -diff --git a/Firestore/Protos/CMakeLists.txt b/Firestore/Protos/CMakeLists.txt -index 85589b35f..96da74110 100644 ---- a/Firestore/Protos/CMakeLists.txt -+++ b/Firestore/Protos/CMakeLists.txt -@@ -12,7 +12,12 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --include(FindPythonInterp) -+include(python_setup) -+FirebaseSetupPythonInterpreter( -+ OUTVAR MY_PYTHON_EXECUTABLE -+ KEY FirestoreProtos -+ REQUIREMENTS six -+) - - # Generate output in-place. So long as the build is idempotent this helps - # verify that the protoc-generated output isn't changing. -@@ -200,7 +205,7 @@ if(FIREBASE_IOS_PROTOC_GENERATE_SOURCES) - COMMENT "Generating nanopb sources" - OUTPUT ${NANOPB_GENERATED_SOURCES} - COMMAND -- ${PYTHON_EXECUTABLE} -+ ${MY_PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py - --nanopb - --protoc=$ -@@ -232,7 +237,7 @@ if(FIREBASE_IOS_PROTOC_GENERATE_SOURCES) - COMMENT "Generating C++ protobuf sources" - OUTPUT ${PROTOBUF_CPP_GENERATED_SOURCES} - COMMAND -- ${PYTHON_EXECUTABLE} -+ ${MY_PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/build_protos.py - --cpp - --protoc=$ -diff --git a/Firestore/core/CMakeLists.txt b/Firestore/core/CMakeLists.txt -index aeb96431b..a1f477cbe 100644 ---- a/Firestore/core/CMakeLists.txt -+++ b/Firestore/core/CMakeLists.txt -@@ -14,8 +14,12 @@ - - include(CheckSymbolExists) - include(CheckIncludeFiles) --include(FindPythonInterp) - -+include(python_setup) -+FirebaseSetupPythonInterpreter( -+ OUTVAR MY_PYTHON_EXECUTABLE -+ KEY FirestoreCore -+) - - ## firestore_util - -@@ -286,7 +290,7 @@ add_custom_command( - OUTPUT - ${GRPC_ROOT_CERTIFICATE_SOURCES} - COMMAND -- ${PYTHON_EXECUTABLE} ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py -+ ${MY_PYTHON_EXECUTABLE} ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py - --output_header=${OUTPUT_DIR}/grpc_root_certificates_generated.h - --output_source=${OUTPUT_DIR}/grpc_root_certificates_generated.cc - --cpp_namespace=firebase::firestore::remote -diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt -index 2179633a8..794936fe4 100644 ---- a/cmake/external/CMakeLists.txt -+++ b/cmake/external/CMakeLists.txt -@@ -15,7 +15,12 @@ - cmake_minimum_required(VERSION 3.5.1) - project(Firebase-download C CXX) - --list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -+list( -+ APPEND -+ CMAKE_MODULE_PATH -+ ${CMAKE_CURRENT_LIST_DIR} -+ ${CMAKE_CURRENT_LIST_DIR}/.. -+) - - set( - FIREBASE_DOWNLOAD_DIR -diff --git a/cmake/python_setup.cmake b/cmake/python_setup.cmake -new file mode 100644 -index 000000000..bdb7b9f6a ---- /dev/null -+++ b/cmake/python_setup.cmake -@@ -0,0 +1,183 @@ -+# Copyright 2022 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. -+ -+# Sets up an isolated Python interpreter, installing required dependencies. -+# -+# This function does the following: -+# 1. Finds a Python interpreter using the best-available built-in cmake -+# mechanism do do so. This is referred to as the "host" interpreter. -+# 2. Creates a Python virtualenv in the cmake binary directory using the -+# host Python interpreter found in the previous step. -+# 3. Locates the Python interpreter in the virtualenv and sets its path in -+# the specified OUTVAR variable. -+# 4. Runs `pip install` to install the specified required dependencies, if any, -+# in the virtualenv. -+# -+# This function also writes "stamp files" into the virtualenv. These files -+# are used to determine if the virtualenv is up-to-date from a previous cmake -+# run or if it needs to be recreated from scratch. It will simply be re-used if -+# possible. -+# -+# If any errors occur (e.g. cannot install one of the given requirements) then a -+# fatal error is logged, causing the cmake processing to terminate. -+# -+# See https://docs.python.org/3/library/venv.html for details about virtualenv. -+# -+# Arguments: -+# OUTVAR - The name of the variable into which to store the path of the -+# Python executable from the virtualenv. -+# KEY - A unique key to ensure isolation from other Python virtualenv -+# environments created by this function. This value will be incorporated -+# into the path of the virtualenv and incorporated into the name of the -+# cmake cache variable that stores its path. -+# REQUIREMENTS - (Optional) A list of Python packages to install in the -+# virtualenv. These will be given as arguments to `pip install`. -+# -+# Example: -+# include(python_setup) -+# FirebaseSetupPythonInterpreter( -+# OUTVAR MY_PYTHON_EXECUTABLE -+# KEY ScanStuff -+# REQUIREMENTS six absl-py -+# ) -+# execute_process(COMMAND "${MY_PYTHON_EXECUTABLE}" scan_stuff.py) -+function(FirebaseSetupPythonInterpreter) -+ cmake_parse_arguments( -+ PARSE_ARGV 0 -+ ARG -+ "" # zero-value arguments -+ "OUTVAR;KEY" # single-value arguments -+ "REQUIREMENTS" # multi-value arguments -+ ) -+ -+ # Validate this function's arguments. -+ if("${ARG_OUTVAR}" STREQUAL "") -+ message(FATAL_ERROR "OUTVAR must be specified to ${CMAKE_CURRENT_FUNCTION}") -+ elseif("${ARG_KEY}" STREQUAL "") -+ message(FATAL_ERROR "KEY must be specified to ${CMAKE_CURRENT_FUNCTION}") -+ endif() -+ -+ # Calculate the name of the cmake *cache* variable into which to store the -+ # path of the Python interpreter from the virtualenv. -+ set(CACHEVAR "FIREBASE_PYTHON_EXECUTABLE_${ARG_KEY}") -+ -+ set(LOG_PREFIX "${CMAKE_CURRENT_FUNCTION}(${ARG_KEY})") -+ -+ # Find a "host" Python interpreter using the best available mechanism. -+ if(${CMAKE_VERSION} VERSION_LESS "3.12") -+ include(FindPythonInterp) -+ set(DEFAULT_PYTHON_HOST_EXECUTABLE "${PYTHON_EXECUTABLE}") -+ else() -+ find_package(Python3 COMPONENTS Interpreter REQUIRED) -+ set(DEFAULT_PYTHON_HOST_EXECUTABLE "${Python3_EXECUTABLE}") -+ endif() -+ -+ # Get the host Python interpreter on the host system to use. -+ set( -+ FIREBASE_PYTHON_HOST_EXECUTABLE -+ "${DEFAULT_PYTHON_HOST_EXECUTABLE}" -+ CACHE FILEPATH -+ "The Python interpreter on the host system to use" -+ ) -+ -+ # Check if the virtualenv is already up-to-date by examining the contents of -+ # its stamp files. The stamp files store the path of the host Python -+ # interpreter and the dependencies that were installed by pip. If both of -+ # these files exist and contain the same Python interpreter and dependencies -+ # then just re-use the virtualenv; otherwise, re-create it. -+ set(PYVENV_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pyvenv/${ARG_KEY}") -+ set(STAMP_FILE1 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp1.txt") -+ set(STAMP_FILE2 "${PYVENV_DIRECTORY}/cmake_firebase_python_stamp2.txt") -+ -+ if(EXISTS "${STAMP_FILE1}" AND EXISTS "${STAMP_FILE2}") -+ file(READ "${STAMP_FILE1}" STAMP_FILE1_CONTENTS) -+ file(READ "${STAMP_FILE2}" STAMP_FILE2_CONTENTS) -+ if( -+ ("${STAMP_FILE1_CONTENTS}" STREQUAL "${FIREBASE_PYTHON_HOST_EXECUTABLE}") -+ AND -+ ("${STAMP_FILE2_CONTENTS}" STREQUAL "${ARG_REQUIREMENTS}") -+ ) -+ set("${ARG_OUTVAR}" "$CACHE{${CACHEVAR}}" PARENT_SCOPE) -+ message(STATUS "${LOG_PREFIX}: Using Python interpreter: $CACHE{${CACHEVAR}}") -+ return() -+ endif() -+ endif() -+ -+ # Create the virtualenv. -+ message(STATUS -+ "${LOG_PREFIX}: Creating Python virtualenv in ${PYVENV_DIRECTORY} " -+ "using ${FIREBASE_PYTHON_HOST_EXECUTABLE}" -+ ) -+ file(REMOVE_RECURSE "${PYVENV_DIRECTORY}") -+ execute_process( -+ COMMAND -+ "${FIREBASE_PYTHON_HOST_EXECUTABLE}" -+ -m -+ venv -+ "${PYVENV_DIRECTORY}" -+ RESULT_VARIABLE -+ FIREBASE_PYVENV_CREATE_RESULT -+ ) -+ if(NOT FIREBASE_PYVENV_CREATE_RESULT EQUAL 0) -+ message(FATAL_ERROR -+ "Failed to create a Python virtualenv in ${PYVENV_DIRECTORY} " -+ "using ${FIREBASE_PYTHON_HOST_EXECUTABLE}") -+ endif() -+ -+ # Find the Python interpreter in the virtualenv. -+ find_program( -+ "${CACHEVAR}" -+ DOC "The Python interpreter to use for ${ARG_KEY}" -+ NAMES python3 python -+ PATHS "${PYVENV_DIRECTORY}" -+ PATH_SUFFIXES bin Scripts -+ NO_DEFAULT_PATH -+ ) -+ if(NOT ${CACHEVAR}) -+ message(FATAL_ERROR "Unable to find Python executable in ${PYVENV_DIRECTORY}") -+ else() -+ set(PYTHON_EXECUTABLE "$CACHE{${CACHEVAR}}") -+ message(STATUS "${LOG_PREFIX}: Found Python executable in virtualenv: ${PYTHON_EXECUTABLE}") -+ endif() -+ -+ # Install the dependencies in the virtualenv, if any are requested. -+ if(NOT ("${ARG_REQUIREMENTS}" STREQUAL "")) -+ message(STATUS -+ "${LOG_PREFIX}: Installing Python dependencies into " -+ "${PYVENV_DIRECTORY}: ${ARG_REQUIREMENTS}" -+ ) -+ execute_process( -+ COMMAND -+ "${PYTHON_EXECUTABLE}" -+ -m -+ pip -+ install -+ ${ARG_REQUIREMENTS} -+ RESULT_VARIABLE -+ PIP_INSTALL_RESULT -+ ) -+ if(NOT PIP_INSTALL_RESULT EQUAL 0) -+ message(FATAL_ERROR -+ "Failed to install Python dependencies into " -+ "${PYVENV_DIRECTORY}: ${ARG_REQUIREMENTS}" -+ ) -+ endif() -+ endif() -+ -+ # Write the stamp files. -+ file(WRITE "${STAMP_FILE1}" "${FIREBASE_PYTHON_HOST_EXECUTABLE}") -+ file(WRITE "${STAMP_FILE2}" "${ARG_REQUIREMENTS}") -+ -+ set("${ARG_OUTVAR}" "${PYTHON_EXECUTABLE}" PARENT_SCOPE) -+endfunction(FirebaseSetupPythonInterpreter) From 94eb1a6025bdc54f5dc9967b22e57958e90cf7cd Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Thu, 28 Apr 2022 00:36:31 +0000 Subject: [PATCH 74/93] CHERRY PICK from main branch: leveldb_snappy_test.cc: run the test on iOS as well, and other improvements (#896) This change improves the leveldb_snappy_test.cc to provide stronger guarantees of expected behavior. --- .../integration_test_internal/CMakeLists.txt | 8 + .../src/leveldb_snappy_test.cc | 144 ++++++++++++------ 2 files changed, 107 insertions(+), 45 deletions(-) diff --git a/firestore/integration_test_internal/CMakeLists.txt b/firestore/integration_test_internal/CMakeLists.txt index d9d7d20849..4e03212053 100644 --- a/firestore/integration_test_internal/CMakeLists.txt +++ b/firestore/integration_test_internal/CMakeLists.txt @@ -333,6 +333,14 @@ else() ${FIREBASE_INTEGRATION_TEST_SRCS} ) + # Set a preprocessor define so that tests can distinguish between tests for + # the desktop platforms (e.g. Windows, macOS, or Linux) and mobile platforms + # (e.g. Android, iOS). + target_compile_definitions(${integration_test_target_name} + PRIVATE + FIREBASE_TESTS_TARGET_DESKTOP + ) + if(APPLE) set(ADDITIONAL_LIBS gssapi_krb5 diff --git a/firestore/integration_test_internal/src/leveldb_snappy_test.cc b/firestore/integration_test_internal/src/leveldb_snappy_test.cc index 33f2247cd8..f17f04ba14 100644 --- a/firestore/integration_test_internal/src/leveldb_snappy_test.cc +++ b/firestore/integration_test_internal/src/leveldb_snappy_test.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include "Firestore/core/src/util/filesystem.h" #include "Firestore/core/src/util/path.h" -#include "firebase_test_framework.h" #include "gtest/gtest.h" #include "leveldb/db.h" @@ -49,36 +49,109 @@ using ::firebase::firestore::util::Path; // with reason "corruption". Path CreateLevelDbDatabaseThatUsesSnappyCompression(); -// This test ensures that we don't accidentally regress having added in Snappy -// compression support (https://github.com/firebase/firebase-ios-sdk/pull/9596). -TEST(LevelDbSnappy, LevelDbHasSnappySupportCompiledIn) { - // Do not run this test on iOS because LevelDb in iOS does not support Snappy. - SKIP_TEST_ON_IOS; +// Creates and opens a LevelDb database that contains at least one block that +// is compressed with Snappy compression, then iterates over it, invoking the +// given callback with the status at each point in the iteration. Once the +// callback is invoked with a `status` where `status.ok()` is not true, then +// iteration will stop and the callback will not be invoked again. +void IterateOverLevelDbDatabaseThatUsesSnappyCompression( + std::function); - Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); - if (HasFatalFailure()) return; +#if FIREBASE_TESTS_TARGET_DESKTOP - leveldb::Options options; - options.create_if_missing = false; +// Ensure that LevelDb is compiled with Snappy compression support. +// See https://github.com/firebase/firebase-ios-sdk/pull/9596 for details. +TEST(LevelDbSnappy, LevelDbSupportsSnappy) { + IterateOverLevelDbDatabaseThatUsesSnappyCompression( + [](const leveldb::Status& status) { + ASSERT_TRUE(status.ok()) << ConvertStatus(status); + }); +} + +#else // FIREBASE_TESTS_TARGET_DESKTOP + +// Ensure that LevelDb is NOT compiled with Snappy compression support. +TEST(LevelDbSnappy, LevelDbDoesNotSupportSnappy) { + bool got_failed_status = false; + IterateOverLevelDbDatabaseThatUsesSnappyCompression( + [&](const leveldb::Status& status) { + if (!status.ok()) { + got_failed_status = true; + ASSERT_TRUE(status.IsCorruption()) << ConvertStatus(status); + } + }); + if (!HasFailure()) { + ASSERT_TRUE(got_failed_status) + << "Reading a Snappy-compressed LevelDb database was successful; " + "however, it should NOT have been successful " + "since Snappy support is expected to NOT be available."; + } +} + +#endif // FIREBASE_TESTS_TARGET_DESKTOP + +void IterateOverLevelDbDatabaseThatUsesSnappyCompression( + std::function callback) { std::unique_ptr db; { + Path leveldb_path = CreateLevelDbDatabaseThatUsesSnappyCompression(); + if (leveldb_path.empty()) { + return; + } + + leveldb::Options options; + options.create_if_missing = false; + leveldb::DB* db_ptr; leveldb::Status status = leveldb::DB::Open(options, leveldb_path.ToUtf8String(), &db_ptr); - ASSERT_TRUE(status.ok()); + + ASSERT_TRUE(status.ok()) + << "Opening LevelDb database " << leveldb_path.ToUtf8String() + << " failed: " << ConvertStatus(status); + db.reset(db_ptr); } - // One of the assertions below will fail when LevelDb attempts to read a block - // that is compressed with Snappy and Snappy compression support is not - // compiled in. std::unique_ptr it( db->NewIterator(leveldb::ReadOptions())); for (it->SeekToFirst(); it->Valid(); it->Next()) { - ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); + callback(it->status()); + if (!it->status().ok()) { + return; + } + } + + // Invoke the callback on the final status. + callback(it->status()); +} + +template +void WriteFile(const Path& dir, + const std::string& file_name, + const T& data_array) { + Filesystem* fs = Filesystem::Default(); + { + auto status = fs->RecursivelyCreateDir(dir); + if (!status.ok()) { + FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" + << status.error_message() << ")"; + } + } + + Path file = dir.AppendUtf8(file_name); + std::ofstream out_file(file.native_value(), std::ios::binary); + if (!out_file) { + FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); + } + + out_file.write(reinterpret_cast(data_array.data()), + data_array.size()); + out_file.close(); + if (!out_file) { + FAIL() << "Writing to file failed: " << file.ToUtf8String(); } - ASSERT_TRUE(it->status().ok()) << ConvertStatus(it->status()); } const std::array LevelDbSnappyFile_000005_ldb{ @@ -196,47 +269,27 @@ const std::array LevelDbSnappyFile_MANIFEST_000084{ 0x04, 0x0D, }; -template -void WriteFile(const Path& dir, - const std::string& file_name, - const T& data_array) { - Filesystem* fs = Filesystem::Default(); - { - auto status = fs->RecursivelyCreateDir(dir); - if (!status.ok()) { - FAIL() << "Creating directory failed: " << dir.ToUtf8String() << " (" - << status.error_message() << ")"; - } - } - - Path file = dir.AppendUtf8(file_name); - std::ofstream out_file(file.native_value(), std::ios::binary); - if (!out_file) { - FAIL() << "Unable to open file for writing: " << file.ToUtf8String(); - } - - out_file.write(reinterpret_cast(data_array.data()), - data_array.size()); - out_file.close(); - if (!out_file) { - FAIL() << "Writing to file failed: " << file.ToUtf8String(); - } -} - Path LevelDbDir() { Filesystem* fs = Filesystem::Default(); - Path dir = fs->TempDir().AppendUtf8("PersistenceTesting"); + Path dir = fs->TempDir().AppendUtf8("LevelDbSnappyTest"); // Delete the directory first to ensure isolation between runs. auto status = fs->RecursivelyRemove(dir); - EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in dir " + EXPECT_TRUE(status.ok()) << "Failed to clean up leveldb in directory " << dir.ToUtf8String() << ": " << status.ToString(); + if (!status.ok()) { + return {}; + } return dir; } Path CreateLevelDbDatabaseThatUsesSnappyCompression() { Path leveldb_dir = LevelDbDir(); + if (leveldb_dir.empty()) { + return {}; + } + WriteFile(leveldb_dir, "000005.ldb", LevelDbSnappyFile_000005_ldb); WriteFile(leveldb_dir, "000017.ldb", LevelDbSnappyFile_000017_ldb); WriteFile(leveldb_dir, "000085.ldb", LevelDbSnappyFile_000085_ldb); @@ -244,6 +297,7 @@ Path CreateLevelDbDatabaseThatUsesSnappyCompression() { WriteFile(leveldb_dir, "LOG.old", LevelDbSnappyFile_LOG_old); WriteFile(leveldb_dir, "LOG", LevelDbSnappyFile_LOG); WriteFile(leveldb_dir, "MANIFEST-000084", LevelDbSnappyFile_MANIFEST_000084); + return leveldb_dir; } From 412f8bde7ba2181bf70e34e7da7123e5e69d1216 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 11:10:47 -0700 Subject: [PATCH 75/93] Set block storage for task variable. --- storage/src/ios/controller_ios.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/src/ios/controller_ios.mm b/storage/src/ios/controller_ios.mm index 556ee912d8..b86c8980e1 100644 --- a/storage/src/ios/controller_ios.mm +++ b/storage/src/ios/controller_ios.mm @@ -42,7 +42,7 @@ bool ControllerInternal::Pause() { MutexLock mutex(pending_calls_mutex_); - FIRStorageObservableTask *task = task_impl(); + __block FIRStorageObservableTask *task = task_impl(); if (task) { if ([task respondsToSelector:@selector(pause)]) { util::DispatchAsyncSafeMainQueue(^() { @@ -60,7 +60,7 @@ bool ControllerInternal::Resume() { MutexLock mutex(pending_calls_mutex_); - FIRStorageObservableTask *task = task_impl(); + __block FIRStorageObservableTask *task = task_impl(); if (task) { if ([task respondsToSelector:@selector(resume)]) { util::DispatchAsyncSafeMainQueue(^() { @@ -78,7 +78,7 @@ bool ControllerInternal::Cancel() { MutexLock mutex(pending_calls_mutex_); - FIRStorageObservableTask *task = task_impl(); + __block FIRStorageObservableTask *task = task_impl(); if (task) { if ([task respondsToSelector:@selector(cancel)]) { util::DispatchAsyncSafeMainQueue(^() { From 4ae9370ece09c43e96e507de55ddb6bceb18b6f7 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 11:27:47 -0700 Subject: [PATCH 76/93] Fix server key. --- messaging/integration_test/src/integration_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/integration_test/src/integration_test.cc b/messaging/integration_test/src/integration_test.cc index e4d4bbeb03..65163a1ae7 100644 --- a/messaging/integration_test/src/integration_test.cc +++ b/messaging/integration_test/src/integration_test.cc @@ -44,7 +44,7 @@ namespace firebase_testapp_automated { // Your Firebase project's Server Key for Cloud Messaging goes here. // You can get this from Firebase Console, in your Project settings under Cloud // Messaging. -const char kFcmServerKey[] = "AAAAM2ROZHA:APA91bHVTMuAdnIw014jKETAUYiy7qLvIo1zMHGMOszbZyZJaf_cEEd6MF9ad8qwS_DbgjYo36FeELhtTf-dsJCsLt6hurDnbRPIGcxMPtNMNSYC1Krh-KSn9GURceEwEA-sr-i3HTDU"; +const char kFcmServerKey[] = "REPLACE_WITH_YOUR_SERVER_KEY"; const char kRestEndpoint[] = "https://fcm.googleapis.com/fcm/send"; From 731eab860810255e7e2ff37fb901240a1e55dac1 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 11:28:01 -0700 Subject: [PATCH 77/93] Format code. --- storage/integration_test/src/integration_test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/integration_test/src/integration_test.cc b/storage/integration_test/src/integration_test.cc index ae8dd96432..2978502b15 100644 --- a/storage/integration_test/src/integration_test.cc +++ b/storage/integration_test/src/integration_test.cc @@ -591,7 +591,8 @@ TEST_F(FirebaseStorageTest, TestPutFileAndGetFile) { LogDebug("Creating local file: %s", path.c_str()); FILE* file = fopen(path.c_str(), "wb"); - size_t bytes_written = std::fwrite(kSimpleTestFile.c_str(), 1, kSimpleTestFile.size(), file); + size_t bytes_written = + std::fwrite(kSimpleTestFile.c_str(), 1, kSimpleTestFile.size(), file); EXPECT_EQ(bytes_written, kSimpleTestFile.size()); fclose(file); @@ -1198,7 +1199,7 @@ class StorageListener : public firebase::storage::Listener { : on_paused_was_called_(false), on_progress_was_called_(false), resume_succeeded_(false), - last_bytes_transferred_(-1) {} + last_bytes_transferred_(-1) {} // Tracks whether OnPaused was ever called and resumes the transfer. void OnPaused(firebase::storage::Controller* controller) override { @@ -1224,7 +1225,7 @@ class StorageListener : public firebase::storage::Listener { // Only update when the byte count changed, to avoid spamming the log. if (last_bytes_transferred_ != bytes_transferred) { LogDebug("Transferred %lld of %lld", bytes_transferred, - controller->total_byte_count()); + controller->total_byte_count()); last_bytes_transferred_ = bytes_transferred; } on_progress_was_called_ = true; From b6a5957acda4c06bae3481a7ba7274afe0512974 Mon Sep 17 00:00:00 2001 From: Mou Date: Thu, 28 Apr 2022 12:37:27 -0700 Subject: [PATCH 78/93] test iOS simulator devices --- scripts/gha/print_matrix_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 4283268b04..8c9bd3df1f 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -170,9 +170,9 @@ "ios_min": {"type": "real", "model":"iphone8", "version":"11.4"}, "ios_target": {"type": "real", "model":"iphone8plus", "version":"12.0"}, "ios_latest": {"type": "real", "model":"iphone11pro", "version":"14.7"}, - "simulator_min": {"type": "virtual", "name":"iPhone 6", "version":"11.4"}, - "simulator_target": {"type": "virtual", "name":"iPhone 8", "version":"12.0"}, - "simulator_latest": {"type": "virtual", "name":"iPhone 11", "version":"14.4"}, + "simulator_min": {"type": "virtual", "name":"iPhone 6", "version":"12.4"}, + "simulator_target": {"type": "virtual", "name":"iPhone 8", "version":"14.0"}, + "simulator_latest": {"type": "virtual", "name":"iPhone 11", "version":"14.5"}, "tvos_simulator": {"type": "virtual", "name":"Apple TV", "version":"14.3"}, } From 0c1b8d1a23b8040a73a2d07e7df5cbd95908f324 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 13:31:33 -0700 Subject: [PATCH 79/93] Windows compatibility for strcasecmp --- messaging/integration_test/src/integration_test.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/messaging/integration_test/src/integration_test.cc b/messaging/integration_test/src/integration_test.cc index 65163a1ae7..d2f928d03c 100644 --- a/messaging/integration_test/src/integration_test.cc +++ b/messaging/integration_test/src/integration_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include -#include #include #include @@ -27,6 +26,14 @@ #include "firebase/util.h" #include "firebase_test_framework.h" // NOLINT +#ifdef _MSC_VER +// Windows uses _stricmp instead of strcasecmp. +#define strncasecmp _strnicmp +#define strcasecmp _stricmp +#else +#include +#endif // _MSC_VER + // The TO_STRING macro is useful for command line defined strings as the quotes // get stripped. #define TO_STRING_EXPAND(X) #X From c6d8c700c154e9bab3fd92decee9bb830e8cafde Mon Sep 17 00:00:00 2001 From: Mou Date: Thu, 28 Apr 2022 13:36:55 -0700 Subject: [PATCH 80/93] test iOS simulator devices --- scripts/gha/print_matrix_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 8c9bd3df1f..151d623006 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -170,9 +170,9 @@ "ios_min": {"type": "real", "model":"iphone8", "version":"11.4"}, "ios_target": {"type": "real", "model":"iphone8plus", "version":"12.0"}, "ios_latest": {"type": "real", "model":"iphone11pro", "version":"14.7"}, - "simulator_min": {"type": "virtual", "name":"iPhone 6", "version":"12.4"}, - "simulator_target": {"type": "virtual", "name":"iPhone 8", "version":"14.0"}, - "simulator_latest": {"type": "virtual", "name":"iPhone 11", "version":"14.5"}, + "simulator_min": {"type": "virtual", "name":"iPhone 8", "version":"13.7"}, + "simulator_target": {"type": "virtual", "name":"iPhone 11", "version":"14.5"}, + "simulator_latest": {"type": "virtual", "name":"iPhone 13", "version":"15.0"}, "tvos_simulator": {"type": "virtual", "name":"Apple TV", "version":"14.3"}, } From cfa878f52ceab4083943a45f83878e1d162c5e4c Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 14:38:54 -0700 Subject: [PATCH 81/93] Update Swift header to include copy method; revert Storage to use it. --- ios_pod/swift_headers/FirebaseStorage-Swift.h | 5 +++++ storage/src/ios/metadata_ios.mm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ios_pod/swift_headers/FirebaseStorage-Swift.h b/ios_pod/swift_headers/FirebaseStorage-Swift.h index b1e4a82c2d..6c0d39c091 100644 --- a/ios_pod/swift_headers/FirebaseStorage-Swift.h +++ b/ios_pod/swift_headers/FirebaseStorage-Swift.h @@ -402,6 +402,7 @@ SWIFT_CLASS_NAMED("StorageListResult") /// nil indicates that there are no more results. /// @return A page token if more results are available. @property(nonatomic, readonly, copy) NSString *_Nullable pageToken; +- (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end @@ -460,6 +461,10 @@ SWIFT_CLASS_NAMED("StorageMetadata") /// Creates an instance of StorageMetadata from the contents of a dictionary. /// @return An instance of StorageMetadata that represents the contents of a dictionary. - (nonnull instancetype)initWithDictionary:(NSDictionary *_Nonnull)dictionary; +- (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT; +- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; +@property(nonatomic, readonly) NSUInteger hash; +@property(nonatomic, readonly, copy) NSString *_Nonnull description; @end @class NSData; diff --git a/storage/src/ios/metadata_ios.mm b/storage/src/ios/metadata_ios.mm index 5551f87d11..5296728afe 100644 --- a/storage/src/ios/metadata_ios.mm +++ b/storage/src/ios/metadata_ios.mm @@ -26,7 +26,7 @@ // Create a copy of a FIRStorageMetadata. static FIRStorageMetadata* CopyObjCMetadataObject(const FIRStorageMetadata* src) { - return [[FIRStorageMetadata alloc] initWithDictionary:src.dictionaryRepresentation]; + return [src copy]; } // Convert a NSString to UTF8 string returning a reference to the buffer in From e04d6a6de4ba635437dd41bdf97e065eace07024 Mon Sep 17 00:00:00 2001 From: Mou Sun <69009538+sunmou99@users.noreply.github.com> Date: Thu, 28 Apr 2022 14:50:14 -0700 Subject: [PATCH 82/93] upload ios projects artifacts --- .github/workflows/integration_tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 32cbe45d42..0696bb9da8 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -610,6 +610,12 @@ jobs: if [ ! -f build-results-ios-macos-latest.log.json ]; then echo "__SUMMARY_MISSING__" > build-results-ios-macos-latest.log.json fi + - name: Upload iOS xcode projects artifacts (test only) + uses: actions/upload-artifact@v3 + if: ${{ !cancelled() }} + with: + name: ta + path: ta - name: Upload iOS integration tests artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} From 44c49b28995a3e04cd9d9a301d5e0d8d878637ce Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Thu, 28 Apr 2022 18:07:58 -0700 Subject: [PATCH 83/93] Temporarily disable a test that fails on device when built from cmdline. --- storage/integration_test/src/integration_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/integration_test/src/integration_test.cc b/storage/integration_test/src/integration_test.cc index 2978502b15..40b0fcd33c 100644 --- a/storage/integration_test/src/integration_test.cc +++ b/storage/integration_test/src/integration_test.cc @@ -607,7 +607,11 @@ TEST_F(FirebaseStorageTest, TestPutFileAndGetFile) { WaitForCompletion(future, "PutFile"); EXPECT_NE(future.result(), nullptr); const firebase::storage::Metadata* metadata = future.result(); +#if !TARGET_OS_IPHONE && !TARGET_OS_TV + // Disable this specific check on iOS/tvOS, due to a possible race condition + // in the Storage iOS library. TODO(b/230800306): Revisit this later. EXPECT_EQ(metadata->size_bytes(), kSimpleTestFile.size()); +#endif // !TARGET_OS_IPHONE && !TARGET_OS_TV EXPECT_EQ(metadata->content_type(), content_type); } // Use GetBytes to ensure the file uploaded correctly. From 28672b78a15fee5dc3ae512b170a4c6b02693899 Mon Sep 17 00:00:00 2001 From: a-maurice Date: Fri, 29 Apr 2022 13:37:14 -0700 Subject: [PATCH 84/93] Update the testing Xcode version to 13.3.1 --- .github/workflows/android.yml | 2 +- .github/workflows/cpp-packaging.yml | 4 ++-- release_build_files/readme.md | 4 ++-- scripts/gha/print_matrix_configuration.py | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a19bf72009..516a0b73bd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,7 +13,7 @@ on: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir GITHUB_TOKEN: ${{ github.token }} - xcodeVersion: "13.2.1" # Only affects Mac runners, and only for prerequisites. + xcodeVersion: "13.3.1" # Only affects Mac runners, and only for prerequisites. concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 1eedc74afc..bb02e42b06 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -32,9 +32,9 @@ env: demumbleVer: "1.1.0" # Use SHA256 for hashing files. hashCommand: "sha256sum" - # Xcode version 13.2.1 is the version we build the SDK with. + # Xcode version 13.3.1 is the version we build the SDK with. # Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app - xcodeVersion: "13.2.1" + xcodeVersion: "13.3.1" # LLVM version with ARM MachO support has no version number yet. llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534" GITHUB_TOKEN: ${{ github.token }} diff --git a/release_build_files/readme.md b/release_build_files/readme.md index b1002d2b24..5aed598cb7 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -379,7 +379,7 @@ Firebase Installations (stub) | firebase_installations.framework Firebase Cloud Messaging (stub) | firebase_messaging.framework | | firebase.framework -The provided libraries have been tested using Xcode 13.2.1. When building C++ +The provided libraries have been tested using Xcode 13.3.1. When building C++ desktop apps on OS X, you will need to link the `gssapi_krb5` and `pthread` system libraries, as well as the `CoreFoundation`, `Foundation`, `GSS`, and `Security` OS X system frameworks (consult your compiler documentation for more @@ -577,7 +577,7 @@ code. ## Release Notes ### Upcoming release - Changes - - General (iOS): iOS SDKs are now built using Xcode 13.2.1. + - General (iOS): iOS SDKs are now built using Xcode 13.3.1. - AdMob (iOS): Temporarily pinned AdMob dependency to a special version of the Google-Mobile-Ads-SDK Cocoapod, "7.69.0-cppsdk2", to maintain compatibility with version 9.x of the Firebase iOS SDK. diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 151d623006..fa7f7e73bf 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -76,12 +76,12 @@ "build_type": ["Release", "Debug"], "architecture": ["x64", "x86", "arm64"], "msvc_runtime": ["static","dynamic"], - "xcode_version": ["13.2.1"], + "xcode_version": ["13.3.1"], "python_version": ["3.7"], EXPANDED_KEY: { "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "xcode_version": ["13.2.1"], + "xcode_version": ["13.3.1"], } } }, @@ -112,7 +112,7 @@ "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], - "xcode_version": ["13.2.1"], # only the first one is used + "xcode_version": ["13.3.1"], # only the first one is used "ndk_version": ["r22b"], "platform_version": ["28"], "build_tools_version": ["28.0.3"], @@ -138,10 +138,10 @@ "ios": { "matrix": { - "xcode_version": ["13.2.1"], + "xcode_version": ["13.3.1"], EXPANDED_KEY: { - "xcode_version": ["13.2.1"] + "xcode_version": ["13.3.1"] } } }, From 4edb2f6924dda1cc5f116074121a80f61ac58cf5 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Mon, 2 May 2022 10:39:40 -0700 Subject: [PATCH 85/93] Change xcode version to 13.3.1 and macos runners to macos-12. --- .github/workflows/android.yml | 2 +- .github/workflows/cpp-packaging.yml | 24 ++++----- .github/workflows/desktop.yml | 4 +- .github/workflows/integration_tests.yml | 66 +++++++++++------------ .github/workflows/ios.yml | 2 +- .github/workflows/update-dependencies.yml | 2 +- scripts/gha/print_matrix_configuration.py | 20 +++---- 7 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b15871c789..516a0b73bd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,7 +13,7 @@ on: env: CCACHE_DIR: ${{ github.workspace }}/ccache_dir GITHUB_TOKEN: ${{ github.token }} - xcodeVersion: "12.4" # Only affects Mac runners, and only for prerequisites. + xcodeVersion: "13.3.1" # Only affects Mac runners, and only for prerequisites. concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/cpp-packaging.yml b/.github/workflows/cpp-packaging.yml index 48604ecbee..d29140ca80 100644 --- a/.github/workflows/cpp-packaging.yml +++ b/.github/workflows/cpp-packaging.yml @@ -32,9 +32,9 @@ env: demumbleVer: "1.1.0" # Use SHA256 for hashing files. hashCommand: "sha256sum" - # Xcode version 12.4 is the version we build the SDK with. + # Xcode version 13.3.1 is the version we build the SDK with. # Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app - xcodeVersion: "12.4" + xcodeVersion: "13.3.1" # LLVM version with ARM MachO support has no version number yet. llvmVer: "5f187f0afaad33013ba03454c4749d99b1362534" GITHUB_TOKEN: ${{ github.token }} @@ -79,13 +79,13 @@ jobs: if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-12] include: - os: ubuntu-latest tools_platform: linux # Binutils 2.35.1 released Sep 19, 2020 binutils_version: "2.35.1" - - os: macos-latest + - os: macos-12 tools_platform: darwin # Binutils 2.35.1 released Sep 19, 2020 binutils_version: "2.35.1" @@ -180,7 +180,7 @@ jobs: build_and_package_ios_tvos: name: build-and-package-ios-tvos - runs-on: macos-latest + runs-on: macos-12 if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} steps: - name: Store git credentials for all git commands @@ -302,7 +302,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-12] build_type: ["Release", "Debug"] architecture: ["x64", "x86", "arm64"] msvc_runtime: ["static", "dynamic"] @@ -322,7 +322,7 @@ jobs: vcpkg_triplet_suffix: "linux" additional_build_flags: "" sdk_platform: "linux" - - os: macos-latest + - os: macos-12 vcpkg_triplet_suffix: "osx" additional_build_flags: "--target_format libraries" sdk_platform: "darwin" @@ -330,13 +330,13 @@ jobs: exclude: - os: windows-latest linux_abi: "c++11" - - os: macos-latest + - os: macos-12 architecture: "x86" - - os: macos-latest + - os: macos-12 msvc_runtime: "dynamic" - - os: macos-latest + - os: macos-12 linux_abi: "c++11" - - os: macos-latest + - os: macos-12 build_type: "Debug" - os: ubuntu-latest msvc_runtime: "dynamic" @@ -497,7 +497,7 @@ jobs: suffix: '-x64-Debug-dynamic' runs_on_platform: ubuntu-latest - sdk_platform: darwin - runs_on_platform: macos-latest + runs_on_platform: macos-12 exclude: - sdk_platform: windows suffix: '' diff --git a/.github/workflows/desktop.yml b/.github/workflows/desktop.yml index 174bb469f1..9891e3196e 100644 --- a/.github/workflows/desktop.yml +++ b/.github/workflows/desktop.yml @@ -71,10 +71,10 @@ jobs: # msvc_runtime excludes - os: ubuntu-latest msvc_runtime: "dynamic" - - os: macos-latest + - os: macos-12 msvc_runtime: "dynamic" # architecture excluees - - os: macos-latest + - os: macos-12 architecture: "x86" # Xcode excludes -- allow only one on osx and linux - os: ubuntu-latest diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 32cbe45d42..57ed378522 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -20,7 +20,7 @@ on: required: true operating_systems: description: 'CSV of VMs to run on' - default: 'ubuntu-latest,windows-latest,macos-latest' + default: 'ubuntu-latest,windows-latest,macos-12' required: true desktop_ssl_variants: description: 'CSV of desktop SSL variants to use' @@ -534,7 +534,7 @@ jobs: build_ios: name: build-ios-macos-latest needs: [check_and_prepare] - runs-on: macos-latest + runs-on: macos-12 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure() strategy: fail-fast: false @@ -599,7 +599,7 @@ jobs: --t ${{ needs.check_and_prepare.outputs.apis }} \ --output_directory "${{ github.workspace }}" \ --ios_sdk ${{ needs.check_and_prepare.outputs.mobile_test_on }} \ - --artifact_name "ios-macos-latest" \ + --artifact_name "ios-macos-12" \ --noadd_timestamp \ --short_output_paths \ ${additional_flags[*]} @@ -607,22 +607,22 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - if [ ! -f build-results-ios-macos-latest.log.json ]; then - echo "__SUMMARY_MISSING__" > build-results-ios-macos-latest.log.json + if [ ! -f build-results-ios-macos-12.log.json ]; then + echo "__SUMMARY_MISSING__" > build-results-ios-macos-12.log.json fi - name: Upload iOS integration tests artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} with: - name: testapps-ios-macos-latest - path: testapps-ios-macos-latest + name: testapps-ios-macos-12 + path: testapps-ios-macos-12 retention-days: ${{ env.artifactRetentionDays }} - name: Upload iOS build results artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} with: name: log-artifact - path: build-results-ios-macos-latest* + path: build-results-ios-macos-12* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} @@ -643,7 +643,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-ios-macos-latest.log + cat build-results-ios-macos-12.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi @@ -651,7 +651,7 @@ jobs: build_tvos: name: build-tvos-macos-latest needs: [check_and_prepare] - runs-on: macos-latest + runs-on: macos-12 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() && !failure() strategy: fail-fast: false @@ -715,7 +715,7 @@ jobs: python scripts/gha/build_testapps.py --p tvOS \ --t ${{ needs.check_and_prepare.outputs.apis }} \ --output_directory "${{ github.workspace }}" \ - --artifact_name "tvos-macos-latest" \ + --artifact_name "tvos-macos-12" \ --noadd_timestamp \ --short_output_paths \ ${additional_flags[*]} @@ -723,22 +723,22 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - if [ ! -f build-results-tvos-macos-latest.log.json ]; then - echo "__SUMMARY_MISSING__" > build-results-tvos-macos-latest.log.json + if [ ! -f build-results-tvos-macos-12.log.json ]; then + echo "__SUMMARY_MISSING__" > build-results-tvos-macos-12.log.json fi - name: Upload tvOS integration tests artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} with: - name: testapps-tvos-macos-latest - path: testapps-tvos-macos-latest + name: testapps-tvos-macos-12 + path: testapps-tvos-macos-12 retention-days: ${{ env.artifactRetentionDays }} - name: Upload tvOS build results artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} with: name: log-artifact - path: build-results-tvos-macos-latest* + path: build-results-tvos-macos-12* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} @@ -759,7 +759,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat build-results-tvos-macos-latest.log + cat build-results-tvos-macos-12.log if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi @@ -858,7 +858,7 @@ jobs: test_android: name: test-android-${{ matrix.build_os }}-${{ matrix.android_device }} needs: [check_and_prepare, build_android] - runs-on: macos-latest + runs-on: macos-12 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled() strategy: fail-fast: false @@ -963,7 +963,7 @@ jobs: test_ios: name: test-ios-macos-latest-${{ matrix.ios_device }} needs: [check_and_prepare, build_ios] - runs-on: macos-latest + runs-on: macos-12 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() strategy: fail-fast: false @@ -980,7 +980,7 @@ jobs: uses: actions/download-artifact@v3 with: path: testapps - name: testapps-ios-macos-latest + name: testapps-ios-macos-12 - name: Setup python uses: actions/setup-python@v2 with: @@ -1009,7 +1009,7 @@ jobs: run: | python scripts/gha/test_simulator.py --testapp_dir testapps \ --ios_device "${{ matrix.ios_device }}" \ - --logfile_name "ios-macos-latest-${{ matrix.ios_device }}" \ + --logfile_name "ios-macos-12-${{ matrix.ios_device }}" \ --ci - name: Install Cloud SDK if: steps.get-device-type.outputs.device_type == 'real' @@ -1022,7 +1022,7 @@ jobs: python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}" python scripts/gha/test_lab.py --testapp_dir testapps \ --ios_device "${{ matrix.ios_device }}" \ - --logfile_name "ios-macos-latest-${{ matrix.ios_device }}" \ + --logfile_name "ios-macos-12-${{ matrix.ios_device }}" \ --code_platform cpp \ --key_file scripts/gha-encrypted/gcs_key_file.json - name: Prepare results summary artifact @@ -1030,15 +1030,15 @@ jobs: shell: bash run: | # If testapps do not exist, then it's a build error not test error. - if [ -d "testapps/testapps-ios-macos-latest" && ! -f "testapps/test-results-ios-macos-latest-${{ matrix.ios_device }}.log.json" ]; then - mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-macos-latest-${{ matrix.ios_device }}.log.json" + if [ -d "testapps/testapps-ios-macos-12" && ! -f "testapps/test-results-ios-macos-12-${{ matrix.ios_device }}.log.json" ]; then + mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-macos-12-${{ matrix.ios_device }}.log.json" fi - name: Upload iOS test results artifact if: ${{ !cancelled() }} uses: actions/upload-artifact@v3 with: name: log-artifact - path: testapps/test-results-ios-macos-latest-${{ matrix.ios_device }}* + path: testapps/test-results-ios-macos-12-${{ matrix.ios_device }}* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} @@ -1059,7 +1059,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat "testapps/test-results-ios-macos-latest-${{ matrix.ios_device }}.log" + cat "testapps/test-results-ios-macos-12-${{ matrix.ios_device }}.log" if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi @@ -1067,7 +1067,7 @@ jobs: test_tvos: name: test-tvos-macos-latest-${{ matrix.tvos_device }} needs: [check_and_prepare, build_tvos] - runs-on: macos-latest + runs-on: macos-12 if: contains(needs.check_and_prepare.outputs.matrix_platform, 'tvOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled() strategy: fail-fast: false @@ -1084,7 +1084,7 @@ jobs: uses: actions/download-artifact@v3 with: path: testapps - name: testapps-tvos-macos-latest + name: testapps-tvos-macos-12 - name: Setup python uses: actions/setup-python@v2 with: @@ -1105,22 +1105,22 @@ jobs: run: | python scripts/gha/test_simulator.py --testapp_dir testapps \ --tvos_device "${{ matrix.tvos_device }}" \ - --logfile_name "tvos-macos-latest-${{ matrix.tvos_device }}" \ + --logfile_name "tvos-macos-12-${{ matrix.tvos_device }}" \ --ci - name: Prepare results summary artifact if: ${{ !cancelled() }} shell: bash run: | # If testapps do not exist, then it's a build error not test error. - if [ -d "testapps/testapps-tvos-macos-latest" && ! -f "testapps/test-results-tvos-macos-latest-${{ matrix.tvos_device }}.log.json" ]; then - mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-tvos-macos-latest-${{ matrix.tvos_device }}.log.json" + if [ -d "testapps/testapps-tvos-macos-12" && ! -f "testapps/test-results-tvos-macos-12-${{ matrix.tvos_device }}.log.json" ]; then + mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-tvos-macos-12-${{ matrix.tvos_device }}.log.json" fi - name: Upload tvOS test results artifact if: ${{ !cancelled() }} uses: actions/upload-artifact@v3 with: name: log-artifact - path: testapps/test-results-tvos-macos-latest-${{ matrix.tvos_device }}* + path: testapps/test-results-tvos-macos-12-${{ matrix.tvos_device }}* retention-days: ${{ env.artifactRetentionDays }} - name: Download log artifacts if: ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }} @@ -1141,7 +1141,7 @@ jobs: if: ${{ !cancelled() }} shell: bash run: | - cat "testapps/test-results-tvos-macos-latest-${{ matrix.tvos_device }}.log" + cat "testapps/test-results-tvos-macos-12-${{ matrix.tvos_device }}.log" if [[ "${{ job.status }}" != "success" ]]; then exit 1 fi diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 993186db71..6d6d90026a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -36,7 +36,7 @@ jobs: build: name: ios-macos-latest - runs-on: macos-latest + runs-on: macos-12 needs: prepare_matrix strategy: fail-fast: false diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 6200df50d6..f9fd60979a 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -25,7 +25,7 @@ env: jobs: update_dependencies: name: update-deps - runs-on: macos-latest + runs-on: macos-12 steps: - name: Get token for firebase-workflow-trigger uses: tibdex/github-app-token@v1 diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index ce3d4cec2d..1c76887fc1 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -72,35 +72,35 @@ PARAMETERS = { "desktop": { "matrix": { - "os": ["ubuntu-latest", "macos-latest"], + "os": ["ubuntu-latest", "macos-12"], "build_type": ["Release", "Debug"], "architecture": ["x64", "x86", "arm64"], "msvc_runtime": ["static","dynamic"], - "xcode_version": ["12.4"], + "xcode_version": ["13.3.1"], "python_version": ["3.7"], EXPANDED_KEY: { - "os": ["ubuntu-latest", "macos-latest", "windows-latest"], - "xcode_version": ["11.7", "12.4", "12.5.1"], + "os": ["ubuntu-latest", "macos-12", "windows-latest"], + "xcode_version": ["13.3.1"], } } }, "android": { "matrix": { - "os": ["ubuntu-latest", "macos-latest", "windows-latest"], + "os": ["ubuntu-latest", "macos-12", "windows-latest"], "architecture": ["x64"], "python_version": ["3.7"], EXPANDED_KEY: { - "os": ["ubuntu-latest", "macos-latest", "windows-latest"] + "os": ["ubuntu-latest", "macos-12", "windows-latest"] } } }, "integration_tests": { "matrix": { - "os": ["ubuntu-latest", "macos-latest", "windows-latest"], + "os": ["ubuntu-latest", "macos-12", "windows-latest"], "platform": ["Desktop", "Android", "iOS", "tvOS"], "ssl_lib": ["openssl"], "android_device": ["android_target", "emulator_target"], @@ -112,7 +112,7 @@ "msvc_runtime": ["dynamic"], "cpp_compiler_windows": ["VisualStudio2019"], "cpp_compiler_linux": ["clang-11.0"], - "xcode_version": ["12.4"], # only the first one is used + "xcode_version": ["13.3.1"], # only the first one is used "ndk_version": ["r22b"], "platform_version": ["28"], "build_tools_version": ["28.0.3"], @@ -138,10 +138,10 @@ "ios": { "matrix": { - "xcode_version": ["12.4"], + "xcode_version": ["13.3.1"], EXPANDED_KEY: { - "xcode_version": ["12.4", "12.5.1"] + "xcode_version": ["13.3.1"] } } }, From a6fa7f5de86c721153d4a40f6003b5abaab47c33 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 3 May 2022 10:58:04 -0700 Subject: [PATCH 86/93] Restore simulator versions back to previous values --- scripts/gha/print_matrix_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 2441ef16a9..e664a33c9a 100644 --- a/scripts/gha/print_matrix_configuration.py +++ b/scripts/gha/print_matrix_configuration.py @@ -170,9 +170,9 @@ "ios_min": {"type": "real", "model":"iphone8", "version":"11.4"}, "ios_target": {"type": "real", "model":"iphone8plus", "version":"12.0"}, "ios_latest": {"type": "real", "model":"iphone11pro", "version":"14.7"}, - "simulator_min": {"type": "virtual", "name":"iPhone 6", "version":"12.4"}, - "simulator_target": {"type": "virtual", "name":"iPhone 8", "version":"14.5"}, - "simulator_latest": {"type": "virtual", "name":"iPhone 11", "version":"15.4"}, + "simulator_min": {"type": "virtual", "name":"iPhone 8", "version":"13.7"}, + "simulator_target": {"type": "virtual", "name":"iPhone 11", "version":"14.5"}, + "simulator_latest": {"type": "virtual", "name":"iPhone 13", "version":"15.0"}, "tvos_simulator": {"type": "virtual", "name":"Apple TV", "version":"14.3"}, } From 043bc1f93b902a7e7972dfb36c2a6467ff703680 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 3 May 2022 13:38:35 -0700 Subject: [PATCH 87/93] Reworded some release notes. (Also replaced a couple tabs with spaces.) --- release_build_files/readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 85f1a2fd2b..ff24efd893 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -574,12 +574,12 @@ code. ## Release Notes ### 9.0.0 - Changes - - General (iOS): iOS SDKs are now built using Xcode 13.3.1. - - General (Android): On Android, Firebase C++ is now built against NDK + - General (iOS): Firebase C++ on iOS is now built using Xcode 13.3.1. + - General (Android): Firebase C++ on Android is now built against NDK version r21e. - - General (Android): Firebase support for gnustl (also known as libstdc++) - has been removed. Please use libc++ instead. Android libraries have been - moved from libs/android/ARCH/STL to libs/android/ARCH. + - General (Android): Support for gnustl (also known as libstdc++) has been + removed. Please use libc++ instead. Android libraries have been moved + from libs/android/ARCH/STL to libs/android/ARCH. - AdMob (iOS): Temporarily pinned AdMob dependency to a special version of the Google-Mobile-Ads-SDK Cocoapod, "7.69.0-cppsdk2", to maintain compatibility with version 9.x of the Firebase iOS SDK. @@ -608,8 +608,8 @@ code. - Changes - General (iOS): Fixed an intermittent crash on iOS 15 caused by constructing C++ objects during Objective-C's `+load` method. - ([#706](https://github.com/firebase/firebase-cpp-sdk/pull/706)) - ([#783](https://github.com/firebase/firebase-cpp-sdk/pull/783)) + ([#706](https://github.com/firebase/firebase-cpp-sdk/pull/706)) + ([#783](https://github.com/firebase/firebase-cpp-sdk/pull/783)) - General: Internal changes to Mutex class. ### 8.8.0 From eb4b0d7b6e9043dde7de033c27407246006c6028 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Tue, 3 May 2022 13:44:41 -0700 Subject: [PATCH 88/93] Revert "upload ios projects artifacts" This reverts commit e04d6a6de4ba635437dd41bdf97e065eace07024. --- .github/workflows/integration_tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a4db4af5a5..4da02a9718 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -610,12 +610,6 @@ jobs: if [ ! -f build-results-ios-macos-12.log.json ]; then echo "__SUMMARY_MISSING__" > build-results-ios-macos-12.log.json fi - - name: Upload iOS xcode projects artifacts (test only) - uses: actions/upload-artifact@v3 - if: ${{ !cancelled() }} - with: - name: ta - path: ta - name: Upload iOS integration tests artifact uses: actions/upload-artifact@v3 if: ${{ !cancelled() }} From a0725a304b34acb6265def0c879a7edfde2e8964 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 4 May 2022 12:08:43 -0700 Subject: [PATCH 89/93] Fix Swift header script to work with multiple URLs. --- .github/workflows/update-dependencies.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 4b1a09ca4d..fb089d816c 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -127,13 +127,21 @@ jobs: core_version=$(grep "pod 'Firebase/Core'" ios_pod/Podfile | sed "s/.*'\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)'.*/\1/") echo "Getting Swift header files from Firebase iOS SDK ${core_version} zip distribution" ziptmp="$(mktemp -d)" - curl -H 'Authorization: token ${{ github.token }}' "https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" -o "${ziptmp}/Firebase.zip" + # The version might be named vX.Y.Z or simply X.Y.Z, check which exists. + declare -a zip_urls + zip_urls=("https://github.com/firebase/firebase-ios-sdk/releases/download/v${core_version}/Firebase.zip" "https://github.com/firebase/firebase-ios-sdk/releases/download/${core_version}/Firebase.zip") + for try_url in ${zip_urls[@]} error; do + curl -H 'Authorization: token ${{ github.token }}' -L -f "${try_url}" -o "${ziptmp}/Firebase.zip" 2> /dev/null && break + done + if [[ "${try_url}" == "error" ]]; then + echo "::error ::Could not download Firebase iOS prebuilt zip file." + fi cd "${ziptmp}" echo "Unzipping..." unzip -q Firebase.zip '*-Swift.h' cd - # Copy all *-Swift.h header files into ios_pod/swift_headers/ - echo Copying headers..." + echo "Copying headers..." find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ copyright_line="// Copyright $(date +%Y) Google LLC" # Add a note to each file about its source. @@ -141,7 +149,7 @@ jobs: if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then sed -i~ "s|^// Generated by Apple Swift|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n// Generated by Apple Swift|" "${ios_header}" fi - python scripts/format_code.py --f "${ios_header}" + python3 scripts/format_code.py --f "${ios_header}" done rm -rf ${ziptmp} From f26dc40d4d2831dc5a350184048feaea011c40ae Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 4 May 2022 12:08:58 -0700 Subject: [PATCH 90/93] Update Swift headers for final 9.0.0 release --- ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h | 11 +++++++++-- ios_pod/swift_headers/FirebaseCoreInternal-Swift.h | 11 ++++++++--- ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h | 11 +++++++++-- ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h | 11 +++++++++-- ios_pod/swift_headers/FirebaseFunctions-Swift.h | 10 ++++++++-- .../swift_headers/FirebaseInAppMessagingSwift-Swift.h | 11 +++++++++-- .../swift_headers/FirebaseMLModelDownloader-Swift.h | 11 +++++++++-- .../swift_headers/FirebaseRemoteConfigSwift-Swift.h | 11 +++++++++-- ios_pod/swift_headers/FirebaseSharedSwift-Swift.h | 11 +++++++++-- ios_pod/swift_headers/FirebaseStorage-Swift.h | 10 ++++++++-- ios_pod/swift_headers/SwiftProtobuf-Swift.h | 11 +++++++++-- 11 files changed, 96 insertions(+), 23 deletions(-) diff --git a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h index 5f11d8786a..76fd043d2b 100644 --- a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEANALYTICSSWIFT_SWIFT_H #define FIREBASEANALYTICSSWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h index bbadcab97c..5ae00c0918 100644 --- a/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h +++ b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h @@ -1,7 +1,7 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) #ifndef FIREBASECOREINTERNAL_SWIFT_H #define FIREBASECOREINTERNAL_SWIFT_H #pragma clang diagnostic push @@ -195,6 +195,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" @@ -255,8 +262,6 @@ SWIFT_CLASS_NAMED("_ObjC_HeartbeatController") + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end -@class NSNumber; - /// A model object representing a payload of heartbeat data intended for sending in network /// requests. SWIFT_CLASS_NAMED("_ObjC_HeartbeatsPayload") diff --git a/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h index 8df320a8f4..cc934567d5 100644 --- a/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEDATABASESWIFT_SWIFT_H #define FIREBASEDATABASESWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h index 8a290214b2..52337a1afb 100644 --- a/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEFIRESTORESWIFT_SWIFT_H #define FIREBASEFIRESTORESWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseFunctions-Swift.h b/ios_pod/swift_headers/FirebaseFunctions-Swift.h index 3c9c6a1736..5e5cb93f94 100644 --- a/ios_pod/swift_headers/FirebaseFunctions-Swift.h +++ b/ios_pod/swift_headers/FirebaseFunctions-Swift.h @@ -1,7 +1,7 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) #ifndef FIREBASEFUNCTIONS_SWIFT_H #define FIREBASEFUNCTIONS_SWIFT_H #pragma clang diagnostic push @@ -195,6 +195,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" @@ -225,7 +232,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); @class NSString; @class FIRHTTPSCallable; @class NSURL; -@class NSNumber; /// Functions is the client for Cloud Functions for a Firebase project. SWIFT_CLASS_NAMED("Functions") diff --git a/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h index 2fc8c5fbed..56528c1416 100644 --- a/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H #define FIREBASEINAPPMESSAGINGSWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h index fa7288b7e6..6340dac319 100644 --- a/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h +++ b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEMLMODELDOWNLOADER_SWIFT_H #define FIREBASEMLMODELDOWNLOADER_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h index 310bbb7ed3..7bcdb5bf9f 100644 --- a/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASEREMOTECONFIGSWIFT_SWIFT_H #define FIREBASEREMOTECONFIGSWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h index e37024b0c3..8c5aecf33f 100644 --- a/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h +++ b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef FIREBASESHAREDSWIFT_SWIFT_H #define FIREBASESHAREDSWIFT_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" diff --git a/ios_pod/swift_headers/FirebaseStorage-Swift.h b/ios_pod/swift_headers/FirebaseStorage-Swift.h index 6c0d39c091..36ba28f0d6 100644 --- a/ios_pod/swift_headers/FirebaseStorage-Swift.h +++ b/ios_pod/swift_headers/FirebaseStorage-Swift.h @@ -1,7 +1,7 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) #ifndef FIREBASESTORAGE_SWIFT_H #define FIREBASESTORAGE_SWIFT_H #pragma clang diagnostic push @@ -195,6 +195,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" @@ -225,7 +232,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); @class NSString; @class FIRApp; @class FIRStorageReference; -@class NSNumber; /// FirebaseStorage is a service that supports uploading and downloading binary objects, /// such as images, videos, and other files to Google Cloud Storage. diff --git a/ios_pod/swift_headers/SwiftProtobuf-Swift.h b/ios_pod/swift_headers/SwiftProtobuf-Swift.h index 63c48e00ca..8f203aef65 100644 --- a/ios_pod/swift_headers/SwiftProtobuf-Swift.h +++ b/ios_pod/swift_headers/SwiftProtobuf-Swift.h @@ -1,8 +1,8 @@ // Copyright 2022 Google LLC // Copied from Firebase iOS SDK 9.0.0. -// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 -// clang-1300.0.29.30) +// Generated by Apple Swift version 5.6 (swiftlang-5.6.0.323.62 +// clang-1316.0.20.8) #ifndef SWIFTPROTOBUF_SWIFT_H #define SWIFTPROTOBUF_SWIFT_H #pragma clang diagnostic push @@ -206,6 +206,13 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #if !defined(IBSegueAction) #define IBSegueAction #endif +#if !defined(SWIFT_EXTERN) +#if defined(__cplusplus) +#define SWIFT_EXTERN extern "C" +#else +#define SWIFT_EXTERN extern +#endif +#endif #if __has_feature(modules) #if __has_warning("-Watimport-in-framework-header") #pragma clang diagnostic ignored "-Watimport-in-framework-header" From 63637b475c34c0363cbfbfdf342e8cfe3a825124 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 4 May 2022 12:45:43 -0700 Subject: [PATCH 91/93] Add readme about ios_pod directory and its swift_headers subdirectory --- ios_pod/readme.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ios_pod/readme.txt diff --git a/ios_pod/readme.txt b/ios_pod/readme.txt new file mode 100644 index 0000000000..616fdd7fa8 --- /dev/null +++ b/ios_pod/readme.txt @@ -0,0 +1,13 @@ +firebase-cpp-sdk/ios_pod directory + +This directory contains a Podfile that allows us to install the Firebase iOS SDK +via CocoaPods. The Podfile here must include all Cocoapods used by the Firebase +C++ SDK. The pods are extracted as part of the build process, and the header +files within them are referenced by the Objective-C++ code in this SDK (see +setup_pod_headers in CMakeLists.txt for details). + +The "swift_headers" subdirectory contains copies of the most recent Swift +bridging headers for the Firebase iOS libraries that are written in Swift, +enabling them to be called from this SDK's Objective-C++ code. These headers are +copied from the most recent firebase-ios-sdk release via this repository's +update-dependencies.yml GitHub Actions workflow. From 433073d60fdbf5bd5244e46aa50c4f7b291d31b4 Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 4 May 2022 13:30:59 -0700 Subject: [PATCH 92/93] Remove staging repo from podfiles. (#923) --- admob/integration_test/Podfile | 1 - analytics/integration_test/Podfile | 1 - app/integration_test/Podfile | 1 - auth/integration_test/Podfile | 1 - database/integration_test/Podfile | 1 - dynamic_links/integration_test/Podfile | 1 - firestore/integration_test/Podfile | 1 - firestore/integration_test_internal/Podfile | 1 - functions/integration_test/Podfile | 1 - installations/integration_test/Podfile | 1 - ios_pod/Podfile | 1 - messaging/integration_test/Podfile | 1 - remote_config/integration_test/Podfile | 1 - storage/integration_test/Podfile | 1 - 14 files changed, 14 deletions(-) diff --git a/admob/integration_test/Podfile b/admob/integration_test/Podfile index 341d715025..edbea91cff 100644 --- a/admob/integration_test/Podfile +++ b/admob/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase AdMob test application. diff --git a/analytics/integration_test/Podfile b/analytics/integration_test/Podfile index a685a4f6fe..e6e0602e99 100644 --- a/analytics/integration_test/Podfile +++ b/analytics/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Analytics test application. diff --git a/app/integration_test/Podfile b/app/integration_test/Podfile index bde5a25dc4..9e4cc47b75 100644 --- a/app/integration_test/Podfile +++ b/app/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase App test application. diff --git a/auth/integration_test/Podfile b/auth/integration_test/Podfile index 4ad5dd183f..11c1bd78b9 100644 --- a/auth/integration_test/Podfile +++ b/auth/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Auth test application. use_frameworks! :linkage => :static diff --git a/database/integration_test/Podfile b/database/integration_test/Podfile index 7a638b4163..8f77c1dcfe 100644 --- a/database/integration_test/Podfile +++ b/database/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Realtime Database test application. use_frameworks! :linkage => :static diff --git a/dynamic_links/integration_test/Podfile b/dynamic_links/integration_test/Podfile index 925a2100ab..331ebe65f4 100644 --- a/dynamic_links/integration_test/Podfile +++ b/dynamic_links/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Dynamic Links test application. diff --git a/firestore/integration_test/Podfile b/firestore/integration_test/Podfile index 63d4211609..a730b4ebc9 100644 --- a/firestore/integration_test/Podfile +++ b/firestore/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Firestore test application. use_frameworks! :linkage => :static diff --git a/firestore/integration_test_internal/Podfile b/firestore/integration_test_internal/Podfile index 53c19ffa04..07c1d44ed3 100644 --- a/firestore/integration_test_internal/Podfile +++ b/firestore/integration_test_internal/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Firestore internal test application. use_frameworks! :linkage => :static diff --git a/functions/integration_test/Podfile b/functions/integration_test/Podfile index 4b4c88dd93..90e41cc6db 100644 --- a/functions/integration_test/Podfile +++ b/functions/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Functions for Firebase test application. use_frameworks! :linkage => :static diff --git a/installations/integration_test/Podfile b/installations/integration_test/Podfile index edc3513624..74b8df6af9 100644 --- a/installations/integration_test/Podfile +++ b/installations/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' # Firebase Installations test application. diff --git a/ios_pod/Podfile b/ios_pod/Podfile index 8ea5a36a8c..27dacad454 100644 --- a/ios_pod/Podfile +++ b/ios_pod/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' use_frameworks! diff --git a/messaging/integration_test/Podfile b/messaging/integration_test/Podfile index 3d2fdb3895..133c62a723 100644 --- a/messaging/integration_test/Podfile +++ b/messaging/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Cloud Messaging test application. use_frameworks! :linkage => :static diff --git a/remote_config/integration_test/Podfile b/remote_config/integration_test/Podfile index 28e9bfc7de..cb23fca811 100644 --- a/remote_config/integration_test/Podfile +++ b/remote_config/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Firebase Remote Config test application. use_frameworks! :linkage => :static diff --git a/storage/integration_test/Podfile b/storage/integration_test/Podfile index 88cdcf6cc0..15de55a65e 100644 --- a/storage/integration_test/Podfile +++ b/storage/integration_test/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/Firebase/SpecsStaging.git' source 'https://github.com/CocoaPods/Specs.git' # Cloud Storage for Firebase test application. use_frameworks! :linkage => :static From e54659e3d3c43566bc6d96e2d992a6829916ae9e Mon Sep 17 00:00:00 2001 From: Jon Simantov Date: Wed, 4 May 2022 13:36:05 -0700 Subject: [PATCH 93/93] If the zip file can't be downloaded, just skip that step. --- .github/workflows/update-dependencies.yml | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index fb089d816c..4e08bbf3dd 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -134,25 +134,25 @@ jobs: curl -H 'Authorization: token ${{ github.token }}' -L -f "${try_url}" -o "${ziptmp}/Firebase.zip" 2> /dev/null && break done if [[ "${try_url}" == "error" ]]; then - echo "::error ::Could not download Firebase iOS prebuilt zip file." + echo "::error ::Could not download Firebase iOS prebuilt zip file, skipping Swift headers." + else + cd "${ziptmp}" + echo "Unzipping..." + unzip -q Firebase.zip '*-Swift.h' + cd - + # Copy all *-Swift.h header files into ios_pod/swift_headers/ + echo "Copying headers..." + find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ + copyright_line="// Copyright $(date +%Y) Google LLC" + # Add a note to each file about its source. + for ios_header in ios_pod/swift_headers/*.h; do + if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then + sed -i~ "s|^// Generated by Apple Swift|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n// Generated by Apple Swift|" "${ios_header}" + fi + python3 scripts/format_code.py --f "${ios_header}" + done fi - cd "${ziptmp}" - echo "Unzipping..." - unzip -q Firebase.zip '*-Swift.h' - cd - - # Copy all *-Swift.h header files into ios_pod/swift_headers/ - echo "Copying headers..." - find "${ziptmp}" -name '*-Swift.h' -print0 | xargs -0 -n 1 -J REPLACETEXT cp -f REPLACETEXT ios_pod/swift_headers/ - copyright_line="// Copyright $(date +%Y) Google LLC" - # Add a note to each file about its source. - for ios_header in ios_pod/swift_headers/*.h; do - if ! grep -q "^// Copied from Firebase iOS SDK" "${ios_header}"; then - sed -i~ "s|^// Generated by Apple Swift|${copyright_line}\n// Copied from Firebase iOS SDK ${core_version}.\n\n// Generated by Apple Swift|" "${ios_header}" - fi - python3 scripts/format_code.py --f "${ios_header}" - done rm -rf ${ziptmp} - elif [[ ${{ github.event.inputs.updateAndroid }} -eq 1 ]]; then # Update Android only echo "Updating Android dependencies only"