diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e1a68e9666..4319f65af6 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.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 6b694bc22f..165145a574 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.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.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/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index f9fd60979a..4e08bbf3dd 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -122,6 +122,37 @@ 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)" + # 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, 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 + rm -rf ${ziptmp} elif [[ ${{ github.event.inputs.updateAndroid }} -eq 1 ]]; then # Update Android only echo "Updating Android dependencies only" diff --git a/admob/integration_test/Podfile b/admob/integration_test/Podfile index 183825bcc8..edbea91cff 100644 --- a/admob/integration_test/Podfile +++ b/admob/integration_test/Podfile @@ -4,13 +4,13 @@ platform :ios, '10.0' use_frameworks! :linkage => :static target 'integration_test' do - pod 'Firebase/Analytics', '8.15.0' - pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk' + pod 'Firebase/Analytics', '9.0.0' + pod 'Google-Mobile-Ads-SDK', '7.69.0-cppsdk2' 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/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/Podfile b/analytics/integration_test/Podfile index ef5bbc6d68..e6e0602e99 100644 --- a/analytics/integration_test/Podfile +++ b/analytics/integration_test/Podfile @@ -5,17 +5,17 @@ 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| # 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/integration_test.xcodeproj/project.pbxproj b/analytics/integration_test/integration_test.xcodeproj/project.pbxproj index d65135e132..53b960e16b 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 = 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.analytics.testapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 10.1; }; 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 /// diff --git a/app/integration_test/Podfile b/app/integration_test/Podfile index 9cd0677407..9e4cc47b75 100644 --- a/app/integration_test/Podfile +++ b/app/integration_test/Podfile @@ -4,12 +4,12 @@ platform :ios, '10.0' 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| # 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/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; diff --git a/auth/integration_test/Podfile b/auth/integration_test/Podfile index 020c91abcb..11c1bd78b9 100644 --- a/auth/integration_test/Podfile +++ b/auth/integration_test/Podfile @@ -4,17 +4,17 @@ 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| # 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/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/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 9c46bdaf16..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-8.15.0) +set(version CocoaPods-9.0.0) function(GetReleasedDep) message("Getting released firebase-ios-sdk @ ${version}") 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) diff --git a/database/integration_test/Podfile b/database/integration_test/Podfile index 1e68beb204..8f77c1dcfe 100644 --- a/database/integration_test/Podfile +++ b/database/integration_test/Podfile @@ -4,19 +4,19 @@ 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| # 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/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; }; diff --git a/dynamic_links/integration_test/Podfile b/dynamic_links/integration_test/Podfile index 239c1153e5..331ebe65f4 100644 --- a/dynamic_links/integration_test/Podfile +++ b/dynamic_links/integration_test/Podfile @@ -4,12 +4,12 @@ platform :ios, '10.0' 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| # 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/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/CMakeLists.txt b/firestore/CMakeLists.txt index 87897ef2cc..59e5813ab3 100644 --- a/firestore/CMakeLists.txt +++ b/firestore/CMakeLists.txt @@ -392,7 +392,8 @@ elseif(IOS) nanopb gRPC-C++ gRPC-Core - FirebaseAuth/Interop/Auth/Public + FirebaseAuthInterop/FirebaseAuth/Interop + FirebaseCoreExtension/FirebaseCore/Extension ) if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks") diff --git a/firestore/integration_test/Podfile b/firestore/integration_test/Podfile index efafbe060d..a730b4ebc9 100644 --- a/firestore/integration_test/Podfile +++ b/firestore/integration_test/Podfile @@ -1,22 +1,22 @@ source 'https://github.com/CocoaPods/Specs.git' -# Firebase Realtime Firestore test application. +# Cloud 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| # 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/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/Podfile b/firestore/integration_test_internal/Podfile index 7457898e5a..07c1d44ed3 100644 --- a/firestore/integration_test_internal/Podfile +++ b/firestore/integration_test_internal/Podfile @@ -1,22 +1,22 @@ 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| # 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/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/firestore/src/main/create_credentials_provider_ios.mm b/firestore/src/main/create_credentials_provider_ios.mm index c8eee6e0c3..8b5c35cc12 100644 --- a/firestore/src/main/create_credentials_provider_ios.mm +++ b/firestore/src/main/create_credentials_provider_ios.mm @@ -16,8 +16,12 @@ #include "firestore/src/main/create_credentials_provider.h" +#import "FIRAppInternal.h" #import "FIRAuthInterop.h" -#import "FirebaseCoreInternal.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" 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 9993777c8a..4f3e89016d 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" @@ -200,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; 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(); } diff --git a/functions/CMakeLists.txt b/functions/CMakeLists.txt index f5230a1b71..f2ee0dc314 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 diff --git a/functions/integration_test/Podfile b/functions/integration_test/Podfile index 8b58661dfb..90e41cc6db 100644 --- a/functions/integration_test/Podfile +++ b/functions/integration_test/Podfile @@ -4,19 +4,19 @@ 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| # 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/integration_test.xcodeproj/project.pbxproj b/functions/integration_test/integration_test.xcodeproj/project.pbxproj index fe44e8d999..a8d92dae8e 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 = 10.1; }; @@ -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 = 10.1; }; 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..74b8df6af9 100644 --- a/installations/integration_test/Podfile +++ b/installations/integration_test/Podfile @@ -4,13 +4,13 @@ platform :ios, '10.0' 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| # 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/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/ios_pod/Podfile b/ios_pod/Podfile index 699b3f88fb..27dacad454 100644 --- a/ios_pod/Podfile +++ b/ios_pod/Podfile @@ -3,19 +3,19 @@ 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-cppsdk2' + 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/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. diff --git a/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h new file mode 100644 index 0000000000..76fd043d2b --- /dev/null +++ b/ios_pod/swift_headers/FirebaseAnalyticsSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..5ae00c0918 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseCoreInternal-Swift.h @@ -0,0 +1,284 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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 + +/// 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..cc934567d5 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseDatabaseSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..52337a1afb --- /dev/null +++ b/ios_pod/swift_headers/FirebaseFirestoreSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..5e5cb93f94 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseFunctions-Swift.h @@ -0,0 +1,401 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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; + +/// 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..56528c1416 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseInAppMessagingSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..6340dac319 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseMLModelDownloader-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..7bcdb5bf9f --- /dev/null +++ b/ios_pod/swift_headers/FirebaseRemoteConfigSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..8c5aecf33f --- /dev/null +++ b/ios_pod/swift_headers/FirebaseSharedSwift-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..36ba28f0d6 --- /dev/null +++ b/ios_pod/swift_headers/FirebaseStorage-Swift.h @@ -0,0 +1,714 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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; + +/// 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; +- (id _Nonnull)copy SWIFT_WARN_UNUSED_RESULT; +- (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; +- (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; +@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..8f203aef65 --- /dev/null +++ b/ios_pod/swift_headers/SwiftProtobuf-Swift.h @@ -0,0 +1,246 @@ +// Copyright 2022 Google LLC +// Copied from Firebase iOS SDK 9.0.0. + +// 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 +#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 !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" +#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..133c62a723 100644 --- a/messaging/integration_test/Podfile +++ b/messaging/integration_test/Podfile @@ -4,12 +4,12 @@ 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/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/messaging/integration_test/src/integration_test.cc b/messaging/integration_test/src/integration_test.cc index dcd5ec862d..d2f928d03c 100644 --- a/messaging/integration_test/src/integration_test.cc +++ b/messaging/integration_test/src/integration_test.cc @@ -26,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 @@ -222,7 +230,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."); diff --git a/release_build_files/readme.md b/release_build_files/readme.md index df49e73326..ff24efd893 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -177,55 +177,59 @@ 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. + +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 @@ -237,55 +241,59 @@ 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. + +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 @@ -368,7 +376,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 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 @@ -566,11 +574,16 @@ code. ## Release Notes ### 9.0.0 - Changes - - 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. + - Analytics: Removed deprecated event names and parameters. - Storage (Desktop): Set Content-Type HTTP header when uploading with custom metadata. @@ -588,14 +601,15 @@ code. initialization of Firebase iOS SDK. - Remote Config: Fixed default `Fetch()` timeout being 1000 times too high. - - Storage (Desktop): Added retry logic to PutFile, GetFile, and other operations. + - Storage (Desktop): Added retry logic to PutFile, GetFile, and other + operations. ### 8.9.0 - 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 diff --git a/remote_config/integration_test/Podfile b/remote_config/integration_test/Podfile index 3e89202d79..cb23fca811 100644 --- a/remote_config/integration_test/Podfile +++ b/remote_config/integration_test/Podfile @@ -4,17 +4,17 @@ 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| # 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/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/scripts/gha/lint_commenter.py b/scripts/gha/lint_commenter.py index d4f2326c8b..25ac239ff9 100755 --- a/scripts/gha/lint_commenter.py +++ b/scripts/gha/lint_commenter.py @@ -49,7 +49,8 @@ # 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. # 1 = It's most likely not really an issue. diff --git a/scripts/gha/print_matrix_configuration.py b/scripts/gha/print_matrix_configuration.py index 5e845b856e..c1bfa09a1e 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.1"], + "xcode_version": ["13.3.1"], "python_version": ["3.7"], EXPANDED_KEY: { "os": ["ubuntu-latest", "macos-12", "windows-latest"], - "xcode_version": ["13.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.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.1"], + "xcode_version": ["13.3.1"], EXPANDED_KEY: { - "xcode_version": ["13.1"] + "xcode_version": ["13.3.1"] } } }, diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 339ffff465..e2fd88e72f 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 @@ -124,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/integration_test/Podfile b/storage/integration_test/Podfile index 54cc6323b2..15de55a65e 100644 --- a/storage/integration_test/Podfile +++ b/storage/integration_test/Podfile @@ -4,19 +4,19 @@ 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| # 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/integration_test.xcodeproj/project.pbxproj b/storage/integration_test/integration_test.xcodeproj/project.pbxproj index 50006689d3..d24b64205c 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 = 10.1; }; @@ -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 = 10.1; }; diff --git a/storage/integration_test/src/integration_test.cc b/storage/integration_test/src/integration_test.cc index 1f495a6bf6..40b0fcd33c 100644 --- a/storage/integration_test/src/integration_test.cc +++ b/storage/integration_test/src/integration_test.cc @@ -591,7 +591,9 @@ 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; @@ -605,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. @@ -641,7 +647,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 +1202,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 +1225,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 +1243,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 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..b86c8980e1 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" @@ -46,10 +42,16 @@ bool ControllerInternal::Pause() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() pause]; - }); + __block FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(pause)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task pause]; + }); + } + else { + return false; + } } else { pending_pause_ = true; } @@ -58,10 +60,16 @@ bool ControllerInternal::Resume() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() resume]; - }); + __block FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(resume)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task resume]; + }); + } + else { + return false; + } } else { pending_pause_ = false; } @@ -70,10 +78,16 @@ bool ControllerInternal::Cancel() { MutexLock mutex(pending_calls_mutex_); - if (task_impl()) { - util::DispatchAsyncSafeMainQueue(^() { - [task_impl() cancel]; - }); + __block FIRStorageObservableTask *task = task_impl(); + if (task) { + if ([task respondsToSelector:@selector(cancel)]) { + util::DispatchAsyncSafeMainQueue(^() { + [task cancel]; + }); + } + else { + return false; + } } else { pending_cancel_ = true; } 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/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); } } 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..b301601506 100644 --- a/storage/src/ios/storage_ios.h +++ b/storage/src/ios/storage_ios.h @@ -29,38 +29,20 @@ #include "storage/src/include/firebase/storage/storage_reference.h" #ifdef __OBJC__ -#import "FIRStorage.h" -#import "GTMSessionFetcher.h" -#import "GTMSessionFetcherService.h" - -// 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 + +#import "FirebaseStorage-Swift.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); + #endif // __OBJC__ namespace firebase { @@ -70,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: @@ -122,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(); } @@ -141,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 13a107a992..5e4fd79bd7 100644 --- a/storage/src/ios/storage_ios.mm +++ b/storage/src/ios/storage_ios.mm @@ -21,36 +21,7 @@ #include "app/src/reference_counted_future_impl.h" #include "storage/src/ios/storage_reference_ios.h" -#import "FIRStorageReference.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 +#import "FirebaseStorage-Swift.h" 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 31dc010e85..cebe450cd8 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 { @@ -168,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 8074d09422..41b60cd050 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" @@ -33,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 { @@ -207,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(); @@ -320,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 { @@ -335,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(); } 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" 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.