From 912df58c205fc8a75c6a1a3e03df846b1e415e0d Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 30 Apr 2024 15:34:12 -0400 Subject: [PATCH 01/13] [Release] Carthage updates for 10.25.0 (#12871) --- ReleaseTooling/CarthageJSON/FirebaseABTestingBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseAdMobBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseAnalyticsBinary.json | 1 + .../CarthageJSON/FirebaseAnalyticsOnDeviceConversionBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseAppCheckBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseAppDistributionBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseAuthBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseCrashlyticsBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseDatabaseBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseDynamicLinksBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseFirestoreBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseFunctionsBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseGoogleSignInBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseInAppMessagingBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseMLModelDownloaderBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseMessagingBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebasePerformanceBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseRemoteConfigBinary.json | 1 + ReleaseTooling/CarthageJSON/FirebaseStorageBinary.json | 1 + 19 files changed, 19 insertions(+) diff --git a/ReleaseTooling/CarthageJSON/FirebaseABTestingBinary.json b/ReleaseTooling/CarthageJSON/FirebaseABTestingBinary.json index c6144a69ec9..6ce3d42323c 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseABTestingBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseABTestingBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseABTesting-2823ac22562f1fbe.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseABTesting-999c4183ee13b8d3.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseABTesting-f0810693c46fdadc.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseABTesting-7c24443801777936.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseABTesting-e87c686cee02758a.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseABTesting-6a65ab8b888172af.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseABTesting-197f0cb4125363b6.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAdMobBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAdMobBinary.json index 5330930f9da..6c257b6edbc 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAdMobBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAdMobBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/Google-Mobile-Ads-SDK-bf8077d30296e04a.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/Google-Mobile-Ads-SDK-ea1e4524d0df93f6.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/Google-Mobile-Ads-SDK-28d9adec807e6c50.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/Google-Mobile-Ads-SDK-4088408e21a81c67.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/Google-Mobile-Ads-SDK-8b0d1ce3d1162b67.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/Google-Mobile-Ads-SDK-046511c3fd0189eb.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/Google-Mobile-Ads-SDK-50008c143ad8f268.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAnalyticsBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAnalyticsBinary.json index ced65ee4f5e..78710f2e78f 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAnalyticsBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAnalyticsBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseAnalytics-a121058bc5824bfa.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseAnalytics-ed7624b45fb9f7f1.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseAnalytics-e3194dd8c803ccd4.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseAnalytics-8af4daf086589ec7.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseAnalytics-95669fcf109f74a2.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseAnalytics-c0db6cb0e858e397.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseAnalytics-e8ebe991b5743f71.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAnalyticsOnDeviceConversionBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAnalyticsOnDeviceConversionBinary.json index bf2109b85c3..9d844f1e5eb 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAnalyticsOnDeviceConversionBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAnalyticsOnDeviceConversionBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseAnalyticsOnDeviceConversion-4b5874979659af63.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseAnalyticsOnDeviceConversion-8e03f5b073a147b0.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseAnalyticsOnDeviceConversion-8849e6e43cbbd3c0.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseAnalyticsOnDeviceConversion-3ab4488b5238043b.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseAnalyticsOnDeviceConversion-091f5252d693a9f9.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseAnalyticsOnDeviceConversion-7bbb73d46383a042.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseAnalyticsOnDeviceConversion-eca2f83d40e0278d.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAppCheckBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAppCheckBinary.json index 70694d49ab5..b75acaa55d4 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAppCheckBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAppCheckBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseAppCheck-2b52807979acf863.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseAppCheck-24146838e19ccc61.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseAppCheck-e2e664c6ec135fc4.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseAppCheck-81762cfe63fc1817.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseAppCheck-d19e46a728b1ac4f.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseAppCheck-8339fde989fe8f24.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseAppCheck-3ce0f074bfcd2596.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAppDistributionBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAppDistributionBinary.json index f4b43433400..d9037d92218 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAppDistributionBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAppDistributionBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseAppDistribution-139211bb5dd3dbc3.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseAppDistribution-fc3d9f20f693b734.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseAppDistribution-e38dad9115dff3af.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseAppDistribution-cd27707b993aae9d.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseAppDistribution-cefc3327ddfceda6.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseAppDistribution-7931e42d39575534.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseAppDistribution-79dc2b1348d9aee9.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseAuthBinary.json b/ReleaseTooling/CarthageJSON/FirebaseAuthBinary.json index 0e775d605a7..5f44d8e69cf 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseAuthBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseAuthBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseAuth-529e82147fbbd402.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseAuth-2bbb81f2b4cbac77.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseAuth-466e0e14d0c342e8.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseAuth-a223b8ebda8fd2c2.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseAuth-e43e66353617f093.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseAuth-8a9591e6daa7e207.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseAuth-7e18a510d0a5b02e.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseCrashlyticsBinary.json b/ReleaseTooling/CarthageJSON/FirebaseCrashlyticsBinary.json index ec52855c4a6..e72e5751024 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseCrashlyticsBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseCrashlyticsBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseCrashlytics-47c05619edb8ae9b.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseCrashlytics-913794b28b7424dc.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseCrashlytics-0805720ebb051475.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseCrashlytics-4035e9332410161e.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseCrashlytics-d29d3285a7d9fa1d.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseCrashlytics-165beb64483b4278.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseCrashlytics-53604573442e756b.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseDatabaseBinary.json b/ReleaseTooling/CarthageJSON/FirebaseDatabaseBinary.json index 6e2091eb480..a8a3944d148 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseDatabaseBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseDatabaseBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseDatabase-f5156c8169b6358f.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseDatabase-61799b2e188bed5b.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseDatabase-a27e18a8a37d7d0a.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseDatabase-0ac7f999ddc3f338.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseDatabase-5b22f689cb66d83a.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseDatabase-e1a9d1f0c4222cf7.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseDatabase-aea9249d81841ee1.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseDynamicLinksBinary.json b/ReleaseTooling/CarthageJSON/FirebaseDynamicLinksBinary.json index 79bd327feb5..a912b76f1de 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseDynamicLinksBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseDynamicLinksBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseDynamicLinks-c17c59949b7cc573.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseDynamicLinks-ffffc66283665cc3.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseDynamicLinks-6aa708ba01e222f5.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseDynamicLinks-1c3a48e8f12fc824.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseDynamicLinks-7cf4ae5e96882ca8.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseDynamicLinks-c3bdeb37651a5d5d.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseDynamicLinks-bcb5df6ec32f6684.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseFirestoreBinary.json b/ReleaseTooling/CarthageJSON/FirebaseFirestoreBinary.json index f74d200181f..cc338c3e3b8 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseFirestoreBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseFirestoreBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseFirestore-e4570e4863fe2044.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseFirestore-7d1481e62eb86231.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseFirestore-aebec35b37a4feed.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseFirestore-c5fda3ae8ab62345.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseFirestore-73ba0700b1aa6d6a.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseFirestore-02eb8da05f81fca5.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseFirestore-46fa68ddf287f76e.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseFunctionsBinary.json b/ReleaseTooling/CarthageJSON/FirebaseFunctionsBinary.json index 1f939073b96..7f17ba4aa5f 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseFunctionsBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseFunctionsBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseFunctions-d98d21836c2f2130.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseFunctions-30a434d6b70589d3.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseFunctions-56fc811f8293f2ec.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseFunctions-c143cedcb64ae0d6.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseFunctions-47189f2c99cdf806.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseFunctions-17c4b760141e38ad.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseFunctions-688a38b567392fcf.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseGoogleSignInBinary.json b/ReleaseTooling/CarthageJSON/FirebaseGoogleSignInBinary.json index 89279121852..5094644f88a 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseGoogleSignInBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseGoogleSignInBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/GoogleSignIn-a16b78c06ef8f77c.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/GoogleSignIn-fa5daf30aae63bc6.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/GoogleSignIn-03314eec1dbb9708.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/GoogleSignIn-fb2542a2c86f843a.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/GoogleSignIn-a5b49807be66100b.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/GoogleSignIn-0d2e746eb3ff9f92.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/GoogleSignIn-5cb2a2f1f74efd5e.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseInAppMessagingBinary.json b/ReleaseTooling/CarthageJSON/FirebaseInAppMessagingBinary.json index d5eba54e216..e2622da1868 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseInAppMessagingBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseInAppMessagingBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseInAppMessaging-fbb53083384bea1e.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseInAppMessaging-0a6028f71dc4dad9.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseInAppMessaging-29ae2009ef1950b2.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseInAppMessaging-b90e8ce0168460cd.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseInAppMessaging-91e5426eade46bca.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseInAppMessaging-10801bd111df59de.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseInAppMessaging-91d4dd9878a06b7e.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseMLModelDownloaderBinary.json b/ReleaseTooling/CarthageJSON/FirebaseMLModelDownloaderBinary.json index aaa8a8a44a3..5af9887ea07 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseMLModelDownloaderBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseMLModelDownloaderBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseMLModelDownloader-b3bffe302a074d0e.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseMLModelDownloader-acc3b6f7b4beb3d8.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseMLModelDownloader-7d8218cf3d3ef34e.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseMLModelDownloader-0373c9fd0cc9bd65.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseMLModelDownloader-559cb113c0cfd8f2.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseMLModelDownloader-9c909894999c92e4.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseMLModelDownloader-9abf9b0e24bfb921.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseMessagingBinary.json b/ReleaseTooling/CarthageJSON/FirebaseMessagingBinary.json index e4156444a48..a17296fa641 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseMessagingBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseMessagingBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseMessaging-812bc4f1c2d27e93.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseMessaging-3289b9f5d636eda0.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseMessaging-d1e21fc776fa88ed.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseMessaging-e6c8a212895199fa.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseMessaging-59ef1cc63c660712.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseMessaging-76c02a69e3fe1008.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseMessaging-439a17dcc8b8172b.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebasePerformanceBinary.json b/ReleaseTooling/CarthageJSON/FirebasePerformanceBinary.json index 33d4139e0ce..56af49deb45 100644 --- a/ReleaseTooling/CarthageJSON/FirebasePerformanceBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebasePerformanceBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebasePerformance-2a39f03d02fcbc5f.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebasePerformance-daf49762760bcd28.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebasePerformance-04ba5863cb67f726.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebasePerformance-bc7b306425147b0a.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebasePerformance-36ac6dfb99caa11b.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebasePerformance-f9f5be8ffad5cbb0.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebasePerformance-0ffe559f7554d8a5.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseRemoteConfigBinary.json b/ReleaseTooling/CarthageJSON/FirebaseRemoteConfigBinary.json index f145a0bfc7e..7819482c9e0 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseRemoteConfigBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseRemoteConfigBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseRemoteConfig-be4764f1b3e07c4f.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseRemoteConfig-33cb2acece724af5.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseRemoteConfig-8ebff21169280a12.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseRemoteConfig-93bad5de6b479bb5.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseRemoteConfig-edd1b427b8bbe782.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseRemoteConfig-10b62ee5663aaab3.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseRemoteConfig-2237eb5fcd4a4525.zip", diff --git a/ReleaseTooling/CarthageJSON/FirebaseStorageBinary.json b/ReleaseTooling/CarthageJSON/FirebaseStorageBinary.json index e94f059864a..a62ac3a11be 100644 --- a/ReleaseTooling/CarthageJSON/FirebaseStorageBinary.json +++ b/ReleaseTooling/CarthageJSON/FirebaseStorageBinary.json @@ -17,6 +17,7 @@ "10.22.0": "https://dl.google.com/dl/firebase/ios/carthage/10.22.0/FirebaseStorage-e3b2849afc9f0f95.zip", "10.23.0": "https://dl.google.com/dl/firebase/ios/carthage/10.23.0/FirebaseStorage-251d7827e3fc52e4.zip", "10.24.0": "https://dl.google.com/dl/firebase/ios/carthage/10.24.0/FirebaseStorage-f4d55d7d55242a20.zip", + "10.25.0": "https://dl.google.com/dl/firebase/ios/carthage/10.25.0/FirebaseStorage-472cc5950e16fed9.zip", "10.3.0": "https://dl.google.com/dl/firebase/ios/carthage/10.3.0/FirebaseStorage-ac463d14593d10a8.zip", "10.4.0": "https://dl.google.com/dl/firebase/ios/carthage/10.4.0/FirebaseStorage-fdf8479115660ce6.zip", "10.5.0": "https://dl.google.com/dl/firebase/ios/carthage/10.5.0/FirebaseStorage-04f255ea8c3a7420.zip", From b36f8dae2debe59e6e7385473903c9cb8abc9bee Mon Sep 17 00:00:00 2001 From: Andrew Heard Date: Tue, 30 Apr 2024 20:22:15 -0400 Subject: [PATCH 02/13] Update versions for Release 10.27.0 (#12875) --- Firebase.podspec | 48 +++++++++---------- FirebaseABTesting.podspec | 2 +- FirebaseAnalytics.podspec | 6 +-- FirebaseAnalyticsOnDeviceConversion.podspec | 4 +- FirebaseAppCheck.podspec | 2 +- FirebaseAppCheckInterop.podspec | 2 +- FirebaseAppDistribution.podspec | 2 +- FirebaseAuth.podspec | 2 +- FirebaseAuthInterop.podspec | 2 +- FirebaseCore.podspec | 2 +- FirebaseCoreExtension.podspec | 2 +- FirebaseCoreInternal.podspec | 2 +- FirebaseCrashlytics.podspec | 2 +- FirebaseDatabase.podspec | 2 +- FirebaseDynamicLinks.podspec | 2 +- FirebaseFirestore.podspec | 4 +- FirebaseFirestoreInternal.podspec | 2 +- FirebaseFunctions.podspec | 2 +- FirebaseInAppMessaging.podspec | 2 +- FirebaseInstallations.podspec | 2 +- FirebaseMLModelDownloader.podspec | 2 +- FirebaseMessaging.podspec | 2 +- FirebaseMessagingInterop.podspec | 2 +- FirebasePerformance.podspec | 2 +- FirebaseRemoteConfig.podspec | 2 +- FirebaseRemoteConfigInterop.podspec | 2 +- FirebaseSessions.podspec | 2 +- FirebaseSharedSwift.podspec | 2 +- FirebaseStorage.podspec | 2 +- GoogleAppMeasurement.podspec | 4 +- ...leAppMeasurementOnDeviceConversion.podspec | 2 +- Package.swift | 2 +- .../FirebaseManifest/FirebaseManifest.swift | 2 +- 33 files changed, 61 insertions(+), 61 deletions(-) diff --git a/Firebase.podspec b/Firebase.podspec index 18a33a78108..dfbed0c2b8d 100644 --- a/Firebase.podspec +++ b/Firebase.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Firebase' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase' s.description = <<-DESC @@ -36,14 +36,14 @@ Simplify your app development, grow your user base, and monetize more effectivel ss.ios.deployment_target = '10.0' ss.osx.deployment_target = '10.13' ss.tvos.deployment_target = '12.0' - ss.ios.dependency 'FirebaseAnalytics', '~> 10.25.0' - ss.osx.dependency 'FirebaseAnalytics', '~> 10.25.0' - ss.tvos.dependency 'FirebaseAnalytics', '~> 10.25.0' + ss.ios.dependency 'FirebaseAnalytics', '~> 10.27.0' + ss.osx.dependency 'FirebaseAnalytics', '~> 10.27.0' + ss.tvos.dependency 'FirebaseAnalytics', '~> 10.27.0' ss.dependency 'Firebase/CoreOnly' end s.subspec 'CoreOnly' do |ss| - ss.dependency 'FirebaseCore', '10.25.0' + ss.dependency 'FirebaseCore', '10.27.0' ss.source_files = 'CoreOnly/Sources/Firebase.h' ss.preserve_paths = 'CoreOnly/Sources/module.modulemap' if ENV['FIREBASE_POD_REPO_FOR_DEV_POD'] then @@ -79,13 +79,13 @@ Simplify your app development, grow your user base, and monetize more effectivel ss.ios.deployment_target = '10.0' ss.osx.deployment_target = '10.13' ss.tvos.deployment_target = '12.0' - ss.dependency 'FirebaseAnalytics/WithoutAdIdSupport', '~> 10.25.0' + ss.dependency 'FirebaseAnalytics/WithoutAdIdSupport', '~> 10.27.0' ss.dependency 'Firebase/CoreOnly' end s.subspec 'ABTesting' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseABTesting', '~> 10.25.0' + ss.dependency 'FirebaseABTesting', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -95,13 +95,13 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'AppDistribution' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.ios.dependency 'FirebaseAppDistribution', '~> 10.25.0-beta' + ss.ios.dependency 'FirebaseAppDistribution', '~> 10.27.0-beta' ss.ios.deployment_target = '11.0' end s.subspec 'AppCheck' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseAppCheck', '~> 10.25.0' + ss.dependency 'FirebaseAppCheck', '~> 10.27.0' ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' ss.tvos.deployment_target = '12.0' @@ -110,7 +110,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Auth' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseAuth', '~> 10.25.0' + ss.dependency 'FirebaseAuth', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -120,7 +120,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Crashlytics' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseCrashlytics', '~> 10.25.0' + ss.dependency 'FirebaseCrashlytics', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -130,7 +130,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Database' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseDatabase', '~> 10.25.0' + ss.dependency 'FirebaseDatabase', '~> 10.27.0' # Standard platforms PLUS watchOS 7. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -140,13 +140,13 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'DynamicLinks' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.ios.dependency 'FirebaseDynamicLinks', '~> 10.25.0' + ss.ios.dependency 'FirebaseDynamicLinks', '~> 10.27.0' ss.ios.deployment_target = '11.0' end s.subspec 'Firestore' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseFirestore', '~> 10.25.0' + ss.dependency 'FirebaseFirestore', '~> 10.27.0' ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' ss.tvos.deployment_target = '12.0' @@ -154,7 +154,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Functions' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseFunctions', '~> 10.25.0' + ss.dependency 'FirebaseFunctions', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -164,20 +164,20 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'InAppMessaging' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.ios.dependency 'FirebaseInAppMessaging', '~> 10.25.0-beta' - ss.tvos.dependency 'FirebaseInAppMessaging', '~> 10.25.0-beta' + ss.ios.dependency 'FirebaseInAppMessaging', '~> 10.27.0-beta' + ss.tvos.dependency 'FirebaseInAppMessaging', '~> 10.27.0-beta' ss.ios.deployment_target = '11.0' ss.tvos.deployment_target = '12.0' end s.subspec 'Installations' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseInstallations', '~> 10.25.0' + ss.dependency 'FirebaseInstallations', '~> 10.27.0' end s.subspec 'Messaging' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseMessaging', '~> 10.25.0' + ss.dependency 'FirebaseMessaging', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -187,7 +187,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'MLModelDownloader' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseMLModelDownloader', '~> 10.25.0-beta' + ss.dependency 'FirebaseMLModelDownloader', '~> 10.27.0-beta' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -197,15 +197,15 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Performance' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.ios.dependency 'FirebasePerformance', '~> 10.25.0' - ss.tvos.dependency 'FirebasePerformance', '~> 10.25.0' + ss.ios.dependency 'FirebasePerformance', '~> 10.27.0' + ss.tvos.dependency 'FirebasePerformance', '~> 10.27.0' ss.ios.deployment_target = '11.0' ss.tvos.deployment_target = '12.0' end s.subspec 'RemoteConfig' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseRemoteConfig', '~> 10.25.0' + ss.dependency 'FirebaseRemoteConfig', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' @@ -215,7 +215,7 @@ Simplify your app development, grow your user base, and monetize more effectivel s.subspec 'Storage' do |ss| ss.dependency 'Firebase/CoreOnly' - ss.dependency 'FirebaseStorage', '~> 10.25.0' + ss.dependency 'FirebaseStorage', '~> 10.27.0' # Standard platforms PLUS watchOS. ss.ios.deployment_target = '11.0' ss.osx.deployment_target = '10.13' diff --git a/FirebaseABTesting.podspec b/FirebaseABTesting.podspec index 15aa0f94025..46ae80fe177 100644 --- a/FirebaseABTesting.podspec +++ b/FirebaseABTesting.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseABTesting' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase ABTesting' s.description = <<-DESC diff --git a/FirebaseAnalytics.podspec b/FirebaseAnalytics.podspec index ff954c0ad5b..1d9c0b5bfb7 100644 --- a/FirebaseAnalytics.podspec +++ b/FirebaseAnalytics.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAnalytics' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Analytics for iOS' s.description = <<-DESC @@ -37,12 +37,12 @@ Pod::Spec.new do |s| s.default_subspecs = 'AdIdSupport' s.subspec 'AdIdSupport' do |ss| - ss.dependency 'GoogleAppMeasurement', '10.25.0' + ss.dependency 'GoogleAppMeasurement', '10.27.0' ss.vendored_frameworks = 'Frameworks/FirebaseAnalytics.xcframework' end s.subspec 'WithoutAdIdSupport' do |ss| - ss.dependency 'GoogleAppMeasurement/WithoutAdIdSupport', '10.25.0' + ss.dependency 'GoogleAppMeasurement/WithoutAdIdSupport', '10.27.0' ss.vendored_frameworks = 'Frameworks/FirebaseAnalytics.xcframework' end diff --git a/FirebaseAnalyticsOnDeviceConversion.podspec b/FirebaseAnalyticsOnDeviceConversion.podspec index 1ad84ef275c..03dd329904b 100644 --- a/FirebaseAnalyticsOnDeviceConversion.podspec +++ b/FirebaseAnalyticsOnDeviceConversion.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAnalyticsOnDeviceConversion' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'On device conversion measurement plugin for FirebaseAnalytics. Not intended for direct use.' s.description = <<-DESC @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.cocoapods_version = '>= 1.12.0' - s.dependency 'GoogleAppMeasurementOnDeviceConversion', '10.25.0' + s.dependency 'GoogleAppMeasurementOnDeviceConversion', '10.27.0' s.static_framework = true diff --git a/FirebaseAppCheck.podspec b/FirebaseAppCheck.podspec index 678f2823dcf..00168979f17 100644 --- a/FirebaseAppCheck.podspec +++ b/FirebaseAppCheck.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAppCheck' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase App Check SDK.' s.description = <<-DESC diff --git a/FirebaseAppCheckInterop.podspec b/FirebaseAppCheckInterop.podspec index ea4bf003d1b..a957d166efb 100644 --- a/FirebaseAppCheckInterop.podspec +++ b/FirebaseAppCheckInterop.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAppCheckInterop' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Interfaces that allow other Firebase SDKs to use AppCheck functionality.' s.description = <<-DESC diff --git a/FirebaseAppDistribution.podspec b/FirebaseAppDistribution.podspec index ae79c61df45..2fad9cead8d 100644 --- a/FirebaseAppDistribution.podspec +++ b/FirebaseAppDistribution.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAppDistribution' - s.version = '10.25.0-beta' + s.version = '10.27.0-beta' s.summary = 'App Distribution for Firebase iOS SDK.' s.description = <<-DESC diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index f25237ecc9c..c6446e59e82 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuth' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Apple platform client for Firebase Authentication' s.description = <<-DESC diff --git a/FirebaseAuthInterop.podspec b/FirebaseAuthInterop.podspec index 89409aaec80..c1c6b0b2d66 100644 --- a/FirebaseAuthInterop.podspec +++ b/FirebaseAuthInterop.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuthInterop' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Interfaces that allow other Firebase SDKs to use Auth functionality.' s.description = <<-DESC diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec index bb2cb898364..517ba503d23 100644 --- a/FirebaseCore.podspec +++ b/FirebaseCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCore' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Core' s.description = <<-DESC diff --git a/FirebaseCoreExtension.podspec b/FirebaseCoreExtension.podspec index 4e7da0eb53c..0b1480dd9c9 100644 --- a/FirebaseCoreExtension.podspec +++ b/FirebaseCoreExtension.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCoreExtension' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Extended FirebaseCore APIs for Firebase product SDKs' s.description = <<-DESC diff --git a/FirebaseCoreInternal.podspec b/FirebaseCoreInternal.podspec index 2cb42104375..10ff13f66db 100644 --- a/FirebaseCoreInternal.podspec +++ b/FirebaseCoreInternal.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCoreInternal' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'APIs for internal FirebaseCore usage.' s.description = <<-DESC diff --git a/FirebaseCrashlytics.podspec b/FirebaseCrashlytics.podspec index 1ca34f21665..38d5a760312 100644 --- a/FirebaseCrashlytics.podspec +++ b/FirebaseCrashlytics.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCrashlytics' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Best and lightest-weight crash reporting for mobile, desktop and tvOS.' s.description = 'Firebase Crashlytics helps you track, prioritize, and fix stability issues that erode app quality.' s.homepage = 'https://firebase.google.com/' diff --git a/FirebaseDatabase.podspec b/FirebaseDatabase.podspec index e6e0f7a20fa..12af9ce7905 100644 --- a/FirebaseDatabase.podspec +++ b/FirebaseDatabase.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseDatabase' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Realtime Database' s.description = <<-DESC diff --git a/FirebaseDynamicLinks.podspec b/FirebaseDynamicLinks.podspec index 38ba6239639..aecb9a93884 100644 --- a/FirebaseDynamicLinks.podspec +++ b/FirebaseDynamicLinks.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseDynamicLinks' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Dynamic Links' s.description = <<-DESC diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 20385fbf851..edeca1ced9a 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseFirestore' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Google Cloud Firestore' s.description = <<-DESC Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. @@ -37,7 +37,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.dependency 'FirebaseCore', '~> 10.0' s.dependency 'FirebaseCoreExtension', '~> 10.0' - s.dependency 'FirebaseFirestoreInternal', '10.25.0' + s.dependency 'FirebaseFirestoreInternal', '10.27.0' s.dependency 'FirebaseSharedSwift', '~> 10.0' end diff --git a/FirebaseFirestoreInternal.podspec b/FirebaseFirestoreInternal.podspec index b6a5f955b6d..0ab90c8b970 100644 --- a/FirebaseFirestoreInternal.podspec +++ b/FirebaseFirestoreInternal.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseFirestoreInternal' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Google Cloud Firestore' s.description = <<-DESC diff --git a/FirebaseFunctions.podspec b/FirebaseFunctions.podspec index 8e7a05bbf5b..95e1c491303 100644 --- a/FirebaseFunctions.podspec +++ b/FirebaseFunctions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseFunctions' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Cloud Functions for Firebase' s.description = <<-DESC diff --git a/FirebaseInAppMessaging.podspec b/FirebaseInAppMessaging.podspec index 4b16c2a94a1..4a0b346600c 100644 --- a/FirebaseInAppMessaging.podspec +++ b/FirebaseInAppMessaging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseInAppMessaging' - s.version = '10.25.0-beta' + s.version = '10.27.0-beta' s.summary = 'Firebase In-App Messaging for iOS' s.description = <<-DESC diff --git a/FirebaseInstallations.podspec b/FirebaseInstallations.podspec index 1b13896d9c2..2d136bace4b 100644 --- a/FirebaseInstallations.podspec +++ b/FirebaseInstallations.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseInstallations' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Installations' s.description = <<-DESC diff --git a/FirebaseMLModelDownloader.podspec b/FirebaseMLModelDownloader.podspec index 16724bb2972..94a17627f44 100644 --- a/FirebaseMLModelDownloader.podspec +++ b/FirebaseMLModelDownloader.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseMLModelDownloader' - s.version = '10.25.0-beta' + s.version = '10.27.0-beta' s.summary = 'Firebase ML Model Downloader' s.description = <<-DESC diff --git a/FirebaseMessaging.podspec b/FirebaseMessaging.podspec index 8791a5509ee..a65bafc51db 100644 --- a/FirebaseMessaging.podspec +++ b/FirebaseMessaging.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseMessaging' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Messaging' s.description = <<-DESC diff --git a/FirebaseMessagingInterop.podspec b/FirebaseMessagingInterop.podspec index f8bbcca64f4..ce7c6ae1d21 100644 --- a/FirebaseMessagingInterop.podspec +++ b/FirebaseMessagingInterop.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseMessagingInterop' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Interfaces that allow other Firebase SDKs to use Messaging functionality.' s.description = <<-DESC diff --git a/FirebasePerformance.podspec b/FirebasePerformance.podspec index 7600d067e8e..8fa8c6314ba 100644 --- a/FirebasePerformance.podspec +++ b/FirebasePerformance.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebasePerformance' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Performance' s.description = <<-DESC diff --git a/FirebaseRemoteConfig.podspec b/FirebaseRemoteConfig.podspec index 2852224a16b..c3a54d7560a 100644 --- a/FirebaseRemoteConfig.podspec +++ b/FirebaseRemoteConfig.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseRemoteConfig' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Remote Config' s.description = <<-DESC diff --git a/FirebaseRemoteConfigInterop.podspec b/FirebaseRemoteConfigInterop.podspec index 9ddb0db4b28..b1f6059e549 100644 --- a/FirebaseRemoteConfigInterop.podspec +++ b/FirebaseRemoteConfigInterop.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseRemoteConfigInterop' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Interfaces that allow other Firebase SDKs to use Remote Config functionality.' s.description = <<-DESC diff --git a/FirebaseSessions.podspec b/FirebaseSessions.podspec index 9f71521aae6..623c449d14d 100644 --- a/FirebaseSessions.podspec +++ b/FirebaseSessions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseSessions' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Sessions' s.description = <<-DESC diff --git a/FirebaseSharedSwift.podspec b/FirebaseSharedSwift.podspec index 37443892fce..1e0c02b9e86 100644 --- a/FirebaseSharedSwift.podspec +++ b/FirebaseSharedSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseSharedSwift' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Shared Swift Extensions for Firebase' s.description = <<-DESC diff --git a/FirebaseStorage.podspec b/FirebaseStorage.podspec index af5df133bb7..2bd9d3eab79 100644 --- a/FirebaseStorage.podspec +++ b/FirebaseStorage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseStorage' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Firebase Storage' s.description = <<-DESC diff --git a/GoogleAppMeasurement.podspec b/GoogleAppMeasurement.podspec index abdad07e04f..86fb40d7dbf 100644 --- a/GoogleAppMeasurement.podspec +++ b/GoogleAppMeasurement.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GoogleAppMeasurement' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = 'Shared measurement methods for Google libraries. Not intended for direct use.' s.description = <<-DESC @@ -37,7 +37,7 @@ Pod::Spec.new do |s| s.default_subspecs = 'AdIdSupport' s.subspec 'AdIdSupport' do |ss| - ss.dependency 'GoogleAppMeasurement/WithoutAdIdSupport', '10.25.0' + ss.dependency 'GoogleAppMeasurement/WithoutAdIdSupport', '10.27.0' ss.vendored_frameworks = 'Frameworks/GoogleAppMeasurementIdentitySupport.xcframework' end diff --git a/GoogleAppMeasurementOnDeviceConversion.podspec b/GoogleAppMeasurementOnDeviceConversion.podspec index a834ca7b79f..5af422da6ba 100644 --- a/GoogleAppMeasurementOnDeviceConversion.podspec +++ b/GoogleAppMeasurementOnDeviceConversion.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GoogleAppMeasurementOnDeviceConversion' - s.version = '10.25.0' + s.version = '10.27.0' s.summary = <<-SUMMARY On device conversion measurement plugin for Google App Measurement. Not intended for direct use. diff --git a/Package.swift b/Package.swift index f7a7b2174c7..7423e659f66 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,7 @@ import class Foundation.ProcessInfo import PackageDescription -let firebaseVersion = "10.25.0" +let firebaseVersion = "10.27.0" let package = Package( name: "Firebase", diff --git a/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift b/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift index 1a3d6a454a8..881d312b883 100755 --- a/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift +++ b/ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift @@ -21,7 +21,7 @@ import Foundation /// The version and releasing fields of the non-Firebase pods should be reviewed every release. /// The array should be ordered so that any pod's dependencies precede it in the list. public let shared = Manifest( - version: "10.25.0", + version: "10.27.0", pods: [ Pod("FirebaseSharedSwift"), Pod("FirebaseCoreInternal"), From 7a0145207ec66f24e4bd1ceccd4f861a3e22535b Mon Sep 17 00:00:00 2001 From: Alexander Cohen Date: Wed, 1 May 2024 17:31:54 -0400 Subject: [PATCH 03/13] Add SIGTERM support (#12881) --- .../Controllers/FIRCLSMetricKitManager.m | 2 ++ .../Crashlytics/Handlers/FIRCLSMachException.c | 2 ++ Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c | 16 ++++++++++++++-- Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h | 3 ++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m b/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m index 0c081df9d08..40cbcedb907 100644 --- a/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m +++ b/Crashlytics/Crashlytics/Controllers/FIRCLSMetricKitManager.m @@ -438,6 +438,8 @@ - (NSString *)getSignalName:(NSNumber *)signalCode { return @"SIGSYS"; case SIGTRAP: return @"SIGTRAP"; + case SIGTERM: + return @"SIGTERM"; default: return @"UNKNOWN"; } diff --git a/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c b/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c index 92bc830edae..0b71808e7c6 100644 --- a/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c +++ b/Crashlytics/Crashlytics/Handlers/FIRCLSMachException.c @@ -150,6 +150,8 @@ exception_mask_t FIRCLSMachExceptionMaskForSignal(int signal) { return EXC_MASK_CRASH; case SIGFPE: return EXC_MASK_ARITHMETIC; + case SIGTERM: + return EXC_MASK_CRASH; } return 0; diff --git a/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c b/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c index 1fcdbf22aab..0e745932034 100644 --- a/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c +++ b/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.c @@ -21,8 +21,17 @@ #include #if CLS_SIGNAL_SUPPORTED -static const int FIRCLSFatalSignals[FIRCLSSignalCount] = {SIGABRT, SIGBUS, SIGFPE, SIGILL, - SIGSEGV, SIGSYS, SIGTRAP}; +static const int FIRCLSFatalSignals[FIRCLSSignalCount] = { + SIGABRT, SIGBUS, SIGFPE, SIGILL, + SIGSEGV, SIGSYS, SIGTRAP, + // SIGTERM can be caught and is usually sent by iOS and variants + // when Apple wants to try and gracefully shutdown the app + // before sending a SIGKILL (which can't be caught). + // Some areas I've seen this happen are: + // - When the OS updates an app. + // - In some circumstances for Watchdog Events. + // - Resource overuse (CPU, Disk, ...). + SIGTERM}; #if CLS_USE_SIGALTSTACK static void FIRCLSSignalInstallAltStack(FIRCLSSignalReadContext *roContext); @@ -237,6 +246,9 @@ void FIRCLSSignalNameLookup(int number, int code, const char **name, const char case SIGTRAP: *name = "SIGTRAP"; break; + case SIGTERM: + *name = "SIGTERM"; + break; default: *name = "UNKNOWN"; break; diff --git a/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h b/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h index 17d14810080..e9e0478c259 100644 --- a/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h +++ b/Crashlytics/Crashlytics/Handlers/FIRCLSSignal.h @@ -30,7 +30,8 @@ #endif #if CLS_SIGNAL_SUPPORTED -#define FIRCLSSignalCount (7) +// keep in sync with the list in _FIRCLSFatalSignals_. +#define FIRCLSSignalCount (8) typedef struct { const char* path; From 477bb2a6961b18dc6210a0dafc90a975e6a448c6 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Thu, 2 May 2024 10:31:16 -0400 Subject: [PATCH 04/13] [Release] Update CHANGELOG.md for #12881 (#12885) --- Crashlytics/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Crashlytics/CHANGELOG.md b/Crashlytics/CHANGELOG.md index e12b9b00dcf..f65bacfc228 100644 --- a/Crashlytics/CHANGELOG.md +++ b/Crashlytics/CHANGELOG.md @@ -1,3 +1,6 @@ +# Unreleased +- [added] Added support for catching the SIGTERM signal (#12881). + # 10.25.0 - [changed] Removed usages of user defaults API from internal Firebase Sessions dependency to eliminate required reason impact. From e8a12e04c2fa704b158905292b2ef3703d4f9ab7 Mon Sep 17 00:00:00 2001 From: Sheikh Bayazid <44797746+sheikhbayazid@users.noreply.github.com> Date: Fri, 3 May 2024 17:50:20 +0200 Subject: [PATCH 05/13] Improve/use shorthand syntax for unwrapping optionals and fix typos (#12369) --- .../tvOSSample/AuthViewController.swift | 2 +- .../NotificationService.swift | 4 +- FirebaseAnalyticsSwift/README.md | 6 +-- .../FIRAppCheckTestApp/AppDelegate.swift | 16 +++--- .../Tests/Unit/Swift/AppCheckAPITests.swift | 2 +- .../SwiftApiTests/AccountInfoTests.swift | 2 +- .../SwiftApiTests/EmailPasswordTests.swift | 2 +- .../Sample/SwiftApiTests/FacebookTests.swift | 8 +-- .../Sample/SwiftApiTests/GoogleTests.swift | 4 +- .../Sample/SwiftApiTests/TestsBase.swift | 4 +- FirebaseCombineSwift/DECISIONS.md | 6 +-- FirebaseCombineSwift/README.md | 2 +- .../Sources/Auth/Auth+Combine.swift | 52 +++++++++---------- .../Auth/GameCenterAuthProvider+Combine.swift | 4 +- .../Sources/Auth/MultiFactor+Combine.swift | 10 ++-- .../Auth/MultiFactorResolver+Combine.swift | 4 +- .../Sources/Auth/OAuthProvider+Combine.swift | 4 +- .../Auth/PhoneAuthProvider+Combine.swift | 12 ++--- .../Sources/Auth/User+Combine.swift | 16 +++--- .../CollectionReference+Combine.swift | 8 +-- .../Firestore/DocumentReference+Combine.swift | 24 ++++----- .../Sources/Firestore/Query+Combine.swift | 8 +-- .../Firestore/Transaction+Combine.swift | 2 +- .../Firestore/WriteBatch+Combine.swift | 2 +- .../Functions/HTTPSCallable+Combine.swift | 8 +-- .../Storage/StorageReference+Combine.swift | 2 +- .../Storage/StorageIntegration.swift | 2 +- .../AuthStateDidChangePublisherTests.swift | 8 +-- .../Auth/IDTokenDidChangePublisherTests.swift | 8 +-- .../Unit/Auth/SignInWithGameCenterTests.swift | 2 +- .../Tests/Unit/AuthBackend+Combine.swift | 4 +- .../HeartbeatLogging/HeartbeatStorage.swift | 2 +- .../Sources/HeartbeatLogging/Storage.swift | 4 +- .../Tests/Unit/HeartbeatStorageTests.swift | 4 +- .../DatabaseReference+WriteEncodable.swift | 2 +- .../Sources/Codable/ServerTimestamp.swift | 2 +- .../Sources/Callable+Codable.swift | 4 +- FirebaseFunctions/Sources/Functions.swift | 10 ++-- .../Sources/FunctionsError.swift | 4 +- FirebaseFunctions/Sources/HTTPSCallable.swift | 2 +- .../Sources/Internal/FunctionsContext.swift | 4 +- .../Internal/FunctionsSerializer.swift | 2 +- .../Tests/Unit/FunctionsAPITests.swift | 6 +-- .../Swift/Source/SwiftUIPreviewHelpers.swift | 2 +- .../Unit/Swift/InstallationsAPITests.swift | 4 +- .../Sources/ModelDownloader.swift | 2 +- .../Sources/ModelFileManager.swift | 2 +- .../Sources/ModelInfoRetriever.swift | 6 +-- .../Sources/TelemetryLogger.swift | 12 ++--- .../NotificationService.swift | 4 +- .../UnitTestsSwift/FIRMessagingAPITest.swift | 2 +- .../Tests/FakeConsole/FakeConsoleTests.swift | 6 +-- .../Tests/SwiftAPI/APITests.swift | 12 ++--- .../Tests/SwiftAPI/RemoteConfigConsole.swift | 6 +-- ...ransport+GoogleDataTransportProtocol.swift | 2 +- .../Installations+InstallationsProtocol.swift | 10 ++-- .../Settings/SettingsDownloadClient.swift | 4 +- .../Sources/Internal/StorageDeleteTask.swift | 2 +- .../Internal/StorageGetDownloadURLTask.swift | 4 +- .../Internal/StorageGetMetadataTask.swift | 4 +- .../Sources/Internal/StorageListTask.swift | 8 +-- .../Sources/Internal/StoragePath.swift | 2 +- .../Internal/StorageTokenAuthorizer.swift | 6 +-- .../Internal/StorageUpdateMetadataTask.swift | 4 +- .../Sources/Internal/StorageUtils.swift | 2 +- FirebaseStorage/Sources/Result.swift | 4 +- .../Sources/StorageDownloadTask.swift | 8 +-- FirebaseStorage/Sources/StorageError.swift | 2 +- .../Sources/StorageReference.swift | 8 +-- .../Sources/StorageUploadTask.swift | 8 +-- .../Tests/Integration/StorageAsyncAwait.swift | 2 +- .../Integration/StorageIntegration.swift | 2 +- .../StorageIntegrationCommon.swift | 2 +- .../Tests/Unit/StorageTestHelpers.swift | 8 +-- .../CollectionReference+AsyncAwait.swift | 4 +- .../AsyncAwait/Firestore+AsyncAwait.swift | 12 ++--- .../Swift/Source/Codable/DocumentID.swift | 4 +- .../Codable/DocumentReference+Codable.swift | 2 +- .../Swift/Source/Codable/EncoderDecoder.swift | 2 +- .../Swift/Source/Codable/ExplicitNull.swift | 2 +- .../Source/Codable/ServerTimestamp.swift | 2 +- .../PropertyWrapper/FirestoreQuery.swift | 4 +- .../FirestoreQueryObservable.swift | 4 +- .../Swift/Tests/API/BasicCompileTests.swift | 46 ++++++++-------- .../Tests/Codable/FirestoreEncoderTests.swift | 4 +- .../Integration/CodableIntegrationTests.swift | 12 ++--- 86 files changed, 266 insertions(+), 266 deletions(-) diff --git a/Example/tvOSSample/tvOSSample/AuthViewController.swift b/Example/tvOSSample/tvOSSample/AuthViewController.swift index 7809d2664b1..afcc7aae2cc 100644 --- a/Example/tvOSSample/tvOSSample/AuthViewController.swift +++ b/Example/tvOSSample/tvOSSample/AuthViewController.swift @@ -55,7 +55,7 @@ class AuthViewController: UIViewController { // MARK: - Internal Helpers private func setUserSignedIn(_ user: User?) { - if let user = user { + if let user { providers.isHidden = true signedIn.isHidden = false diff --git a/Example/watchOSSample/ServiceExtension/NotificationService.swift b/Example/watchOSSample/ServiceExtension/NotificationService.swift index 890c58e486d..95391b5b526 100644 --- a/Example/watchOSSample/ServiceExtension/NotificationService.swift +++ b/Example/watchOSSample/ServiceExtension/NotificationService.swift @@ -25,7 +25,7 @@ class NotificationService: UNNotificationServiceExtension { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) - if let bestAttemptContent = bestAttemptContent { + if let bestAttemptContent { // Modify the notification content here... bestAttemptContent.title = "\(bestAttemptContent.title) 👩‍💻" @@ -39,7 +39,7 @@ class NotificationService: UNNotificationServiceExtension { // Called just before the extension will be terminated by the system. // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the // original push payload will be used. - if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { + if let contentHandler, let bestAttemptContent { contentHandler(bestAttemptContent) } } diff --git a/FirebaseAnalyticsSwift/README.md b/FirebaseAnalyticsSwift/README.md index fff3f702ad9..5c605d01774 100644 --- a/FirebaseAnalyticsSwift/README.md +++ b/FirebaseAnalyticsSwift/README.md @@ -90,11 +90,11 @@ extension View { func analyticsScreen(name: String, class screenClass: String? = nil, extraParameters: [String: Any]? = nil) -> some View { onAppear { var params: [String: Any] = [AnalyticsParameterScreenName: name] - if let screenClass = screenClass { + if let screenClass { params[AnalyticsParameterScreenClass] = screenClass } - if let extraParams = extraParameters { - params.merge(extraParams) { _, new in new } + if let extraParameters { + params.merge(extraParameters) { _, new in new } } Analytics.logEvent(AnalyticsEventScreenView, parameters: params) } diff --git a/FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/AppDelegate.swift b/FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/AppDelegate.swift index 1f36beb957d..661fd9fbf0b 100644 --- a/FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/AppDelegate.swift +++ b/FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/AppDelegate.swift @@ -72,11 +72,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } DeviceCheckProvider(app: firebaseApp)?.getToken { token, error in - if let token = token { + if let token { print("DeviceCheck token: \(token.token), expiration date: \(token.expirationDate)") } - if let error = error { + if let error { print("DeviceCheck error: \((error as NSError).userInfo)") } } @@ -91,11 +91,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { print("Debug token: \(debugProvider.currentDebugToken())") debugProvider.getToken { token, error in - if let token = token { + if let token { print("Debug FAC token: \(token.token), expiration date: \(token.expirationDate)") } - if let error = error { + if let error { print("Debug error: \(error)") } } @@ -106,11 +106,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func requestLimitedUseToken() { AppCheck.appCheck().limitedUseToken { result, error in - if let result = result { + if let result { print("FAC limited-use token: \(result.token), expiration date: \(result.expirationDate)") } - if let error = error { + if let error { print("Error: \(String(describing: error))") } } @@ -128,11 +128,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } appAttestProvider.getToken { token, error in - if let token = token { + if let token { print("App Attest FAC token: \(token.token), expiration date: \(token.expirationDate)") } - if let error = error { + if let error { print("App Attest error: \(error)") } } diff --git a/FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift b/FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift index 4e1894501d2..053a12156fa 100644 --- a/FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift +++ b/FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift @@ -119,7 +119,7 @@ final class AppCheckAPITests { // MARK: - AppCheckErrors AppCheck.appCheck().token(forcingRefresh: false) { _, error in - if let error = error { + if let error { switch error { case AppCheckErrorCode.unknown: break diff --git a/FirebaseAuth/Tests/Sample/SwiftApiTests/AccountInfoTests.swift b/FirebaseAuth/Tests/Sample/SwiftApiTests/AccountInfoTests.swift index 882c9fb85b5..c6bcbda56c7 100644 --- a/FirebaseAuth/Tests/Sample/SwiftApiTests/AccountInfoTests.swift +++ b/FirebaseAuth/Tests/Sample/SwiftApiTests/AccountInfoTests.swift @@ -43,7 +43,7 @@ class AccountInfoTests: TestsBase { let auth = Auth.auth() let expectation1 = expectation(description: "Created account with email and password.") auth.createUser(withEmail: kOldUserEmail, password: "password") { user, error in - if let error = error { + if let error { XCTAssertEqual((error as NSError).code, AuthErrorCode.emailAlreadyInUse.rawValue, "Created a user despite it already exiting.") diff --git a/FirebaseAuth/Tests/Sample/SwiftApiTests/EmailPasswordTests.swift b/FirebaseAuth/Tests/Sample/SwiftApiTests/EmailPasswordTests.swift index 5fa78856d0f..ee34320dd9c 100644 --- a/FirebaseAuth/Tests/Sample/SwiftApiTests/EmailPasswordTests.swift +++ b/FirebaseAuth/Tests/Sample/SwiftApiTests/EmailPasswordTests.swift @@ -29,7 +29,7 @@ class EmailPasswordTests: TestsBase { let auth = Auth.auth() let expectation = self.expectation(description: "Created account with email and password.") auth.createUser(withEmail: kNewEmailToCreateUser, password: "password") { result, error in - if let error = error { + if let error { print("createUserWithEmail has error: \(error)") } expectation.fulfill() diff --git a/FirebaseAuth/Tests/Sample/SwiftApiTests/FacebookTests.swift b/FirebaseAuth/Tests/Sample/SwiftApiTests/FacebookTests.swift index f19471a4bc4..d5dd3bb6f71 100644 --- a/FirebaseAuth/Tests/Sample/SwiftApiTests/FacebookTests.swift +++ b/FirebaseAuth/Tests/Sample/SwiftApiTests/FacebookTests.swift @@ -30,7 +30,7 @@ import XCTest // let credential = FacebookAuthProvider.credential(withAccessToken: facebookAccessToken) // let expectation = self.expectation(description: "Signing in with Facebook finished.") // auth.signIn(with: credential) { result, error in -// if let error = error { +// if let error { // XCTFail("Signing in with Facebook had error: \(error)") // } else { // XCTAssertEqual(auth.currentUser?.displayName, Credentials.kFacebookUserName) @@ -69,7 +69,7 @@ import XCTest // let credential = FacebookAuthProvider.credential(withAccessToken: facebookAccessToken) // let expectation = self.expectation(description: "Facebook linking finished.") // auth.currentUser?.link(with: credential, completion: { result, error in -// if let error = error { +// if let error { // XCTFail("Link to Firebase error: \(error)") // } else { // guard let providers = (auth.currentUser?.providerData) else { @@ -124,7 +124,7 @@ import XCTest // fetcher.setRequestValue("text/plain", forHTTPHeaderField: "Content-Type") // let expectation = self.expectation(description: "Creating Facebook account finished.") // fetcher.beginFetch { data, error in -// if let error = error { +// if let error { // let error = error as NSError // if let message = String(data: error.userInfo["data"] as! Data, encoding: .utf8) { // // May get transient errors here for too many api calls when tests run frequently. @@ -181,7 +181,7 @@ import XCTest // fetcher.setRequestValue("text/plain", forHTTPHeaderField: "Content-Type") // let expectation = self.expectation(description: "Deleting Facebook account finished.") // fetcher.beginFetch { data, error in -// if let error = error { +// if let error { // XCTFail("Deleting Facebook account failed with error: \(error)") // } // expectation.fulfill() diff --git a/FirebaseAuth/Tests/Sample/SwiftApiTests/GoogleTests.swift b/FirebaseAuth/Tests/Sample/SwiftApiTests/GoogleTests.swift index 3da662b0f29..9a2925914b4 100644 --- a/FirebaseAuth/Tests/Sample/SwiftApiTests/GoogleTests.swift +++ b/FirebaseAuth/Tests/Sample/SwiftApiTests/GoogleTests.swift @@ -29,7 +29,7 @@ class GoogleTests: TestsBase { accessToken: googleAccessToken) let expectation = self.expectation(description: "Signing in with Google finished.") auth.signIn(with: credential) { result, error in - if let error = error { + if let error { print("Signing in with Google had error: \(error)") } expectation.fulfill() @@ -65,7 +65,7 @@ class GoogleTests: TestsBase { fetcher.setRequestValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") let expectation = self.expectation(description: "Exchanging Google account tokens finished.") fetcher.beginFetch { data, error in - if let error = error { + if let error { XCTFail("Exchanging Google account tokens finished with error: \(error)") } else { do { diff --git a/FirebaseAuth/Tests/Sample/SwiftApiTests/TestsBase.swift b/FirebaseAuth/Tests/Sample/SwiftApiTests/TestsBase.swift index e1f0721b82a..9440f4be640 100644 --- a/FirebaseAuth/Tests/Sample/SwiftApiTests/TestsBase.swift +++ b/FirebaseAuth/Tests/Sample/SwiftApiTests/TestsBase.swift @@ -38,7 +38,7 @@ class TestsBase: XCTestCase { let expectation = self.expectation(description: "Anonymous sign-in finished.") auth.signInAnonymously { result, error in - if let error = error { + if let error { print("Anonymous sign in error: \(error)") } expectation.fulfill() @@ -59,7 +59,7 @@ class TestsBase: XCTestCase { let auth = Auth.auth() let expectation = self.expectation(description: "Delete current user finished.") auth.currentUser?.delete { error in - if let error = error { + if let error { print("Anonymous sign in error: \(error)") } expectation.fulfill() diff --git a/FirebaseCombineSwift/DECISIONS.md b/FirebaseCombineSwift/DECISIONS.md index b8932edfcc6..8d4b642b448 100644 --- a/FirebaseCombineSwift/DECISIONS.md +++ b/FirebaseCombineSwift/DECISIONS.md @@ -28,9 +28,9 @@ extension Auth { password: String) -> Future { Future { /* [weak self] <-- not required */ promise in self?.createUser(withEmail: email, password: password) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -59,4 +59,4 @@ Using the same method and parameter names for one-shot asynchronous methods resu ![image](https://user-images.githubusercontent.com/232107/99672274-76f05680-2a73-11eb-880a-3563f293de7d.png) -To achieve the same for methods that return a stream of events, we'd have to name those `addXzyListener`. This would be in contrast to Apple's naming scheme (e.g. `dataTask(with:completionHandler)` -> `dataTaskPublisher(for:)` \ No newline at end of file +To achieve the same for methods that return a stream of events, we'd have to name those `addXzyListener`. This would be in contrast to Apple's naming scheme (e.g. `dataTask(with:completionHandler)` -> `dataTaskPublisher(for:)` diff --git a/FirebaseCombineSwift/README.md b/FirebaseCombineSwift/README.md index 88038441c28..bd98eb35d81 100644 --- a/FirebaseCombineSwift/README.md +++ b/FirebaseCombineSwift/README.md @@ -78,7 +78,7 @@ In the `sign(_:didSignInFor:withError:)` method, get a Google ID token and Googl ```swift func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) { // ... - if let error = error { + if let error { // ... return } diff --git a/FirebaseCombineSwift/Sources/Auth/Auth+Combine.swift b/FirebaseCombineSwift/Sources/Auth/Auth+Combine.swift index a146fd26b4e..288d1a0490b 100644 --- a/FirebaseCombineSwift/Sources/Auth/Auth+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/Auth+Combine.swift @@ -86,7 +86,7 @@ public extension Auth { func updateCurrentUser(_ user: User) -> Future { Future { promise in self.updateCurrentUser(user) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -117,9 +117,9 @@ public extension Auth { func signInAnonymously() -> Future { Future { promise in self.signInAnonymously { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -155,9 +155,9 @@ public extension Auth { password: String) -> Future { Future { promise in self.createUser(withEmail: email, password: password) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -189,9 +189,9 @@ public extension Auth { password: String) -> Future { Future { promise in self.signIn(withEmail: email, password: password) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -224,9 +224,9 @@ public extension Auth { link: String) -> Future { Future { promise in self.signIn(withEmail: email, link: link) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -249,7 +249,7 @@ public extension Auth { actionCodeSettings: ActionCodeSettings) -> Future { Future { promise in self.sendSignInLink(toEmail: email, actionCodeSettings: actionCodeSettings) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -274,9 +274,9 @@ public extension Auth { func fetchSignInMethods(forEmail email: String) -> Future<[String], Error> { Future<[String], Error> { promise in self.fetchSignInMethods(forEmail: email) { signInMethods, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let signInMethods = signInMethods { + } else if let signInMethods { promise(.success(signInMethods)) } } @@ -309,7 +309,7 @@ public extension Auth { newPassword: String) -> Future { Future { promise in self.confirmPasswordReset(withCode: code, newPassword: newPassword) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -332,9 +332,9 @@ public extension Auth { func verifyPasswordResetCode(_ code: String) -> Future { Future { promise in self.verifyPasswordResetCode(code) { email, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let email = email { + } else if let email { promise(.success(email)) } } @@ -353,9 +353,9 @@ public extension Auth { func checkActionCode(code: String) -> Future { Future { promise in self.checkActionCode(code) { actionCodeInfo, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let actionCodeInfo = actionCodeInfo { + } else if let actionCodeInfo { promise(.success(actionCodeInfo)) } } @@ -376,7 +376,7 @@ public extension Auth { func applyActionCode(code: String) -> Future { Future { promise in self.applyActionCode(code) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -405,7 +405,7 @@ public extension Auth { func sendPasswordReset(withEmail email: String) -> Future { Future { promise in self.sendPasswordReset(withEmail: email) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -448,7 +448,7 @@ public extension Auth { actionCodeSettings: ActionCodeSettings) -> Future { Future { promise in self.sendPasswordReset(withEmail: email, actionCodeSettings: actionCodeSettings) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -506,9 +506,9 @@ public extension Auth { uiDelegate: AuthUIDelegate?) -> Future { Future { promise in self.signIn(with: provider, uiDelegate: uiDelegate) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -534,9 +534,9 @@ public extension Auth { func signIn(withCustomToken token: String) -> Future { Future { promise in self.signIn(withCustomToken: token) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -583,9 +583,9 @@ public extension Auth { func signIn(with credential: AuthCredential) -> Future { Future { promise in self.signIn(with: credential) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } diff --git a/FirebaseCombineSwift/Sources/Auth/GameCenterAuthProvider+Combine.swift b/FirebaseCombineSwift/Sources/Auth/GameCenterAuthProvider+Combine.swift index 8cf2c7acbf5..95491fbc5df 100644 --- a/FirebaseCombineSwift/Sources/Auth/GameCenterAuthProvider+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/GameCenterAuthProvider+Combine.swift @@ -30,9 +30,9 @@ class func getCredential() -> Future { Future { promise in self.getCredential { authCredential, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authCredential = authCredential { + } else if let authCredential { promise(.success(authCredential)) } } diff --git a/FirebaseCombineSwift/Sources/Auth/MultiFactor+Combine.swift b/FirebaseCombineSwift/Sources/Auth/MultiFactor+Combine.swift index 870e67c9025..4fd850da1e6 100644 --- a/FirebaseCombineSwift/Sources/Auth/MultiFactor+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/MultiFactor+Combine.swift @@ -34,9 +34,9 @@ func getSession() -> Future { Future { promise in self.getSessionWithCompletion { session, error in - if let session = session { + if let session { promise(.success(session)) - } else if let error = error { + } else if let error { promise(.failure(error)) } } @@ -59,7 +59,7 @@ displayName: String?) -> Future { Future { promise in self.enroll(with: assertion, displayName: displayName) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -81,7 +81,7 @@ func unenroll(with factorInfo: MultiFactorInfo) -> Future { Future { promise in self.unenroll(with: factorInfo) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -101,7 +101,7 @@ func unenroll(withFactorUID factorUID: String) -> Future { Future { promise in self.unenroll(withFactorUID: factorUID) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) diff --git a/FirebaseCombineSwift/Sources/Auth/MultiFactorResolver+Combine.swift b/FirebaseCombineSwift/Sources/Auth/MultiFactorResolver+Combine.swift index 4d27a90cd3d..b2ada743c66 100644 --- a/FirebaseCombineSwift/Sources/Auth/MultiFactorResolver+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/MultiFactorResolver+Combine.swift @@ -33,9 +33,9 @@ -> Future { Future { promise in self.resolveSignIn(with: assertion) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } diff --git a/FirebaseCombineSwift/Sources/Auth/OAuthProvider+Combine.swift b/FirebaseCombineSwift/Sources/Auth/OAuthProvider+Combine.swift index 6d14564a05e..05faa7bbd77 100644 --- a/FirebaseCombineSwift/Sources/Auth/OAuthProvider+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/OAuthProvider+Combine.swift @@ -33,9 +33,9 @@ -> Future { Future { promise in self.getCredentialWith(uiDelegate) { authCredential, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authCredential = authCredential { + } else if let authCredential { promise(.success(authCredential)) } } diff --git a/FirebaseCombineSwift/Sources/Auth/PhoneAuthProvider+Combine.swift b/FirebaseCombineSwift/Sources/Auth/PhoneAuthProvider+Combine.swift index 130734c1c63..93af631104d 100644 --- a/FirebaseCombineSwift/Sources/Auth/PhoneAuthProvider+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/PhoneAuthProvider+Combine.swift @@ -54,9 +54,9 @@ -> Future { Future { promise in self.verifyPhoneNumber(phoneNumber, uiDelegate: uiDelegate) { verificationID, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let verificationID = verificationID { + } else if let verificationID { promise(.success(verificationID)) } } @@ -99,9 +99,9 @@ uiDelegate: uiDelegate, multiFactorSession: multiFactorSession ) { verificationID, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let verificationID = verificationID { + } else if let verificationID { promise(.success(verificationID)) } } @@ -131,9 +131,9 @@ self.verifyPhoneNumber(with: phoneMultiFactorInfo, uiDelegate: uiDelegate, multiFactorSession: multiFactorSession) { verificationID, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let verificationID = verificationID { + } else if let verificationID { promise(.success(verificationID)) } } diff --git a/FirebaseCombineSwift/Sources/Auth/User+Combine.swift b/FirebaseCombineSwift/Sources/Auth/User+Combine.swift index 4dfb4fb7d53..114f0bd7130 100644 --- a/FirebaseCombineSwift/Sources/Auth/User+Combine.swift +++ b/FirebaseCombineSwift/Sources/Auth/User+Combine.swift @@ -41,9 +41,9 @@ func link(with credential: AuthCredential) -> Future { Future { promise in self.link(with: credential) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -89,9 +89,9 @@ func reauthenticate(with credential: AuthCredential) -> Future { Future { promise in self.reauthenticate(with: credential) { authDataResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let authDataResult = authDataResult { + } else if let authDataResult { promise(.success(authDataResult)) } } @@ -119,9 +119,9 @@ func unlink(fromProvider provider: String) -> Future { Future { promise in self.unlink(fromProvider: provider) { user, error in - if let user = user { + if let user { promise(.success(user)) - } else if let error = error { + } else if let error { promise(.failure(error)) } } @@ -149,7 +149,7 @@ func sendEmailVerification() -> Future { Future { promise in self.sendEmailVerification { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -188,7 +188,7 @@ -> Future { Future { promise in self.sendEmailVerification(with: actionCodeSettings) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) diff --git a/FirebaseCombineSwift/Sources/Firestore/CollectionReference+Combine.swift b/FirebaseCombineSwift/Sources/Firestore/CollectionReference+Combine.swift index 32dc0004dc7..7c6c482cb4f 100644 --- a/FirebaseCombineSwift/Sources/Firestore/CollectionReference+Combine.swift +++ b/FirebaseCombineSwift/Sources/Firestore/CollectionReference+Combine.swift @@ -40,9 +40,9 @@ var reference: DocumentReference? return Future { promise in reference = self.addDocument(data: data) { error in - if let error = error { + if let error { promise(.failure(error)) - } else if let reference = reference { + } else if let reference { promise(.success(reference)) } } @@ -70,9 +70,9 @@ return Future { promise in do { try reference = self.addDocument(from: value, encoder: encoder) { error in - if let error = error { + if let error { promise(.failure(error)) - } else if let reference = reference { + } else if let reference { promise(.success(reference)) } } diff --git a/FirebaseCombineSwift/Sources/Firestore/DocumentReference+Combine.swift b/FirebaseCombineSwift/Sources/Firestore/DocumentReference+Combine.swift index 5d853fde1c1..b9dd5568d77 100644 --- a/FirebaseCombineSwift/Sources/Firestore/DocumentReference+Combine.swift +++ b/FirebaseCombineSwift/Sources/Firestore/DocumentReference+Combine.swift @@ -39,7 +39,7 @@ func setData(_ documentData: [String: Any]) -> Future { Future { promise in self.setData(documentData) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -62,7 +62,7 @@ func setData(_ documentData: [String: Any], merge: Bool) -> Future { Future { promise in self.setData(documentData, merge: merge) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -88,7 +88,7 @@ func setData(_ documentData: [String: Any], mergeFields: [Any]) -> Future { Future { promise in self.setData(documentData, mergeFields: mergeFields) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -117,7 +117,7 @@ Future { promise in do { try self.setData(from: value, encoder: encoder) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -151,7 +151,7 @@ Future { promise in do { try self.setData(from: value, merge: merge, encoder: encoder) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -186,7 +186,7 @@ Future { promise in do { try self.setData(from: value, mergeFields: mergeFields, encoder: encoder) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -214,7 +214,7 @@ func updateData(_ documentData: [String: Any]) -> Future { Future { promise in self.updateData(documentData) { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -233,7 +233,7 @@ func delete() -> Future { Future { promise in self.delete { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) @@ -254,9 +254,9 @@ -> Future { Future { promise in self.getDocument(source: source) { snapshot, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let snapshot = snapshot { + } else if let snapshot { promise(.success(snapshot)) } } @@ -275,9 +275,9 @@ let subject = PassthroughSubject() let listenerHandle = addSnapshotListener(includeMetadataChanges: includeMetadataChanges) { snapshot, error in - if let error = error { + if let error { subject.send(completion: .failure(error)) - } else if let snapshot = snapshot { + } else if let snapshot { subject.send(snapshot) } } diff --git a/FirebaseCombineSwift/Sources/Firestore/Query+Combine.swift b/FirebaseCombineSwift/Sources/Firestore/Query+Combine.swift index 5ad9b8587fc..5d6477b7c45 100644 --- a/FirebaseCombineSwift/Sources/Firestore/Query+Combine.swift +++ b/FirebaseCombineSwift/Sources/Firestore/Query+Combine.swift @@ -32,9 +32,9 @@ func getDocuments(source: FirestoreSource = .default) -> Future { Future { promise in self.getDocuments(source: source) { snapshot, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let snapshot = snapshot { + } else if let snapshot { promise(.success(snapshot)) } } @@ -53,9 +53,9 @@ let subject = PassthroughSubject() let listenerHandle = addSnapshotListener(includeMetadataChanges: includeMetadataChanges) { snapshot, error in - if let error = error { + if let error { subject.send(completion: .failure(error)) - } else if let snapshot = snapshot { + } else if let snapshot { subject.send(snapshot) } } diff --git a/FirebaseCombineSwift/Sources/Firestore/Transaction+Combine.swift b/FirebaseCombineSwift/Sources/Firestore/Transaction+Combine.swift index 523f582cb71..02b584c0ee0 100644 --- a/FirebaseCombineSwift/Sources/Firestore/Transaction+Combine.swift +++ b/FirebaseCombineSwift/Sources/Firestore/Transaction+Combine.swift @@ -64,7 +64,7 @@ return nil } }) { value, error in - if let error = error { + if let error { promise(.failure(error)) } else if let value = value as? T { promise(.success(value)) diff --git a/FirebaseCombineSwift/Sources/Firestore/WriteBatch+Combine.swift b/FirebaseCombineSwift/Sources/Firestore/WriteBatch+Combine.swift index c9740fac853..87ed5ce9ec5 100644 --- a/FirebaseCombineSwift/Sources/Firestore/WriteBatch+Combine.swift +++ b/FirebaseCombineSwift/Sources/Firestore/WriteBatch+Combine.swift @@ -30,7 +30,7 @@ func commit() -> Future { Future { promise in self.commit { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(())) diff --git a/FirebaseCombineSwift/Sources/Functions/HTTPSCallable+Combine.swift b/FirebaseCombineSwift/Sources/Functions/HTTPSCallable+Combine.swift index 7841583a3a9..f30e9083f76 100644 --- a/FirebaseCombineSwift/Sources/Functions/HTTPSCallable+Combine.swift +++ b/FirebaseCombineSwift/Sources/Functions/HTTPSCallable+Combine.swift @@ -42,9 +42,9 @@ func call() -> Future { Future { promise in self.call { callableResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let callableResult = callableResult { + } else if let callableResult { promise(.success(callableResult)) } } @@ -78,9 +78,9 @@ func call(_ data: Any?) -> Future { Future { promise in self.call(data) { callableResult, error in - if let error = error { + if let error { promise(.failure(error)) - } else if let callableResult = callableResult { + } else if let callableResult { promise(.success(callableResult)) } } diff --git a/FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift b/FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift index 8a96e355602..9a96ae02b43 100644 --- a/FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift +++ b/FirebaseCombineSwift/Sources/Storage/StorageReference+Combine.swift @@ -276,7 +276,7 @@ func delete() -> Future { Future { promise in self.delete { error in - if let error = error { + if let error { promise(.failure(error)) } else { promise(.success(true)) diff --git a/FirebaseCombineSwift/Tests/Integration/Storage/StorageIntegration.swift b/FirebaseCombineSwift/Tests/Integration/Storage/StorageIntegration.swift index be8482d3564..d469a9e08a5 100644 --- a/FirebaseCombineSwift/Tests/Integration/Storage/StorageIntegration.swift +++ b/FirebaseCombineSwift/Tests/Integration/Storage/StorageIntegration.swift @@ -633,7 +633,7 @@ class StorageIntegration: XCTestCase { let kFIRStorageIntegrationTestTimeout = 30.0 waitForExpectations(timeout: kFIRStorageIntegrationTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseCombineSwift/Tests/Unit/Auth/AuthStateDidChangePublisherTests.swift b/FirebaseCombineSwift/Tests/Unit/Auth/AuthStateDidChangePublisherTests.swift index d25e97be74d..ec887693697 100644 --- a/FirebaseCombineSwift/Tests/Unit/Auth/AuthStateDidChangePublisherTests.swift +++ b/FirebaseCombineSwift/Tests/Unit/Auth/AuthStateDidChangePublisherTests.swift @@ -171,7 +171,7 @@ class AuthStateDidChangePublisherTests: XCTestCase { .sink { user in print("Running on the main thread? \(Thread.isMainThread)") - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { signedInExpectation.fulfill() } } @@ -191,7 +191,7 @@ class AuthStateDidChangePublisherTests: XCTestCase { let cancellable = Auth.auth().authStateDidChangePublisher() .sink { user in - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } @@ -225,7 +225,7 @@ class AuthStateDidChangePublisherTests: XCTestCase { expect.fulfill() } } else { - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } @@ -261,7 +261,7 @@ class AuthStateDidChangePublisherTests: XCTestCase { expect.fulfill() } } else { - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } diff --git a/FirebaseCombineSwift/Tests/Unit/Auth/IDTokenDidChangePublisherTests.swift b/FirebaseCombineSwift/Tests/Unit/Auth/IDTokenDidChangePublisherTests.swift index cc532f88d90..1e96ad59592 100644 --- a/FirebaseCombineSwift/Tests/Unit/Auth/IDTokenDidChangePublisherTests.swift +++ b/FirebaseCombineSwift/Tests/Unit/Auth/IDTokenDidChangePublisherTests.swift @@ -113,7 +113,7 @@ class IDTokenDidChangePublisherTests: XCTestCase { cancellable = Auth.auth() .idTokenDidChangePublisher() .sink { user in - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } @@ -129,7 +129,7 @@ class IDTokenDidChangePublisherTests: XCTestCase { cancellable = Auth.auth() .idTokenDidChangePublisher() .sink { user in - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { print(#function) expect.fulfill() } @@ -161,7 +161,7 @@ class IDTokenDidChangePublisherTests: XCTestCase { expect.fulfill() } } else { - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } @@ -195,7 +195,7 @@ class IDTokenDidChangePublisherTests: XCTestCase { expect.fulfill() } } else { - if let user = user, user.isAnonymous { + if let user, user.isAnonymous { expect.fulfill() } } diff --git a/FirebaseCombineSwift/Tests/Unit/Auth/SignInWithGameCenterTests.swift b/FirebaseCombineSwift/Tests/Unit/Auth/SignInWithGameCenterTests.swift index a54b932eaa7..ba45270d44d 100644 --- a/FirebaseCombineSwift/Tests/Unit/Auth/SignInWithGameCenterTests.swift +++ b/FirebaseCombineSwift/Tests/Unit/Auth/SignInWithGameCenterTests.swift @@ -73,7 +73,7 @@ class SignInWithGameCenterTests: XCTestCase { body: Data?, contentType: String, completionHandler handler: @escaping FIRAuthBackendRPCIssuerCompletionHandler) { requestURL = URL - if let body = body { + if let body { requestData = body let json = try! JSONSerialization .jsonObject(with: body, options: []) as! [String: Any] diff --git a/FirebaseCombineSwift/Tests/Unit/AuthBackend+Combine.swift b/FirebaseCombineSwift/Tests/Unit/AuthBackend+Combine.swift index 51be478373f..a0bba79d644 100644 --- a/FirebaseCombineSwift/Tests/Unit/AuthBackend+Combine.swift +++ b/FirebaseCombineSwift/Tests/Unit/AuthBackend+Combine.swift @@ -22,9 +22,9 @@ extension FIRAuthBackend { -> Future { Future { promise in self.signIn(withGameCenter: request) { response, error in - if let response = response { + if let response { promise(.success(response)) - } else if let error = error { + } else if let error { promise(.failure(error)) } } diff --git a/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift b/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift index 41572a0dc44..d400944d055 100644 --- a/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift +++ b/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift @@ -153,7 +153,7 @@ final class HeartbeatStorage: HeartbeatStorageProtocol { /// - heartbeatsBundle: The heartbeats bundle to encode and save. /// - storage: The storage container to write to. private func save(_ heartbeatsBundle: HeartbeatsBundle?, to storage: Storage) throws { - if let heartbeatsBundle = heartbeatsBundle { + if let heartbeatsBundle { let data = try heartbeatsBundle.encoded(using: encoder) try storage.write(data) } else { diff --git a/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift b/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift index 79cf1274b43..a4cac33e27a 100644 --- a/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift +++ b/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift @@ -71,7 +71,7 @@ final class FileStorage: Storage { func write(_ data: Data?) throws { do { try createDirectories(in: url.deletingLastPathComponent()) - if let data = data { + if let data { try data.write(to: url, options: .atomic) } else { let emptyData = Data() @@ -136,7 +136,7 @@ final class UserDefaultsStorage: Storage { /// /// - Parameter data: The `Data?` to write to this object's associated defaults. func write(_ data: Data?) throws { - if let data = data { + if let data { defaults.set(data, forKey: key) } else { defaults.removeObject(forKey: key) diff --git a/FirebaseCore/Internal/Tests/Unit/HeartbeatStorageTests.swift b/FirebaseCore/Internal/Tests/Unit/HeartbeatStorageTests.swift index 51d97672e70..6cff37c608c 100644 --- a/FirebaseCore/Internal/Tests/Unit/HeartbeatStorageTests.swift +++ b/FirebaseCore/Internal/Tests/Unit/HeartbeatStorageTests.swift @@ -283,7 +283,7 @@ private class StorageFake: Storage { var onWrite: ((Data?) throws -> Void)? func read() throws -> Data { - if let onRead = onRead { + if let onRead { return try onRead() } else if let data = fakeFile { return data @@ -293,7 +293,7 @@ private class StorageFake: Storage { } func write(_ data: Data?) throws { - if let onWrite = onWrite { + if let onWrite { return try onWrite(data) } else { fakeFile = data diff --git a/FirebaseDatabase/Swift/Sources/Codable/DatabaseReference+WriteEncodable.swift b/FirebaseDatabase/Swift/Sources/Codable/DatabaseReference+WriteEncodable.swift index 529fc2e6015..094cb3e2f7c 100644 --- a/FirebaseDatabase/Swift/Sources/Codable/DatabaseReference+WriteEncodable.swift +++ b/FirebaseDatabase/Swift/Sources/Codable/DatabaseReference+WriteEncodable.swift @@ -39,7 +39,7 @@ public extension DatabaseReference { completion: ((Error?) -> Void)? = nil) throws { let encoded = try encoder.encode(value) - if let completion = completion { + if let completion { setValue(encoded, withCompletionBlock: { error, _ in completion(error) }) } else { setValue(encoded) diff --git a/FirebaseDatabase/Swift/Sources/Codable/ServerTimestamp.swift b/FirebaseDatabase/Swift/Sources/Codable/ServerTimestamp.swift index ecfd148879c..a99ba0c637e 100644 --- a/FirebaseDatabase/Swift/Sources/Codable/ServerTimestamp.swift +++ b/FirebaseDatabase/Swift/Sources/Codable/ServerTimestamp.swift @@ -59,7 +59,7 @@ public struct ServerTimestamp: Codable, Equatable, Hashable { public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() - if let value = value { + if let value { let interval = value.timeIntervalSince1970 try container.encode(Int(interval * 1000)) } else { diff --git a/FirebaseFunctions/Sources/Callable+Codable.swift b/FirebaseFunctions/Sources/Callable+Codable.swift index 5a8e508a9f0..08753e75f36 100644 --- a/FirebaseFunctions/Sources/Callable+Codable.swift +++ b/FirebaseFunctions/Sources/Callable+Codable.swift @@ -64,10 +64,10 @@ public struct Callable { callable.call(encoded) { result, error in do { - if let result = result { + if let result { let decoded = try decoder.decode(Response.self, from: result.data) completion(.success(decoded)) - } else if let error = error { + } else if let error { completion(.failure(error)) } else { completion(.failure(CallableError.internalError)) diff --git a/FirebaseFunctions/Sources/Functions.swift b/FirebaseFunctions/Sources/Functions.swift index 14eeb4e4f1b..9eb7a5d6a1e 100644 --- a/FirebaseFunctions/Sources/Functions.swift +++ b/FirebaseFunctions/Sources/Functions.swift @@ -347,12 +347,12 @@ enum FunctionsConstants { assert(!name.isEmpty, "Name cannot be empty") // Check if we're using the emulator - if let emulatorOrigin = emulatorOrigin { + if let emulatorOrigin { return "\(emulatorOrigin)/\(projectID)/\(region)/\(name)" } // Check the custom domain. - if let customDomain = customDomain { + if let customDomain { return "\(customDomain)/\(name)" } @@ -368,7 +368,7 @@ enum FunctionsConstants { contextProvider.getContext(options: options) { context, error in // Note: context is always non-nil since some checks could succeed, we're only failing if // there's an error. - if let error = error { + if let error { completion(.failure(error)) } else { let url = self.urlWithName(name) @@ -391,7 +391,7 @@ enum FunctionsConstants { contextProvider.getContext(options: options) { context, error in // Note: context is always non-nil since some checks could succeed, we're only failing if // there's an error. - if let error = error { + if let error { completion(.failure(error)) } else { self.callFunction(url: url, @@ -480,7 +480,7 @@ enum FunctionsConstants { localError = FunctionsErrorCode.deadlineExceeded.generatedError(userInfo: nil) } // If there was an error, report it to the user and stop. - if let localError = localError { + if let localError { completion(.failure(localError)) } else { completion(.failure(error)) diff --git a/FirebaseFunctions/Sources/FunctionsError.swift b/FirebaseFunctions/Sources/FunctionsError.swift index 8af6df9e077..9da297a9d13 100644 --- a/FirebaseFunctions/Sources/FunctionsError.swift +++ b/FirebaseFunctions/Sources/FunctionsError.swift @@ -219,7 +219,7 @@ func FunctionsErrorForResponse(status: NSInteger, var details: AnyObject? // Then look through the body for explicit details. - if let body = body, + if let body, let json = try? JSONSerialization.jsonObject(with: body) as? NSDictionary, let errorDetails = json["error"] as? NSDictionary { if let status = errorDetails["status"] as? String { @@ -252,7 +252,7 @@ func FunctionsErrorForResponse(status: NSInteger, var userInfo = [String: Any]() userInfo[NSLocalizedDescriptionKey] = description - if let details = details { + if let details { userInfo[FunctionsErrorDetailsKey] = details } return code.generatedError(userInfo: userInfo) diff --git a/FirebaseFunctions/Sources/HTTPSCallable.swift b/FirebaseFunctions/Sources/HTTPSCallable.swift index 8391d153236..629f3949527 100644 --- a/FirebaseFunctions/Sources/HTTPSCallable.swift +++ b/FirebaseFunctions/Sources/HTTPSCallable.swift @@ -151,7 +151,7 @@ open class HTTPSCallable: NSObject { return try await withCheckedThrowingContinuation { continuation in // TODO(bonus): Use task to handle and cancellation. self.call(data) { callableResult, error in - if let callableResult = callableResult { + if let callableResult { continuation.resume(returning: callableResult) } else { continuation.resume(throwing: error!) diff --git a/FirebaseFunctions/Sources/Internal/FunctionsContext.swift b/FirebaseFunctions/Sources/Internal/FunctionsContext.swift index 15591f83329..e4902fbee3b 100644 --- a/FirebaseFunctions/Sources/Internal/FunctionsContext.swift +++ b/FirebaseFunctions/Sources/Internal/FunctionsContext.swift @@ -60,7 +60,7 @@ class FunctionsContextProvider: NSObject { var error: Error? var limitedUseAppCheckToken: String? - if let auth = auth { + if let auth { dispatchGroup.enter() auth.getToken(forcingRefresh: false) { token, authError in @@ -70,7 +70,7 @@ class FunctionsContextProvider: NSObject { } } - if let appCheck = appCheck { + if let appCheck { dispatchGroup.enter() if options?.requireLimitedUseAppCheckTokens == true { diff --git a/FirebaseFunctions/Sources/Internal/FunctionsSerializer.swift b/FirebaseFunctions/Sources/Internal/FunctionsSerializer.swift index 290d9ef38ee..a883ed79f01 100644 --- a/FirebaseFunctions/Sources/Internal/FunctionsSerializer.swift +++ b/FirebaseFunctions/Sources/Internal/FunctionsSerializer.swift @@ -99,7 +99,7 @@ class FUNSerializer: NSObject { } // Throw the internal error that popped up, if it did. - if let decodeError = decodeError { + if let decodeError { throw decodeError } return decoded diff --git a/FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift b/FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift index e419ae5edf9..cde13386136 100644 --- a/FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift +++ b/FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift @@ -78,7 +78,7 @@ final class FunctionsAPITests: XCTestCase { let data: Any? = nil callableRef.call(data) { result, error in - if let result = result { + if let result { _ = result.data } else if let _ /* error */ = error { // ... @@ -98,7 +98,7 @@ final class FunctionsAPITests: XCTestCase { } callableRef.call { result, error in - if let result = result { + if let result { _ = result.data } else if let _ /* error */ = error { // ... @@ -120,7 +120,7 @@ final class FunctionsAPITests: XCTestCase { // MARK: - FunctionsErrorCode callableRef.call { _, error in - if let error = error { + if let error { switch (error as NSError).code { case FunctionsErrorCode.OK.rawValue: break diff --git a/FirebaseInAppMessaging/Swift/Source/SwiftUIPreviewHelpers.swift b/FirebaseInAppMessaging/Swift/Source/SwiftUIPreviewHelpers.swift index 3752429b6b0..9b64490fb47 100644 --- a/FirebaseInAppMessaging/Swift/Source/SwiftUIPreviewHelpers.swift +++ b/FirebaseInAppMessaging/Swift/Source/SwiftUIPreviewHelpers.swift @@ -96,7 +96,7 @@ public enum InAppMessagingPreviewHelpers { } var actionButton: InAppMessagingActionButton? - if let buttonText = buttonText, + if let buttonText, let buttonTextColor = buttonTextColor, let buttonBackgroundColor = buttonBackgroundColor { actionButton = InAppMessagingActionButton(buttonText: buttonText, diff --git a/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift b/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift index 51d1ae8f713..01ace9a2afb 100644 --- a/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift +++ b/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift @@ -131,7 +131,7 @@ final class InstallationsAPITests { // MARK: - InstallationsAuthTokenResult Installations.installations().authToken { result, _ in - if let result = result { + if let result { _ = result.expirationDate _ = result.authToken } @@ -140,7 +140,7 @@ final class InstallationsAPITests { // MARK: - InstallationsErrorCode Installations.installations().authToken { _, error in - if let error = error { + if let error { // Old error handling. switch (error as NSError).code { case Int(InstallationsErrorCode.unknown.rawValue): diff --git a/FirebaseMLModelDownloader/Sources/ModelDownloader.swift b/FirebaseMLModelDownloader/Sources/ModelDownloader.swift index ba5e047757b..fb99d831209 100644 --- a/FirebaseMLModelDownloader/Sources/ModelDownloader.swift +++ b/FirebaseMLModelDownloader/Sources/ModelDownloader.swift @@ -438,7 +438,7 @@ extension ModelDownloader { case let .modelInfo(remoteModelInfo): // Progress handler for model file download. let taskProgressHandler: ModelDownloadTask.ProgressHandler = { progress in - if let progressHandler = progressHandler { + if let progressHandler { self.asyncOnMainQueue(progressHandler(progress)) } } diff --git a/FirebaseMLModelDownloader/Sources/ModelFileManager.swift b/FirebaseMLModelDownloader/Sources/ModelFileManager.swift index e1f24e47db6..8e9acdef84a 100644 --- a/FirebaseMLModelDownloader/Sources/ModelFileManager.swift +++ b/FirebaseMLModelDownloader/Sources/ModelFileManager.swift @@ -195,7 +195,7 @@ extension ModelFileManager { } static let availableStorage = { (error: String?) -> String in - if let error = error { + if let error { return "Failed to check storage capacity on device: \(error)" } else { return "Failed to check storage capacity on device." diff --git a/FirebaseMLModelDownloader/Sources/ModelInfoRetriever.swift b/FirebaseMLModelDownloader/Sources/ModelInfoRetriever.swift index 20a8c7ef7dd..afaa58e7a7e 100644 --- a/FirebaseMLModelDownloader/Sources/ModelInfoRetriever.swift +++ b/FirebaseMLModelDownloader/Sources/ModelInfoRetriever.swift @@ -500,9 +500,9 @@ extension ModelInfoRetriever { request.setValue(bundleID, forHTTPHeaderField: ModelInfoRetriever.bundleIDHTTPHeader) request.setValue(token, forHTTPHeaderField: ModelInfoRetriever.fisTokenHTTPHeader) // Get model hash if local model info is available on device. - if let modelInfo = localModelInfo { + if let localModelInfo { request.setValue( - modelInfo.modelHash, + localModelInfo.modelHash, forHTTPHeaderField: ModelInfoRetriever.hashMatchHTTPHeader ) } @@ -511,7 +511,7 @@ extension ModelInfoRetriever { /// Parse error message from server response. private func getErrorFromResponse(_ data: Data?) -> String? { - if let data = data, + if let data, let responseJSON = try? JSONSerialization .jsonObject(with: data, options: []) as? [String: Any], let error = responseJSON["error"] as? [String: Any], diff --git a/FirebaseMLModelDownloader/Sources/TelemetryLogger.swift b/FirebaseMLModelDownloader/Sources/TelemetryLogger.swift index 23386d06bb1..79b91c8e2d2 100644 --- a/FirebaseMLModelDownloader/Sources/TelemetryLogger.swift +++ b/FirebaseMLModelDownloader/Sources/TelemetryLogger.swift @@ -63,14 +63,14 @@ extension ModelDownloadLogEvent { downloadFailureStatus: Int64? = 0, modelOptions: ModelOptions) { downloadStatus = status self.errorCode = errorCode - if let roughDuration = roughDownloadDuration { - roughDownloadDurationMs = roughDuration + if let roughDownloadDuration { + roughDownloadDurationMs = roughDownloadDuration } - if let exactDuration = exactDownloadDuration { - exactDownloadDurationMs = exactDuration + if let exactDownloadDuration { + exactDownloadDurationMs = exactDownloadDuration } - if let failureStatus = downloadFailureStatus { - self.downloadFailureStatus = failureStatus + if let downloadFailureStatus { + self.downloadFailureStatus = downloadFailureStatus } options = modelOptions } diff --git a/FirebaseMessaging/Apps/AdvancedSample/NotificationServiceExtension/NotificationService.swift b/FirebaseMessaging/Apps/AdvancedSample/NotificationServiceExtension/NotificationService.swift index bf48feb3b29..a6bc72e483b 100644 --- a/FirebaseMessaging/Apps/AdvancedSample/NotificationServiceExtension/NotificationService.swift +++ b/FirebaseMessaging/Apps/AdvancedSample/NotificationServiceExtension/NotificationService.swift @@ -25,7 +25,7 @@ class NotificationService: UNNotificationServiceExtension { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) - if let bestAttemptContent = bestAttemptContent { + if let bestAttemptContent { // Modify the notification content here... bestAttemptContent.title = "\(bestAttemptContent.title) 👩🏻‍💻" @@ -43,7 +43,7 @@ class NotificationService: UNNotificationServiceExtension { // Called just before the extension will be terminated by the system. // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the // original push payload will be used. - if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { + if let contentHandler, let bestAttemptContent { contentHandler(bestAttemptContent) } } diff --git a/FirebaseMessaging/Tests/UnitTestsSwift/FIRMessagingAPITest.swift b/FirebaseMessaging/Tests/UnitTestsSwift/FIRMessagingAPITest.swift index f48e663bd7f..66441a37ae9 100644 --- a/FirebaseMessaging/Tests/UnitTestsSwift/FIRMessagingAPITest.swift +++ b/FirebaseMessaging/Tests/UnitTestsSwift/FIRMessagingAPITest.swift @@ -94,7 +94,7 @@ func apis() { messaging.subscribe(toTopic: topic) messaging.unsubscribe(fromTopic: topic) messaging.unsubscribe(fromTopic: topic, completion: { error in - if let error = error { + if let error { switch error { // Handle errors in the new format. case MessagingError.timeout: diff --git a/FirebaseRemoteConfigSwift/Tests/FakeConsole/FakeConsoleTests.swift b/FirebaseRemoteConfigSwift/Tests/FakeConsole/FakeConsoleTests.swift index 73944fb9e9b..9f0bf1c188b 100644 --- a/FirebaseRemoteConfigSwift/Tests/FakeConsole/FakeConsoleTests.swift +++ b/FirebaseRemoteConfigSwift/Tests/FakeConsole/FakeConsoleTests.swift @@ -28,7 +28,7 @@ class FakeConsoleTests: APITestBase { func testChangedActivateWillNotFlag() { let expectation = self.expectation(description: #function) config.fetch { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -46,7 +46,7 @@ class FakeConsoleTests: APITestBase { let expectation2 = self.expectation(description: #function + "2") config.fetch { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -64,7 +64,7 @@ class FakeConsoleTests: APITestBase { let kFIRStorageIntegrationTestTimeout = 10.0 waitForExpectations(timeout: kFIRStorageIntegrationTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift b/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift index d1b0b4a0489..7bf81c97a37 100644 --- a/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift +++ b/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift @@ -21,7 +21,7 @@ class APITests: APITestBase { func testFetchThenActivate() { let expectation = self.expectation(description: #function) config.fetch { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -37,7 +37,7 @@ class APITests: APITestBase { func testFetchWithExpirationThenActivate() { let expectation = self.expectation(description: #function) config.fetch(withExpirationDuration: 0) { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -54,7 +54,7 @@ class APITests: APITestBase { let expectation = self.expectation(description: #function) config.fetchAndActivate { status, error in XCTAssertEqual(status, .successFetchedFromRemote) - if let error = error { + if let error { XCTFail("Fetch and Activate Error \(error)") } XCTAssertEqual(self.config[Constants.key1].stringValue, Constants.value1) @@ -68,7 +68,7 @@ class APITests: APITestBase { func testUnchangedActivateWillFlag() { let expectation = self.expectation(description: #function) config.fetch { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -82,7 +82,7 @@ class APITests: APITestBase { waitForExpectations() let expectation2 = self.expectation(description: #function + "2") config.fetch { status, error in - if let error = error { + if let error { XCTFail("Fetch Error \(error)") } XCTAssertEqual(status, RemoteConfigFetchStatus.success) @@ -289,7 +289,7 @@ class APITests: APITestBase { let kTestTimeout = 10.0 waitForExpectations(timeout: kTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift b/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift index b4be53d8340..0e4df6e6e05 100644 --- a/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift +++ b/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift @@ -46,7 +46,7 @@ class RemoteConfigConsole { perform(configRequest: .get) { latestConfigJSON in config = latestConfigJSON } - if let config = config { + if let config { saveConfig(config) } return config @@ -210,8 +210,8 @@ class RemoteConfigConsole { /// Perform a synchronous sync with remote config console. private func syncWithConsole() { - if let consoleConfig = activeRemoteConfig { - latestConfig = consoleConfig + if let activeRemoteConfig { + latestConfig = activeRemoteConfig } else { fatalError("Could not sync with console.") } diff --git a/FirebaseSessions/Sources/GoogleDataTransport+GoogleDataTransportProtocol.swift b/FirebaseSessions/Sources/GoogleDataTransport+GoogleDataTransportProtocol.swift index ebc15e9f423..9c04f9c9ba2 100644 --- a/FirebaseSessions/Sources/GoogleDataTransport+GoogleDataTransportProtocol.swift +++ b/FirebaseSessions/Sources/GoogleDataTransport+GoogleDataTransportProtocol.swift @@ -29,7 +29,7 @@ protocol GoogleDataTransportProtocol { extension GDTCORTransport: GoogleDataTransportProtocol { func logGDTEvent(event: GDTCOREvent, completion: @escaping (Result) -> Void) { sendDataEvent(event) { wasWritten, error in - if let error = error { + if let error { completion(.failure(error)) } else if !wasWritten { completion(.failure(GoogleDataTransportProtocolErrors.writeFailure)) diff --git a/FirebaseSessions/Sources/Installations+InstallationsProtocol.swift b/FirebaseSessions/Sources/Installations+InstallationsProtocol.swift index fcbf1231d6c..38ca1eafa9b 100644 --- a/FirebaseSessions/Sources/Installations+InstallationsProtocol.swift +++ b/FirebaseSessions/Sources/Installations+InstallationsProtocol.swift @@ -50,7 +50,7 @@ extension InstallationsProtocol { workingGroup.enter() installationID { (installationID: String?, error: Error?) in - if let installationID = installationID { + if let installationID { intallationComplete = installationID } else if let error = error { errorComplete = error @@ -67,10 +67,10 @@ extension InstallationsProtocol { completion(.failure(FirebaseSessionsError.SessionInstallationsTimeOutError)) return default: - if let installationID = intallationComplete { - completion(.success((installationID, authTokenComplete))) - } else if let error = errorComplete { - completion(.failure(error)) + if let intallationComplete { + completion(.success((intallationComplete, authTokenComplete))) + } else if let errorComplete { + completion(.failure(errorComplete)) } } } diff --git a/FirebaseSessions/Sources/Settings/SettingsDownloadClient.swift b/FirebaseSessions/Sources/Settings/SettingsDownloadClient.swift index aaea90941dc..1d2a95a3cc5 100644 --- a/FirebaseSessions/Sources/Settings/SettingsDownloadClient.swift +++ b/FirebaseSessions/Sources/Settings/SettingsDownloadClient.swift @@ -56,7 +56,7 @@ class SettingsDownloader: SettingsDownloadClient { case let .success(installationsInfo): let request = self.buildRequest(url: validURL, fiid: installationsInfo.0) let task = URLSession.shared.dataTask(with: request) { data, response, error in - if let data = data { + if let data { if let dict = try? JSONSerialization.jsonObject(with: data) as? [String: Any] { completion(.success(dict)) } else { @@ -64,7 +64,7 @@ class SettingsDownloader: SettingsDownloadClient { .JSONParseError("Failed to parse JSON to dictionary") )) } - } else if let error = error { + } else if let error { completion(.failure(.URLSessionError(error.localizedDescription))) } } diff --git a/FirebaseStorage/Sources/Internal/StorageDeleteTask.swift b/FirebaseStorage/Sources/Internal/StorageDeleteTask.swift index 086e8facf14..04891ef5909 100644 --- a/FirebaseStorage/Sources/Internal/StorageDeleteTask.swift +++ b/FirebaseStorage/Sources/Internal/StorageDeleteTask.swift @@ -63,7 +63,7 @@ class StorageDeleteTask: StorageTask, StorageTaskManagement { self.fetcherCompletion = { [weak self] (data: Data?, error: NSError?) in guard let self = self else { return } - if let error = error, self.error == nil { + if let error, self.error == nil { self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) } self.taskCompletion?(self.error) diff --git a/FirebaseStorage/Sources/Internal/StorageGetDownloadURLTask.swift b/FirebaseStorage/Sources/Internal/StorageGetDownloadURLTask.swift index 72b50a11220..2cca8acdca2 100644 --- a/FirebaseStorage/Sources/Internal/StorageGetDownloadURLTask.swift +++ b/FirebaseStorage/Sources/Internal/StorageGetDownloadURLTask.swift @@ -64,12 +64,12 @@ class StorageGetDownloadURLTask: StorageTask, StorageTaskManagement { self.fetcherCompletion = { [weak self] (data: Data?, error: NSError?) in guard let self = self else { return } var downloadURL: URL? - if let error = error { + if let error { if self.error == nil { self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) } } else { - if let data = data, + if let data, let responseDictionary = try? JSONSerialization .jsonObject(with: data) as? [String: Any] { downloadURL = self.downloadURLFromMetadataDictionary(responseDictionary) diff --git a/FirebaseStorage/Sources/Internal/StorageGetMetadataTask.swift b/FirebaseStorage/Sources/Internal/StorageGetMetadataTask.swift index 40f65a7b5d8..5202394631a 100644 --- a/FirebaseStorage/Sources/Internal/StorageGetMetadataTask.swift +++ b/FirebaseStorage/Sources/Internal/StorageGetMetadataTask.swift @@ -65,12 +65,12 @@ class StorageGetMetadataTask: StorageTask, StorageTaskManagement { self.fetcherCompletion = { [weak self] (data: Data?, error: NSError?) in guard let self = self else { return } var metadata: StorageMetadata? - if let error = error { + if let error { if self.error == nil { self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) } } else { - if let data = data, + if let data, let responseDictionary = try? JSONSerialization .jsonObject(with: data) as? [String: AnyHashable] { metadata = StorageMetadata(dictionary: responseDictionary) diff --git a/FirebaseStorage/Sources/Internal/StorageListTask.swift b/FirebaseStorage/Sources/Internal/StorageListTask.swift index 94c872aae28..10b22d95b96 100644 --- a/FirebaseStorage/Sources/Internal/StorageListTask.swift +++ b/FirebaseStorage/Sources/Internal/StorageListTask.swift @@ -92,11 +92,11 @@ class StorageListTask: StorageTask, StorageTaskManagement { // items // to return per page. This removes the need to backfill results if Firebase Storage filters // objects that are considered invalid (such as items with two consecutive slashes). - if let pageSize = self.pageSize { + if let pageSize { queryParams["maxResults"] = "\(pageSize)" } - if let previousPageToken = self.previousPageToken { + if let previousPageToken { queryParams["pageToken"] = previousPageToken } @@ -116,10 +116,10 @@ class StorageListTask: StorageTask, StorageTaskManagement { self.fetcherCompletion = { [weak self] (data: Data?, error: NSError?) in guard let self = self else { return } var listResult: StorageListResult? - if let error = error, self.error == nil { + if let error, self.error == nil { self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) } else { - if let data = data, + if let data, let responseDictionary = try? JSONSerialization .jsonObject(with: data) as? [String: Any] { listResult = StorageListResult(with: responseDictionary, reference: self.reference) diff --git a/FirebaseStorage/Sources/Internal/StoragePath.swift b/FirebaseStorage/Sources/Internal/StoragePath.swift index d094771eca3..d27149af40e 100644 --- a/FirebaseStorage/Sources/Internal/StoragePath.swift +++ b/FirebaseStorage/Sources/Internal/StoragePath.swift @@ -135,7 +135,7 @@ class StoragePath: NSCopying, Equatable { init(with bucket: String, object: String? = nil) { self.bucket = bucket - if let object = object { + if let object { self.object = StoragePath.standardizedPathForString(object) } else { self.object = nil diff --git a/FirebaseStorage/Sources/Internal/StorageTokenAuthorizer.swift b/FirebaseStorage/Sources/Internal/StorageTokenAuthorizer.swift index f44ae26e793..217f8775116 100644 --- a/FirebaseStorage/Sources/Internal/StorageTokenAuthorizer.swift +++ b/FirebaseStorage/Sources/Internal/StorageTokenAuthorizer.swift @@ -38,7 +38,7 @@ class StorageTokenAuthorizer: NSObject, GTMSessionFetcherAuthorizer { var tokenError: NSError? let callbackQueue = fetcherService.callbackQueue ?? DispatchQueue.main let fetchTokenGroup = DispatchGroup() - if let auth = auth { + if let auth { fetchTokenGroup.enter() auth.getToken(forcingRefresh: false) { token, error in if let error = error as? NSError { @@ -51,14 +51,14 @@ class StorageTokenAuthorizer: NSObject, GTMSessionFetcherAuthorizer { tokenError = NSError(domain: "FIRStorageErrorDomain", code: StorageErrorCode.unauthenticated.rawValue, userInfo: errorDictionary) - } else if let token = token { + } else if let token { let firebaseToken = "Firebase \(token)" request?.setValue(firebaseToken, forHTTPHeaderField: "Authorization") } fetchTokenGroup.leave() } } - if let appCheck = appCheck { + if let appCheck { fetchTokenGroup.enter() appCheck.getToken(forcingRefresh: false) { tokenResult in request?.setValue(tokenResult.token, forHTTPHeaderField: "X-Firebase-AppCheck") diff --git a/FirebaseStorage/Sources/Internal/StorageUpdateMetadataTask.swift b/FirebaseStorage/Sources/Internal/StorageUpdateMetadataTask.swift index bc75c48e65c..dad1dcb4886 100644 --- a/FirebaseStorage/Sources/Internal/StorageUpdateMetadataTask.swift +++ b/FirebaseStorage/Sources/Internal/StorageUpdateMetadataTask.swift @@ -73,12 +73,12 @@ class StorageUpdateMetadataTask: StorageTask, StorageTaskManagement { self.fetcherCompletion = { [weak self] (data: Data?, error: NSError?) in guard let self = self else { return } var metadata: StorageMetadata? - if let error = error { + if let error { if self.error == nil { self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) } } else { - if let data = data, + if let data, let responseDictionary = try? JSONSerialization .jsonObject(with: data) as? [String: AnyHashable] { metadata = StorageMetadata(dictionary: responseDictionary) diff --git a/FirebaseStorage/Sources/Internal/StorageUtils.swift b/FirebaseStorage/Sources/Internal/StorageUtils.swift index 457a70aa4ec..1c0ea561eb0 100644 --- a/FirebaseStorage/Sources/Internal/StorageUtils.swift +++ b/FirebaseStorage/Sources/Internal/StorageUtils.swift @@ -38,7 +38,7 @@ class StorageUtils { components.host = reference.storage.host components.port = reference.storage.port - if let queryParams = queryParams { + if let queryParams { var queryItems = [URLQueryItem]() for (key, value) in queryParams { queryItems.append(URLQueryItem(name: key, value: value)) diff --git a/FirebaseStorage/Sources/Result.swift b/FirebaseStorage/Sources/Result.swift index d1260fe57f9..931794cbfb1 100644 --- a/FirebaseStorage/Sources/Result.swift +++ b/FirebaseStorage/Sources/Result.swift @@ -26,9 +26,9 @@ private func getResultCallback(completion: @escaping (Result) -> Vo _: Error?) -> Void { return { (value: T?, error: Error?) in - if let value = value { + if let value { completion(.success(value)) - } else if let error = error { + } else if let error { completion(.failure(StorageError.swiftConvert(objcError: error as NSError))) } else { completion(.failure(StorageError.internalError("Internal failure in getResultCallback"))) diff --git a/FirebaseStorage/Sources/StorageDownloadTask.swift b/FirebaseStorage/Sources/StorageDownloadTask.swift index 62217182c0e..8f9f0332393 100644 --- a/FirebaseStorage/Sources/StorageDownloadTask.swift +++ b/FirebaseStorage/Sources/StorageDownloadTask.swift @@ -116,7 +116,7 @@ open class StorageDownloadTask: StorageObservableTask, StorageTaskManagement { request.url = components?.url var fetcher: GTMSessionFetcher - if let resumeData = resumeData { + if let resumeData { fetcher = GTMSessionFetcher(downloadResumeData: resumeData) fetcher.comment = "Resuming DownloadTask" } else { @@ -125,7 +125,7 @@ open class StorageDownloadTask: StorageObservableTask, StorageTaskManagement { } fetcher.maxRetryInterval = self.reference.storage.maxDownloadRetryInterval - if let fileURL = self.fileURL { + if let fileURL { // Handle file downloads fetcher.destinationFileURL = fileURL fetcher.downloadProgressBlock = { [weak self] (bytesWritten: Int64, @@ -163,7 +163,7 @@ open class StorageDownloadTask: StorageObservableTask, StorageTaskManagement { self.fire(for: .progress, snapshot: self.snapshot) // Handle potential issues with download - if let error = error { + if let error { self.state = .failed self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) self.fire(for: .failure, snapshot: self.snapshot) @@ -171,7 +171,7 @@ open class StorageDownloadTask: StorageObservableTask, StorageTaskManagement { } // Download completed successfully, fire completion callbacks self.state = .success - if let data = data { + if let data { self.downloadData = data } self.fire(for: .success, snapshot: self.snapshot) diff --git a/FirebaseStorage/Sources/StorageError.swift b/FirebaseStorage/Sources/StorageError.swift index 866e07a32cf..68543f50aba 100644 --- a/FirebaseStorage/Sources/StorageError.swift +++ b/FirebaseStorage/Sources/StorageError.swift @@ -76,7 +76,7 @@ public let StorageErrorDomain: String = "FIRStorageErrorDomain" */ static func error(withInvalidRequest request: Data?) -> NSError { var requestString: String - if let request = request { + if let request { requestString = String(data: request, encoding: .utf8) ?? "" } else { requestString = "" diff --git a/FirebaseStorage/Sources/StorageReference.swift b/FirebaseStorage/Sources/StorageReference.swift index d3d45d6e2df..92a547b3f14 100644 --- a/FirebaseStorage/Sources/StorageReference.swift +++ b/FirebaseStorage/Sources/StorageReference.swift @@ -286,7 +286,7 @@ import Foundation queue: storage.dispatchQueue, file: fileURL) - if let completion = completion { + if let completion { task.completionURL = completion let callbackQueue = fetcherService.callbackQueue ?? DispatchQueue.main @@ -330,7 +330,7 @@ import Foundation var paginatedCompletion: ((_: StorageListResult?, _: Error?) -> Void)? paginatedCompletion = { (_ listResult: StorageListResult?, _ error: Error?) in - if let error = error { + if let error { completion(nil, error) return } @@ -531,7 +531,7 @@ import Foundation open func delete() async throws { return try await withCheckedThrowingContinuation { continuation in self.delete { error in - if let error = error { + if let error { continuation.resume(throwing: error) } else { continuation.resume() @@ -595,7 +595,7 @@ import Foundation private func startAndObserveUploadTask(task: StorageUploadTask, completion: ((_: StorageMetadata?, _: Error?) -> Void)?) { - if let completion = completion { + if let completion { task.completionMetadata = completion let callbackQueue = storage.fetcherServiceForApp.callbackQueue ?? DispatchQueue.main diff --git a/FirebaseStorage/Sources/StorageUploadTask.swift b/FirebaseStorage/Sources/StorageUploadTask.swift index 0d1e904661f..8c99e8c4a28 100644 --- a/FirebaseStorage/Sources/StorageUploadTask.swift +++ b/FirebaseStorage/Sources/StorageUploadTask.swift @@ -87,10 +87,10 @@ import Foundation chunkSize: self.reference.storage.uploadChunkSizeBytes, fetcherService: self.fetcherService ) - if let data = self.uploadData { - uploadFetcher.uploadData = data + if let uploadData { + uploadFetcher.uploadData = uploadData uploadFetcher.comment = "Data UploadTask" - } else if let fileURL = self.fileURL { + } else if let fileURL { uploadFetcher.uploadFileURL = fileURL uploadFetcher.comment = "File UploadTask" @@ -120,7 +120,7 @@ import Foundation self.fire(for: .progress, snapshot: self.snapshot) // Handle potential issues with upload - if let error = error { + if let error { self.state = .failed self.error = StorageErrorCode.error(withServerError: error, ref: self.reference) self.metadata = self.uploadMetadata diff --git a/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift b/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift index fafdb21906c..f8729a5b675 100644 --- a/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift +++ b/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift @@ -413,7 +413,7 @@ class StorageAsyncAwait: StorageIntegrationCommon { let kTestTimeout = 60.0 waitForExpectations(timeout: kTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseStorage/Tests/Integration/StorageIntegration.swift b/FirebaseStorage/Tests/Integration/StorageIntegration.swift index 980ab243108..2f407dc7427 100644 --- a/FirebaseStorage/Tests/Integration/StorageIntegration.swift +++ b/FirebaseStorage/Tests/Integration/StorageIntegration.swift @@ -847,7 +847,7 @@ class StorageResultTests: StorageIntegrationCommon { let kFIRStorageIntegrationTestTimeout = 100.0 waitForExpectations(timeout: kFIRStorageIntegrationTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseStorage/Tests/Integration/StorageIntegrationCommon.swift b/FirebaseStorage/Tests/Integration/StorageIntegrationCommon.swift index 47c4fb6f37c..2cc09981167 100644 --- a/FirebaseStorage/Tests/Integration/StorageIntegrationCommon.swift +++ b/FirebaseStorage/Tests/Integration/StorageIntegrationCommon.swift @@ -101,7 +101,7 @@ class StorageIntegrationCommon: XCTestCase { let kTestTimeout = 60.0 waitForExpectations(timeout: kTestTimeout, handler: { error in - if let error = error { + if let error { print(error) } }) diff --git a/FirebaseStorage/Tests/Unit/StorageTestHelpers.swift b/FirebaseStorage/Tests/Unit/StorageTestHelpers.swift index 737be5e6acf..9d6b906d0f1 100644 --- a/FirebaseStorage/Tests/Unit/StorageTestHelpers.swift +++ b/FirebaseStorage/Tests/Unit/StorageTestHelpers.swift @@ -45,7 +45,7 @@ class StorageTestHelpers: XCTestCase { func waitForExpectation(test: XCTest) { waitForExpectations(timeout: 10) { error in - if let error = error { + if let error { print("Error \(error)") } } @@ -54,7 +54,7 @@ class StorageTestHelpers: XCTestCase { func successBlock(withMetadata metadata: StorageMetadata? = nil) -> GTMSessionFetcherTestBlock { var data: Data? - if let metadata = metadata { + if let metadata { data = try? JSONSerialization.data(withJSONObject: metadata.dictionaryRepresentation()) } return block(forData: data, url: nil, statusCode: 200) @@ -99,7 +99,7 @@ class StorageTestHelpers: XCTestCase { statusCode code: Int) -> GTMSessionFetcherTestBlock { let block = { (fetcher: GTMSessionFetcher, response: GTMSessionFetcherTestResponse) in let fetcherURL = fetcher.request?.url! - if let url = url { + if let url { XCTAssertEqual(url, fetcherURL) } let httpResponse = HTTPURLResponse( @@ -111,7 +111,7 @@ class StorageTestHelpers: XCTestCase { var error: NSError? if code >= 400 { var userInfo: [String: Any]? - if let data = data { + if let data { userInfo = ["data": data] } error = NSError(domain: "com.google.HTTPStatus", code: code, userInfo: userInfo) diff --git a/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift index 1ea3bc3b467..7fb8e307e03 100644 --- a/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/CollectionReference+AsyncAwait.swift @@ -33,8 +33,8 @@ public extension CollectionReference { return try await withCheckedThrowingContinuation { continuation in var document: DocumentReference? document = self.addDocument(data: data) { error in - if let err = error { - continuation.resume(throwing: err) + if let error { + continuation.resume(throwing: error) } else { // Our callbacks guarantee that we either return an error or a document. continuation.resume(returning: document!) diff --git a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift index eaf29e42937..e85ca9a9791 100644 --- a/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift +++ b/Firestore/Swift/Source/AsyncAwait/Firestore+AsyncAwait.swift @@ -31,8 +31,8 @@ public extension Firestore { func loadBundle(_ bundleData: Data) async throws -> LoadBundleTaskProgress { return try await withCheckedThrowingContinuation { continuation in self.loadBundle(bundleData) { progress, error in - if let err = error { - continuation.resume(throwing: err) + if let error { + continuation.resume(throwing: error) } else { // Our callbacks guarantee that we either return an error or a progress event. continuation.resume(returning: progress!) @@ -49,8 +49,8 @@ public extension Firestore { func loadBundle(_ bundleStream: InputStream) async throws -> LoadBundleTaskProgress { return try await withCheckedThrowingContinuation { continuation in self.loadBundle(bundleStream) { progress, error in - if let err = error { - continuation.resume(throwing: err) + if let error { + continuation.resume(throwing: error) } else { // Our callbacks guarantee that we either return an error or a progress event. continuation.resume(returning: progress!) @@ -107,8 +107,8 @@ public extension Firestore { // See https://github.com/firebase/firebase-ios-sdk/issues/9426 for more details. return try await withCheckedThrowingContinuation { continuation in self.runTransaction(updateBlock) { anyValue, error in - if let err = error { - continuation.resume(throwing: err) + if let error { + continuation.resume(throwing: error) } else { continuation.resume(returning: anyValue) } diff --git a/Firestore/Swift/Source/Codable/DocumentID.swift b/Firestore/Swift/Source/Codable/DocumentID.swift index 1196b0a91bf..9ec6dbb4a9d 100644 --- a/Firestore/Swift/Source/Codable/DocumentID.swift +++ b/Firestore/Swift/Source/Codable/DocumentID.swift @@ -113,7 +113,7 @@ public struct DocumentID: private var value: Value? = nil public init(wrappedValue value: Value?) { - if let value = value { + if let value { logIgnoredValueWarning(value: value) } self.value = value @@ -141,7 +141,7 @@ public struct DocumentID: extension DocumentID: DocumentIDProtocol { init(from documentReference: DocumentReference?) throws { - if let documentReference = documentReference { + if let documentReference { value = try Value.wrap(documentReference) } else { value = nil diff --git a/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift b/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift index 59563cf11a9..574b5417dab 100644 --- a/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift +++ b/Firestore/Swift/Source/Codable/DocumentReference+Codable.swift @@ -33,7 +33,7 @@ private protocol CodableDocumentReference: Codable {} /** - * DocumentReference's codable implmentation will just throw for most + * DocumentReference's codable implementation will just throw for most * encoder/decoder however. It is only meant to be encoded by Firestore.Encoder/Firestore.Decoder. */ extension CodableDocumentReference { diff --git a/Firestore/Swift/Source/Codable/EncoderDecoder.swift b/Firestore/Swift/Source/Codable/EncoderDecoder.swift index 43c3b71f378..29b0e57caab 100644 --- a/Firestore/Swift/Source/Codable/EncoderDecoder.swift +++ b/Firestore/Swift/Source/Codable/EncoderDecoder.swift @@ -93,7 +93,7 @@ public extension Firestore { public func decode(_ t: T.Type, from data: Any, in reference: DocumentReference?) throws -> T { - if let reference = reference { + if let reference { userInfo[CodingUserInfoKey.documentRefUserInfoKey] = reference } return try decode(T.self, from: data) diff --git a/Firestore/Swift/Source/Codable/ExplicitNull.swift b/Firestore/Swift/Source/Codable/ExplicitNull.swift index a8590d34f05..615fab9698a 100644 --- a/Firestore/Swift/Source/Codable/ExplicitNull.swift +++ b/Firestore/Swift/Source/Codable/ExplicitNull.swift @@ -47,7 +47,7 @@ extension ExplicitNull: Hashable where Value: Hashable {} extension ExplicitNull: Encodable where Value: Encodable { public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() - if let value = value { + if let value { try container.encode(value) } else { try container.encodeNil() diff --git a/Firestore/Swift/Source/Codable/ServerTimestamp.swift b/Firestore/Swift/Source/Codable/ServerTimestamp.swift index 94857811a00..ed95fef97b2 100644 --- a/Firestore/Swift/Source/Codable/ServerTimestamp.swift +++ b/Firestore/Swift/Source/Codable/ServerTimestamp.swift @@ -98,7 +98,7 @@ public struct ServerTimestamp: Codable public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() - if let value = value { + if let value { try container.encode(Value.unwrap(value)) } else { try container.encode(FieldValue.serverTimestamp()) diff --git a/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift b/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift index da0f0a842d7..de3716856bc 100644 --- a/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift +++ b/Firestore/Swift/Source/PropertyWrapper/FirestoreQuery.swift @@ -55,7 +55,7 @@ public enum DecodingFailureStrategy { /// /// `FirestoreQuery` also supports returning a `Result` type. The `.success` case /// returns an array of elements, whereas the `.failure` case returns an error -/// in case mapping the Firestore docments wasn't successful: +/// in case mapping the Firestore documents wasn't successful: /// /// struct ContentView: View { /// @FirestoreQuery( @@ -135,7 +135,7 @@ public struct FirestoreQuery: DynamicProperty { /// If any errors occurred, they will be exposed here as well. public var error: Error? - /// The type of animation to apply when updating the view. If this is ommitted then no + /// The type of animation to apply when updating the view. If this is omitted then no /// animations are fired. public var animation: Animation? } diff --git a/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift b/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift index 159e379eb54..8e4c9280e87 100644 --- a/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift +++ b/Firestore/Swift/Source/PropertyWrapper/FirestoreQueryObservable.swift @@ -47,7 +47,7 @@ class FirestoreQueryObservable: ObservableObject { self.configuration = configuration setupListener = createListener { [weak self] querySnapshot, error in guard let self = self else { return } - if let error = error { + if let error { self.animated { self.items = [] self.projectError(error) @@ -104,7 +104,7 @@ class FirestoreQueryObservable: ObservableObject { self.configuration = configuration setupListener = createListener { [weak self] querySnapshot, error in guard let self = self else { return } - if let error = error { + if let error { self.animated { self.items = .failure(error) self.projectError(error) diff --git a/Firestore/Swift/Tests/API/BasicCompileTests.swift b/Firestore/Swift/Tests/API/BasicCompileTests.swift index 42895d121e5..5723a63ea08 100644 --- a/Firestore/Swift/Tests/API/BasicCompileTests.swift +++ b/Firestore/Swift/Tests/API/BasicCompileTests.swift @@ -143,7 +143,7 @@ func writeDocument(at docRef: DocumentReference) { // Completion callback (via trailing closure syntax). docRef.setData(setData) { error in - if let error = error { + if let error { print("Uh oh! \(error)") return } @@ -154,7 +154,7 @@ func writeDocument(at docRef: DocumentReference) { // merge docRef.setData(setData, merge: true) docRef.setData(setData, merge: true) { error in - if let error = error { + if let error { print("Uh oh! \(error)") return } @@ -166,7 +166,7 @@ func writeDocument(at docRef: DocumentReference) { docRef.delete() docRef.delete { error in - if let error = error { + if let error { print("Uh oh! \(error)") return } @@ -178,15 +178,15 @@ func writeDocument(at docRef: DocumentReference) { func enableDisableNetwork(database db: Firestore) { // closure syntax db.disableNetwork(completion: { error in - if let e = error { - print("Uh oh! \(e)") + if let error { + print("Uh oh! \(error)") return } }) // trailing block syntax db.enableNetwork { error in - if let e = error { - print("Uh oh! \(e)") + if let error { + print("Uh oh! \(error)") return } } @@ -194,8 +194,8 @@ func enableDisableNetwork(database db: Firestore) { func clearPersistence(database db: Firestore) { db.clearPersistence { error in - if let e = error { - print("Uh oh! \(e)") + if let error { + print("Uh oh! \(error)") return } } @@ -217,7 +217,7 @@ func writeDocuments(at docRef: DocumentReference, database db: Firestore) { batch.setData(["c": "d"], forDocument: docRef) // commit with completion callback via trailing closure syntax. batch.commit { error in - if let error = error { + if let error { print("Uh oh! \(error)") return } @@ -235,7 +235,7 @@ func addDocument(to collectionRef: CollectionReference) { func readDocument(at docRef: DocumentReference) { // Trailing closure syntax. docRef.getDocument { document, error in - if let document = document { + if let document { // Note that both document and document.data() is nullable. if let data = document.data() { print("Read document: \(data)") @@ -253,7 +253,7 @@ func readDocument(at docRef: DocumentReference) { if let foo = document["foo"] { print("Field: \(foo)") } - } else if let error = error { + } else if let error { // New way to handle errors. switch error { case FirestoreErrorCode.unavailable: @@ -322,12 +322,12 @@ func readDocumentsWithSource(matching query: Query) { func listenToDocument(at docRef: DocumentReference) { let listener = docRef.addSnapshotListener { document, error in - if let error = error { + if let error { print("Uh oh! Listen canceled: \(error)") return } - if let document = document { + if let document { // Note that document.data() is nullable. if let data: [String: Any] = document.data() { print("Current document: \(data)") @@ -346,7 +346,7 @@ func listenToDocument(at docRef: DocumentReference) { func listenToDocumentWithMetadataChanges(at docRef: DocumentReference) { let listener = docRef.addSnapshotListener(includeMetadataChanges: true) { document, _ in - if let document = document { + if let document { if document.metadata.hasPendingWrites { print("Has pending writes") } @@ -359,12 +359,12 @@ func listenToDocumentWithMetadataChanges(at docRef: DocumentReference) { func listenToDocuments(matching query: Query) { let listener = query.addSnapshotListener { snap, error in - if let error = error { + if let error { print("Uh oh! Listen canceled: \(error)") return } - if let snap = snap { + if let snap { print("NEW SNAPSHOT (empty=\(snap.isEmpty) count=\(snap.count)") // TODO(mikelehen): Figure out how to make "for..in" syntax work @@ -383,7 +383,7 @@ func listenToDocuments(matching query: Query) { func listenToQueryDiffs(onQuery query: Query) { let listener = query.addSnapshotListener { snap, _ in - if let snap = snap { + if let snap { for change in snap.documentChanges { switch change.type { case .added: @@ -403,7 +403,7 @@ func listenToQueryDiffs(onQuery query: Query) { func listenToQueryDiffsWithMetadata(onQuery query: Query) { let listener = query.addSnapshotListener(includeMetadataChanges: true) { snap, _ in - if let snap = snap { + if let snap { for change in snap.documentChanges(includeMetadataChanges: true) { switch change.type { case .added: @@ -470,8 +470,8 @@ func types() { func waitForPendingWrites(database db: Firestore) { db.waitForPendingWrites { error in - if let e = error { - print("Uh oh! \(e)") + if let error { + print("Uh oh! \(error)") return } } @@ -486,8 +486,8 @@ func addSnapshotsInSyncListener(database db: Firestore) { func terminateDb(database db: Firestore) { db.terminate { error in - if let e = error { - print("Uh oh! \(e)") + if let error { + print("Uh oh! \(error)") return } } diff --git a/Firestore/Swift/Tests/Codable/FirestoreEncoderTests.swift b/Firestore/Swift/Tests/Codable/FirestoreEncoderTests.swift index 601b2bab46b..7fd5031384c 100644 --- a/Firestore/Swift/Tests/Codable/FirestoreEncoderTests.swift +++ b/Firestore/Swift/Tests/Codable/FirestoreEncoderTests.swift @@ -670,7 +670,7 @@ private class DictionarySubject { init(_ subject: [String: Any], in documentName: String? = nil, file: StaticString, line: UInt) { self.subject = subject - if let documentName = documentName { + if let documentName { document = FSTTestDocRef(documentName) } self.file = file @@ -717,7 +717,7 @@ extension String: ServerTimestampWrappable { public static func unwrap(_ value: Self) throws -> Timestamp { let date = formatter.date(from: value) - if let date = date { + if let date { return Timestamp(date: date) } else { throw DateError.invalidDate(value) diff --git a/Firestore/Swift/Tests/Integration/CodableIntegrationTests.swift b/Firestore/Swift/Tests/Integration/CodableIntegrationTests.swift index c6d01a63e98..7f91110ea17 100644 --- a/Firestore/Swift/Tests/Integration/CodableIntegrationTests.swift +++ b/Firestore/Swift/Tests/Integration/CodableIntegrationTests.swift @@ -36,18 +36,18 @@ class CodableIntegrationTests: FSTIntegrationTestCase { switch flavor { case .docRef: - if let merge = merge { + if let merge { try doc.setData(from: value, merge: merge, completion: completion) - } else if let mergeFields = mergeFields { + } else if let mergeFields { try doc.setData(from: value, mergeFields: mergeFields, completion: completion) } else { try doc.setData(from: value, completion: completion) } case .writeBatch: - if let merge = merge { + if let merge { try doc.firestore.batch().setData(from: value, forDocument: doc, merge: merge) .commit(completion: completion) - } else if let mergeFields = mergeFields { + } else if let mergeFields { try doc.firestore.batch().setData(from: value, forDocument: doc, mergeFields: mergeFields) .commit(completion: completion) } else { @@ -57,9 +57,9 @@ class CodableIntegrationTests: FSTIntegrationTestCase { case .transaction: doc.firestore.runTransaction({ transaction, errorPointer -> Any? in do { - if let merge = merge { + if let merge { try transaction.setData(from: value, forDocument: doc, merge: merge) - } else if let mergeFields = mergeFields { + } else if let mergeFields { try transaction.setData(from: value, forDocument: doc, mergeFields: mergeFields) } else { try transaction.setData(from: value, forDocument: doc) From e1e1b9349e70853d8316b6967067fbcd237b0eb8 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Sat, 4 May 2024 07:13:28 -0700 Subject: [PATCH 06/13] Stop CI on Swift podspecs (#12895) --- .github/workflows/analytics.yml | 2 -- .github/workflows/database.yml | 2 +- .github/workflows/firestore.yml | 2 -- .github/workflows/inappmessaging.yml | 2 +- .github/workflows/remoteconfig.yml | 2 +- scripts/health_metrics/file_patterns.json | 10 +++++----- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/analytics.yml b/.github/workflows/analytics.yml index 0c6c12f98c0..90ef6121902 100644 --- a/.github/workflows/analytics.yml +++ b/.github/workflows/analytics.yml @@ -42,8 +42,6 @@ jobs: run: scripts/third_party/travis/retry.sh pod spec lint GoogleAppMeasurement.podspec --platforms=${{ matrix.target }} --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/ - name: FirebaseAnalytics run: scripts/third_party/travis/retry.sh pod spec lint FirebaseAnalytics.podspec --platforms=${{ matrix.target }} --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/ - - name: FirebaseAnalyticsSwift - run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAnalyticsSwift.podspec --allow-warnings --platforms=${{ matrix.target }} # The following steps are only run on `ios` due to product availability. - name: GoogleAppMeasurementOnDeviceConversion run: scripts/third_party/travis/retry.sh pod spec lint GoogleAppMeasurementOnDeviceConversion.podspec --platforms=ios --sources=https://github.com/firebase/SpecsDev.git,https://github.com/firebase/SpecsStaging.git,https://cdn.cocoapods.org/ diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 309c80ffbc0..698f52ea6b4 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -135,7 +135,7 @@ jobs: runs-on: macos-14 strategy: matrix: - podspec: [FirebaseDatabase.podspec, FirebaseDatabaseSwift.podspec --allow-warnings] + podspec: [FirebaseDatabase.podspec] target: [ios, tvos, macos] flags: [ '--skip-tests --use-static-frameworks' diff --git a/.github/workflows/firestore.yml b/.github/workflows/firestore.yml index ccf74fc36cb..d74f6585955 100644 --- a/.github/workflows/firestore.yml +++ b/.github/workflows/firestore.yml @@ -362,7 +362,6 @@ jobs: podspec: [ 'FirebaseFirestoreInternal.podspec', 'FirebaseFirestore.podspec', - 'FirebaseFirestoreSwift.podspec', ] steps: @@ -391,7 +390,6 @@ jobs: podspec: [ 'FirebaseFirestoreInternal.podspec', 'FirebaseFirestore.podspec', - 'FirebaseFirestoreSwift.podspec', ] platforms: [ 'macos', diff --git a/.github/workflows/inappmessaging.yml b/.github/workflows/inappmessaging.yml index 918563e9213..efec2295431 100644 --- a/.github/workflows/inappmessaging.yml +++ b/.github/workflows/inappmessaging.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: - podspec: [FirebaseInAppMessaging.podspec, FirebaseInAppMessagingSwift.podspec --allow-warnings] + podspec: [FirebaseInAppMessaging.podspec] os: [macos-14, macos-13] include: - os: macos-14 diff --git a/.github/workflows/remoteconfig.yml b/.github/workflows/remoteconfig.yml index 9bb193a529d..9976accbb47 100644 --- a/.github/workflows/remoteconfig.yml +++ b/.github/workflows/remoteconfig.yml @@ -60,7 +60,7 @@ jobs: matrix: # TODO: macos tests are blocked by https://github.com/erikdoe/ocmock/pull/532 target: [ios, tvos, macos --skip-tests, watchos] - podspec: [FirebaseRemoteConfig.podspec, FirebaseRemoteConfigSwift.podspec --allow-warnings --skip-tests] + podspec: [FirebaseRemoteConfig.podspec] os: [macos-14, macos-13] include: - os: macos-14 diff --git a/scripts/health_metrics/file_patterns.json b/scripts/health_metrics/file_patterns.json index cb56eb0707f..cfda46156e5 100644 --- a/scripts/health_metrics/file_patterns.json +++ b/scripts/health_metrics/file_patterns.json @@ -10,7 +10,7 @@ }, { "sdk": "analytics", - "podspecs": ["FirebaseAnalytics.podspec", "FirebaseAnalyticsSwift.podspec", "GoogleAppMeasurement.podspec"], + "podspecs": ["FirebaseAnalytics.podspec", "GoogleAppMeasurement.podspec"], "filePatterns": [ "^FirebaseAnalytics.*", "^GoogleAppMeasurement.*" @@ -58,7 +58,7 @@ }, { "sdk": "database", - "podspecs": ["FirebaseDatabase.podspec", "FirebaseDatabaseSwift.podspec"], + "podspecs": ["FirebaseDatabase.podspec"], "filePatterns": [ "^FirebaseDatabase.*", "\\.github/workflows/database\\.yml", @@ -85,7 +85,7 @@ }, { "sdk": "firestore", - "podspecs": ["FirebaseFirestore.podspec", "FirebaseFirestoreSwift.podspec"], + "podspecs": ["FirebaseFirestore.podspec"], "filePatterns": [ "^Firestore/.*", "FirebaseAppCheck/Interop/[^/]+\\.h", @@ -117,7 +117,7 @@ }, { "sdk": "inappmessaging", - "podspecs": ["FirebaseInAppMessaging.podspec", "FirebaseInAppMessagingSwift.podspec"], + "podspecs": ["FirebaseInAppMessaging.podspec"], "filePatterns": [ "^FirebaseInAppMessaging.*", "Interop/Analytics/Public/[^/]+\\.h", @@ -160,7 +160,7 @@ }, { "sdk": "remoteconfig", - "podspecs": ["FirebaseRemoteConfig.podspec", "FirebaseRemoteConfigSwift.podspec"], + "podspecs": ["FirebaseRemoteConfig.podspec"], "filePatterns": [ "^FirebaseRemoteConfig.*", "Interop/Analytics/Public/[^/]+\\.h", From b414bfc0d231212e49b1061f042c14cb7d443fa1 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Mon, 6 May 2024 20:22:23 -0400 Subject: [PATCH 07/13] [Release Tooling] Add functionality to build dynamic frameworks (#12890) --- .github/workflows/zip.yml | 42 ++++++++++----- .../Sources/ZipBuilder/FrameworkBuilder.swift | 46 ++-------------- .../Sources/ZipBuilder/ZipBuilder.swift | 52 ++++++++++++++++++- scripts/build_zip.sh | 38 ++++++++++---- 4 files changed, 110 insertions(+), 68 deletions(-) diff --git a/.github/workflows/zip.yml b/.github/workflows/zip.yml index ef41e52a963..606a1acdc39 100644 --- a/.github/workflows/zip.yml +++ b/.github/workflows/zip.yml @@ -43,7 +43,9 @@ jobs: run: | mkdir -p release_zip_dir sh -x scripts/build_zip.sh release_zip_dir \ - "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" + "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git' }}" \ + build-release \ + static - uses: actions/upload-artifact@v4 with: name: Firebase-release-zip-zip @@ -68,6 +70,9 @@ jobs: # Don't run on private repo. if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' needs: build + strategy: + matrix: + linking_type: [static, dynamic] runs-on: macos-14 steps: - uses: actions/checkout@v4 @@ -84,10 +89,11 @@ jobs: mkdir -p zip_output_dir sh -x scripts/build_zip.sh \ zip_output_dir "${{ github.event.inputs.custom_spec_repos || 'https://github.com/firebase/SpecsStaging.git,https://github.com/firebase/SpecsDev.git' }}" \ - build-head + build-head \ + ${{ matrix.linking_type }} - uses: actions/upload-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.linking_type == 'static' && 'Firebase-actions-dir' || 'Firebase-actions-dir-dynamic' }} # Zip the entire output directory since the builder adds subdirectories we don't know the # name of. path: zip_output_dir @@ -103,6 +109,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -114,7 +121,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -164,6 +171,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -175,7 +183,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -217,6 +225,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -228,7 +237,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -268,6 +277,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -279,7 +289,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -343,6 +353,7 @@ jobs: matrix: os: [macos-13] xcode: [Xcode_15.2] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources. # - os: macos-13 # xcode: Xcode_15.2 @@ -352,7 +363,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -396,6 +407,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -407,7 +419,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -456,6 +468,7 @@ jobs: # matrix: # # TODO: Building FirebaseUI fails on Xcode 15 because it needs to sign the resources. # os: [macos-13] + # artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] # xcode: [Xcode_15.2] # runs-on: ${{ matrix.os }} # steps: @@ -463,7 +476,7 @@ jobs: # - name: Get framework dir # uses: actions/download-artifact@v4 # with: - # name: Firebase-actions-dir + # name: ${{ matrix.artifact }} # - uses: ruby/setup-ruby@v1 # - name: Setup Bundler # run: ./scripts/setup_bundler.sh @@ -536,6 +549,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -547,7 +561,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -592,6 +606,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -603,7 +618,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh @@ -647,6 +662,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14] + artifact: [Firebase-actions-dir, Firebase-actions-dir-dynamic] include: - os: macos-13 xcode: Xcode_15.2 @@ -658,7 +674,7 @@ jobs: - name: Get framework dir uses: actions/download-artifact@v4 with: - name: Firebase-actions-dir + name: ${{ matrix.artifact }} - uses: ruby/setup-ruby@v1 - name: Setup Bundler run: ./scripts/setup_bundler.sh diff --git a/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift b/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift index 144459bf90e..cd87fd3272e 100755 --- a/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift +++ b/ReleaseTooling/Sources/ZipBuilder/FrameworkBuilder.swift @@ -306,18 +306,14 @@ struct FrameworkBuilder { logsDir: URL) -> [URL] { // xcframework doesn't lipo things together but accepts fat frameworks for one target. // We group architectures here to deal with this fact. - var thinFrameworks = [URL]() - for targetPlatform in TargetPlatform.allCases { - let buildDir = projectDir.appendingPathComponent(targetPlatform.buildName) - let slicedFramework = buildSlicedFramework( - withName: FrameworkBuilder.frameworkBuildName(framework), + return targetPlatforms.map { targetPlatform in + buildSlicedFramework( + withName: framework, targetPlatform: targetPlatform, - buildDir: buildDir, + buildDir: projectDir.appendingPathComponent(targetPlatform.buildName), logRoot: logsDir ) - thinFrameworks.append(slicedFramework) } - return thinFrameworks } /// Compiles the specified framework in a temporary directory and writes the build logs to file. @@ -565,17 +561,6 @@ struct FrameworkBuilder { "\(framework): \(error)") } - // CocoaPods creates a `_CodeSignature` directory. Delete it. - // Note that the build only produces a `_CodeSignature` directory for - // macOS and macCatalyst, but we try to delete it for other platforms - // just in case it were to appear. - let codeSignatureDir = platformFrameworkDir - .appendingPathComponent( - platform == .catalyst || platform == .macOS ? "Versions/A/" : "" - ) - .appendingPathComponent("_CodeSignature") - try? fileManager.removeItem(at: codeSignatureDir) - // The minimum OS version is set to 100.0 to work around b/327020913. // TODO(ncooke3): Revert this logic once b/327020913 is fixed. // TODO(ncooke3): Does this need to happen on macOS? @@ -604,23 +589,6 @@ struct FrameworkBuilder { ) } - // The macOS slice's `PrivateHeaders` directory may have a - // `PrivateHeaders` file in it that symbolically links to nowhere. Delete - // it here to avoid putting it in the zip or crashing the Carthage hash - // generation. Because this will throw an error for cases where the file - // does not exist, the error is ignored. - let privateHeadersDir = platformFrameworkDir.appendingPathComponent("PrivateHeaders") - if fileManager.directoryExists(at: privateHeadersDir.resolvingSymlinksInPath()) { - try? fileManager - .removeItem(at: privateHeadersDir.resolvingSymlinksInPath() - .appendingPathComponent("PrivateHeaders")) - } else { - try? fileManager.removeItem(at: privateHeadersDir) - } - let headersDir = platformFrameworkDir.appendingPathComponent("Headers") - .resolvingSymlinksInPath() - try? fileManager.removeItem(at: headersDir.appendingPathComponent("Headers")) - // Move privacy manifest containing resource bundles into the framework. let resourceDir = platformFrameworkDir .appendingPathComponent( @@ -638,12 +606,6 @@ struct FrameworkBuilder { // Bundles are moved rather than copied to prevent them from being // packaged in a `Resources` directory at the root of the xcframework. .forEach { - // Delete `gRPCCertificates-Cpp.bundle` since it is not needed (#9184). - guard $0.lastPathComponent != "gRPCCertificates-Cpp.bundle" else { - try fileManager.removeItem(at: $0) - return - } - try fileManager.moveItem( at: $0, to: resourceDir.appendingPathComponent($0.lastPathComponent) diff --git a/ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift b/ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift index 2b0b1de7720..992ed2e9d89 100644 --- a/ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift +++ b/ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift @@ -277,7 +277,8 @@ struct ZipBuilder { for groupedFramework in groupedFrameworks { let name = groupedFramework.key let xcframework = FrameworkBuilder.makeXCFramework(withName: name, - frameworks: groupedFramework.value, + frameworks: postProcessFrameworks(groupedFramework + .value), xcframeworksDir: xcframeworksDir, resourceContents: resources[name]) xcframeworks[name] = [xcframework] @@ -299,13 +300,60 @@ struct ZipBuilder { let carthageGoogleUtilitiesXcframework = FrameworkBuilder.makeXCFramework( withName: "GoogleUtilities", - frameworks: carthageGoogleUtilitiesFrameworks, + frameworks: postProcessFrameworks(carthageGoogleUtilitiesFrameworks), xcframeworksDir: xcframeworksCarthageDir, resourceContents: nil ) return (podsBuilt, xcframeworks, carthageGoogleUtilitiesXcframework) } + func postProcessFrameworks(_ frameworks: [URL]) -> [URL] { + for framework in frameworks { + // CocoaPods creates a `_CodeSignature` directory. Delete it. + // Note that the build only produces a `_CodeSignature` directory for + // macOS and macCatalyst (`Versions/A/`), but we try to delete it for + // other platforms just in case it were to appear. + for path in ["", "Versions/A/"] { + let codeSignatureDir = framework + .appendingPathComponent(path) + .appendingPathComponent("_CodeSignature") + .resolvingSymlinksInPath() + try? FileManager.default.removeItem(at: codeSignatureDir) + } + + // Delete `gRPCCertificates-Cpp.bundle` since it is not needed (#9184). + // Depending on the platform, it may be at the root of the framework or + // in a symlinked `Resources` directory (for macOS, macCatalyst). Attempt + // to delete at either patch for each framework. + for path in ["", "Resources"] { + let grpcCertsBundle = framework + .appendingPathComponent(path) + .appendingPathComponent("gRPCCertificates-Cpp.bundle") + .resolvingSymlinksInPath() + try? FileManager.default.removeItem(at: grpcCertsBundle) + } + + // The macOS slice's `PrivateHeaders` directory may have a + // `PrivateHeaders` file in it that symbolically links to nowhere. Delete + // it here to avoid putting it in the zip or crashing the Carthage hash + // generation. Because this will throw an error for cases where the file + // does not exist, the error is ignored. + let privateHeadersDir = framework.appendingPathComponent("PrivateHeaders") + if !FileManager.default.directoryExists(at: privateHeadersDir.resolvingSymlinksInPath()) { + try? FileManager.default.removeItem(at: privateHeadersDir) + } + + // The `Headers` and `PrivateHeaders` directories may contain a symlink + // of the same name. Delete it here to avoid putting it in the zip or + // crashing the Carthage hash generation. + for path in ["Headers", "PrivateHeaders"] { + let headersDir = framework.appendingPathComponent(path).resolvingSymlinksInPath() + try? FileManager.default.removeItem(at: headersDir.appendingPathComponent(path)) + } + } + return frameworks + } + /// Try to build and package the contents of the Zip file. This will throw an error as soon as it /// encounters an error, or will quit due to a fatal error with the appropriate log. /// diff --git a/scripts/build_zip.sh b/scripts/build_zip.sh index c71579ca6d5..ee7e9600f62 100755 --- a/scripts/build_zip.sh +++ b/scripts/build_zip.sh @@ -14,10 +14,12 @@ set -x REPO=`pwd` -if [[ $# -lt 2 ]]; then +if [[ $# -ne 4 ]]; then cat 2>&2 < Date: Tue, 7 May 2024 16:27:06 -0400 Subject: [PATCH 08/13] [InAppMessaging] Fix #12882 (#12910) --- FirebaseInAppMessaging/CHANGELOG.md | 4 ++++ .../Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m | 2 ++ 2 files changed, 6 insertions(+) diff --git a/FirebaseInAppMessaging/CHANGELOG.md b/FirebaseInAppMessaging/CHANGELOG.md index 6ed3ff1c7ca..9f3a86b111c 100644 --- a/FirebaseInAppMessaging/CHANGELOG.md +++ b/FirebaseInAppMessaging/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +- [fixed] Fixed crash at app start that affected SwiftPM users and CocoaPods + users using static frameworks (#12882). + # 10.25.0 - [changed] Removed usages of user defaults API to eliminate required reason impact. diff --git a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m index ed724bfcfe3..c84da5e8758 100644 --- a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m +++ b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m @@ -72,10 +72,12 @@ + (NSBundle *)getViewResourceBundle { [NSBundle mainBundle], // Dynamically linked. [NSBundle bundleForClass:myClass], +#if FIREBASE_BUILD_ZIP_FILE // Embedded static framework (zip distribution). [NSBundle bundleWithURL:[NSBundle.mainBundle.bundleURL URLByAppendingPathComponent: @"Frameworks/FirebaseInAppMessaging.framework"]] +#endif // FIREBASE_BUILD_ZIP_FILE ]) { bundleURL = [containingBundle URLForResource:bundledResource withExtension:@"bundle"]; if (bundleURL != nil) break; From 96b68914c2667e94a5632d9f4081374f676ae9ae Mon Sep 17 00:00:00 2001 From: Dogan Altinbas Date: Tue, 7 May 2024 23:04:20 +0200 Subject: [PATCH 09/13] Improve Usage of SQLITE_OPEN_FILEPROTECTION_NONE in FIRMessagingRmqManager.m (#12909) --- .../Sources/FIRMessagingRmqManager.m | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/FirebaseMessaging/Sources/FIRMessagingRmqManager.m b/FirebaseMessaging/Sources/FIRMessagingRmqManager.m index ad66dcea2ce..fbc9dd04dc4 100644 --- a/FirebaseMessaging/Sources/FIRMessagingRmqManager.m +++ b/FirebaseMessaging/Sources/FIRMessagingRmqManager.m @@ -490,9 +490,11 @@ - (void)openDatabase { BOOL didOpenDatabase = YES; if (![fileManager fileExistsAtPath:path]) { // We've to separate between different versions here because of backwards compatbility issues. - int result = sqlite3_open_v2( - [path UTF8String], &self -> _database, - SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FILEPROTECTION_NONE, NULL); + int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE; +#ifdef SQLITE_OPEN_FILEPROTECTION_NONE + flags |= SQLITE_OPEN_FILEPROTECTION_NONE; +#endif + int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL); if (result != SQLITE_OK) { NSString *errorString = FIRMessagingStringFromSQLiteResult(result); NSString *errorMessage = [NSString @@ -509,9 +511,11 @@ - (void)openDatabase { [self createTableWithName:kTableS2DRmqIds command:kCreateTableS2DRmqIds]; } else { // Calling sqlite3_open should create the database, since the file doesn't exist. - int result = sqlite3_open_v2( - [path UTF8String], &self -> _database, - SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FILEPROTECTION_NONE, NULL); + int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE; +#ifdef SQLITE_OPEN_FILEPROTECTION_NONE + flags |= SQLITE_OPEN_FILEPROTECTION_NONE; +#endif + int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL); if (result != SQLITE_OK) { NSString *errorString = FIRMessagingStringFromSQLiteResult(result); NSString *errorMessage = From dda0e185c5c78db6695cf760442068d92bb951c8 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 8 May 2024 10:21:16 -0400 Subject: [PATCH 10/13] [Release] Update changelog to reflect #12900 (#12915) --- FirebaseMessaging/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FirebaseMessaging/CHANGELOG.md b/FirebaseMessaging/CHANGELOG.md index 8191c09c6b3..27b82cc217e 100644 --- a/FirebaseMessaging/CHANGELOG.md +++ b/FirebaseMessaging/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +- [fixed] Fixed bug preventing Messaging from working with a custom sqlite3 + dependency (#12900). + # 10.23.0 - [fixed] [CocoaPods] Fix "no rule" warning when running `pod install`. (#12511) From 1c605b2d24fa03a6c2f084b69bbd268b1511d45a Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 8 May 2024 08:10:09 -0700 Subject: [PATCH 11/13] [RTDB] Use NSURLSessionWebSocket instead of SocketRocket where possible (#12894) Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com> --- FirebaseDatabase/CHANGELOG.md | 4 + .../Sources/Realtime/FWebSocketConnection.h | 3 +- .../Sources/Realtime/FWebSocketConnection.m | 214 +++++++++++------- FirebaseDatabase/Tests/Integration/FData.m | 4 +- .../Tests/Integration/FIRDatabaseQueryTests.m | 4 +- 5 files changed, 139 insertions(+), 90 deletions(-) diff --git a/FirebaseDatabase/CHANGELOG.md b/FirebaseDatabase/CHANGELOG.md index 61df131aa31..9a24f6b1306 100644 --- a/FirebaseDatabase/CHANGELOG.md +++ b/FirebaseDatabase/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +- [changed] Update internal socket implementation to use `NSURLSessionWebSocket` where + available. (#12883) + # 10.25.0 - [changed] Removed usages of user defaults API to eliminate required reason impact. diff --git a/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h b/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h index 676971864cb..14912ff861f 100644 --- a/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h +++ b/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h @@ -23,7 +23,8 @@ @protocol FWebSocketDelegate; #if !TARGET_OS_WATCH -@interface FWebSocketConnection : NSObject +@interface FWebSocketConnection + : NSObject #else @interface FWebSocketConnection : NSObject #endif // else !TARGET_OS_WATCH diff --git a/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m b/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m index 5ac1bfa2f85..7edd0abb3e6 100644 --- a/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m +++ b/FirebaseDatabase/Sources/Realtime/FWebSocketConnection.m @@ -26,16 +26,17 @@ #import "FirebaseDatabase/Sources/Realtime/FWebSocketConnection.h" #import "FirebaseDatabase/Sources/Utilities/FStringUtilities.h" -#if TARGET_OS_IOS || TARGET_OS_TV || \ - (defined(TARGET_OS_VISION) && TARGET_OS_VISION) +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION #import -#endif // TARGET_OS_IOS || TARGET_OS_TV || (defined(TARGET_OS_VISION) && - // TARGET_OS_VISION) -#if TARGET_OS_WATCH -#import +#elif TARGET_OS_WATCH #import -#endif // TARGET_OS_WATCH + +#elif TARGET_OS_OSX +#import +#endif + +#import static NSString *const kAppCheckTokenHeader = @"X-Firebase-AppCheck"; static NSString *const kUserAgentHeader = @"User-Agent"; @@ -52,9 +53,10 @@ - (void)shutdown; - (void)onClosed; - (void)closeIfNeverConnected; -#if TARGET_OS_WATCH -@property(nonatomic, strong) NSURLSessionWebSocketTask *webSocketTask; -#else +@property(nonatomic, strong) + NSURLSessionWebSocketTask *webSocketTask API_AVAILABLE( + macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)); +#if !TARGET_OS_WATCH @property(nonatomic, strong) FSRWebSocket *webSocket; #endif // TARGET_OS_WATCH @property(nonatomic, strong) NSNumber *connectionId; @@ -100,40 +102,56 @@ - (instancetype)initWith:(FRepoInfo *)repoInfo userAgent:userAgent googleAppID:googleAppID appCheckToken:appCheckToken]; -#if TARGET_OS_WATCH - // Regular NSURLSession websocket. - NSOperationQueue *opQueue = [[NSOperationQueue alloc] init]; - opQueue.underlyingQueue = queue; - NSURLSession *session = [NSURLSession - sessionWithConfiguration:[NSURLSessionConfiguration - defaultSessionConfiguration] - delegate:self - delegateQueue:opQueue]; - NSURLSessionWebSocketTask *task = - [session webSocketTaskWithRequest:req]; - self.webSocketTask = task; - - if (@available(watchOS 7.0, *)) { - [[NSNotificationCenter defaultCenter] - addObserverForName:WKApplicationWillResignActiveNotification - object:nil - queue:opQueue - usingBlock:^(NSNotification *_Nonnull note) { - FFLog(@"I-RDB083015", - @"Received watchOS background notification, " - @"closing web socket."); - [self onClosed]; - }]; + + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + // Regular NSURLSession websocket. + NSOperationQueue *opQueue = [[NSOperationQueue alloc] init]; + opQueue.underlyingQueue = queue; + NSURLSession *session = [NSURLSession + sessionWithConfiguration:[NSURLSessionConfiguration + defaultSessionConfiguration] + delegate:self + delegateQueue:opQueue]; + NSURLSessionWebSocketTask *task = + [session webSocketTaskWithRequest:req]; + self.webSocketTask = task; + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION || TARGET_OS_MACCATALYST + NSString *resignName = UIApplicationWillResignActiveNotification; +#elif TARGET_OS_OSX + NSString *resignName = NSApplicationWillResignActiveNotification; +#elif TARGET_OS_WATCH + NSString *resignName = WKApplicationWillResignActiveNotification; +#elif +#error("missing platform") +#endif + if (@available(watchOS 7.0, *)) { + [[NSNotificationCenter defaultCenter] + addObserverForName:resignName + object:nil + queue:opQueue + usingBlock:^(NSNotification *_Nonnull note) { + FFLog(@"I-RDB083015", + @"Received notification that application " + @"will resign, " + @"closing web socket."); + [self onClosed]; + }]; + } + } +#if !TARGET_OS_WATCH + else { + // TODO(mmaksym): Remove googleAppID and userAgent from FSRWebSocket + // as they are passed via NSURLRequest. + self.webSocket = + [[FSRWebSocket alloc] initWithURLRequest:req + queue:queue + googleAppID:googleAppID + andUserAgent:userAgent]; + [self.webSocket setDelegateDispatchQueue:queue]; + self.webSocket.delegate = self; } -#else - // TODO(mmaksym): Remove googleAppID and userAgent from FSRWebSocket as - // they are passed via NSURLRequest. - self.webSocket = [[FSRWebSocket alloc] initWithURLRequest:req - queue:queue - googleAppID:googleAppID - andUserAgent:userAgent]; - [self.webSocket setDelegateDispatchQueue:queue]; - self.webSocket.delegate = self; #endif // TARGET_OS_WATCH } return self; @@ -195,13 +213,17 @@ - (void)open { assert(delegate); everConnected = NO; // TODO Assert url -#if TARGET_OS_WATCH - [self.webSocketTask resume]; - // We need to request data from the web socket in order for it to start - // sending data. - [self receiveWebSocketData]; -#else - [self.webSocket open]; + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + [self.webSocketTask resume]; + // We need to request data from the web socket in order for it to start + // sending data. + [self receiveWebSocketData]; + } +#if !TARGET_OS_WATCH + else { + [self.webSocket open]; + } #endif // TARGET_OS_WATCH dispatch_time_t when = dispatch_time( DISPATCH_TIME_NOW, kWebsocketConnectTimeout * NSEC_PER_SEC); @@ -214,12 +236,16 @@ - (void)close { FFLog(@"I-RDB083003", @"(wsc:%@) FWebSocketConnection is being closed.", self.connectionId); isClosed = YES; -#if TARGET_OS_WATCH - [self.webSocketTask - cancelWithCloseCode:NSURLSessionWebSocketCloseCodeNormalClosure - reason:nil]; -#else - [self.webSocket close]; + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + [self.webSocketTask + cancelWithCloseCode:NSURLSessionWebSocketCloseCodeNormalClosure + reason:nil]; + } +#if !TARGET_OS_WATCH + else { + [self.webSocket close]; + } #endif // TARGET_OS_WATCH } @@ -322,25 +348,27 @@ - (void)handleIncomingFrame:(NSString *)message { } #pragma mark - -#pragma mark URLSessionWebSocketDelegate watchOS implementation -#if TARGET_OS_WATCH +#pragma mark URLSessionWebSocketDelegate implementation - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - didOpenWithProtocol:(NSString *)protocol { + didOpenWithProtocol:(NSString *)protocol + API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) { [self webSocketDidOpen]; } - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode - reason:(NSData *)reason { + reason:(NSData *)reason + API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) { FFLog(@"I-RDB083011", @"(wsc:%@) didCloseWithCode: %ld %@", self.connectionId, (long)closeCode, reason); [self onClosed]; } -- (void)receiveWebSocketData { +- (void)receiveWebSocketData API_AVAILABLE(macos(10.15), ios(13.0), + watchos(6.0), tvos(13.0)) { __weak __auto_type weakSelf = self; [self.webSocketTask receiveMessageWithCompletionHandler:^( NSURLSessionWebSocketMessage *_Nullable message, @@ -364,7 +392,7 @@ - (void)receiveWebSocketData { }]; } -#else +#if !TARGET_OS_WATCH #pragma mark SRWebSocketDelegate implementation @@ -387,7 +415,7 @@ - (void)webSocket:(FSRWebSocket *)webSocket [self onClosed]; } -#endif // TARGET_OS_WATCH +#endif // !TARGET_OS_WATCH // Common to both SRWebSocketDelegate and URLSessionWebSocketDelegate. @@ -413,21 +441,26 @@ - (void)webSocketDidOpen { /** Sends a string through the open web socket. */ - (void)sendStringToWebSocket:(NSString *)string { -#if TARGET_OS_WATCH - // Use built-in URLSessionWebSocket functionality. - [self.webSocketTask sendMessage:[[NSURLSessionWebSocketMessage alloc] - initWithString:string] - completionHandler:^(NSError *_Nullable error) { - if (error) { - FFWarn(@"I-RDB083016", - @"Error sending web socket data: %@.", error); - return; - } - }]; -#else - // Use existing SocketRocket implementation. - [self.webSocket send:string]; -#endif // TARGET_OS_WATCH + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + // Use built-in URLSessionWebSocket functionality. + [self.webSocketTask + sendMessage:[[NSURLSessionWebSocketMessage alloc] + initWithString:string] + completionHandler:^(NSError *_Nullable error) { + if (error) { + FFWarn(@"I-RDB083016", @"Error sending web socket data: %@.", + error); + return; + } + }]; + } +#if !TARGET_OS_WATCH + else { + // Use existing SocketRocket implementation. + [self.webSocket send:string]; + } +#endif // !TARGET_OS_WATCH } /** @@ -446,12 +479,17 @@ - (void)closeIfNeverConnected { if (!everConnected) { FFLog(@"I-RDB083012", @"(wsc:%@) Websocket timed out on connect", self.connectionId); -#if TARGET_OS_WATCH - [self.webSocketTask - cancelWithCloseCode:NSURLSessionWebSocketCloseCodeNoStatusReceived - reason:nil]; -#else - [self.webSocket close]; + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + [self.webSocketTask + cancelWithCloseCode: + NSURLSessionWebSocketCloseCodeNoStatusReceived + reason:nil]; + } +#if !TARGET_OS_WATCH + else { + [self.webSocket close]; + } #endif // TARGET_OS_WATCH } } @@ -468,9 +506,11 @@ - (void)onClosed { FFLog(@"I-RDB083013", @"Websocket is closing itself"); [self shutdown]; } -#if TARGET_OS_WATCH - self.webSocketTask = nil; -#else + if (@available(iOS 13.0, macOS 10.15, macCatalyst 13.1, tvOS 13.0, + watchOS 6.0, *)) { + self.webSocketTask = nil; + } +#if !TARGET_OS_WATCH self.webSocket = nil; #endif // TARGET_OS_WATCH if (keepAlive.isValid) { diff --git a/FirebaseDatabase/Tests/Integration/FData.m b/FirebaseDatabase/Tests/Integration/FData.m index 2fa04319f9f..9570cc1c5aa 100644 --- a/FirebaseDatabase/Tests/Integration/FData.m +++ b/FirebaseDatabase/Tests/Integration/FData.m @@ -2197,7 +2197,9 @@ - (void)testUpdateDoesntAffectPriorityRemotely { }]; } -- (void)testUpdateReplacesChildrenAndIsNotRecursive { +// TODO: On arm hardware Macs, the following test hangs with the emulator, but passes with a real +// project. +- (void)SKIPtestUpdateReplacesChildrenAndIsNotRecursive { FTupleFirebase *refs = [FTestHelpers getRandomNodePair]; FIRDatabaseReference *reader = refs.one; FIRDatabaseReference *writer = refs.two; diff --git a/FirebaseDatabase/Tests/Integration/FIRDatabaseQueryTests.m b/FirebaseDatabase/Tests/Integration/FIRDatabaseQueryTests.m index 4163cd15ae6..947d5445dd8 100644 --- a/FirebaseDatabase/Tests/Integration/FIRDatabaseQueryTests.m +++ b/FirebaseDatabase/Tests/Integration/FIRDatabaseQueryTests.m @@ -4419,7 +4419,9 @@ - (void)testGetUpdatesPersistenceCacheWhenEnabled { } } -- (void)testGetSkipsPersistenceCacheWhenOnline { +// TODO: On arm hardware Macs, the following test hangs with the emulator, but passes with a real +// project. +- (void)SKIPtestGetSkipsPersistenceCacheWhenOnline { FIRDatabase* db = [self databaseForURL:self.databaseURL name:[[NSUUID UUID] UUIDString]]; FIRDatabase* db2 = [self databaseForURL:self.databaseURL name:[[NSUUID UUID] UUIDString]]; From 2bac0ddfe61a6c1b44745bd637c5b54c353c79d8 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 8 May 2024 14:57:19 -0400 Subject: [PATCH 12/13] [InAppMessaging] Follow-up to #12910 (#12917) --- .../DefaultUI/FIRIAMDefaultDisplayImpl.m | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m index c84da5e8758..f23eab96eb6 100644 --- a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m +++ b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m @@ -64,21 +64,35 @@ + (NSBundle *)getViewResourceBundle { bundledResource = @"InAppMessagingDisplayResources"; #endif // SWIFT_PACKAGE + NSMutableArray *bundles = [NSMutableArray array]; + + // Resources may be in main bundle when statically linked. + NSBundle *mainBundle = [NSBundle mainBundle]; + if (mainBundle) { + [bundles addObject:mainBundle]; + } + // Resources may be in the bundle associated with this class when + // dynamically linked. + NSBundle *bundleForClass = [NSBundle bundleForClass:myClass]; + if (bundleForClass) { + [bundles addObject:bundleForClass]; + } + // When embedding static frameworks from the zip distribution, the Xcode + // will copy the resources into the framework's directory. + // TODO(Firebase 11): Remove when Firebase.zip is composed of dynamic + // frameworks. + NSBundle *frameworkBundle = [NSBundle + bundleWithURL: + [NSBundle.mainBundle.bundleURL + URLByAppendingPathComponent:@"Frameworks/FirebaseInAppMessaging.framework"]]; + if (frameworkBundle) { + [bundles addObject:frameworkBundle]; + } + NSBundle *containingBundle; NSURL *bundleURL; // The containing bundle is different whether FIAM is statically or dynamically linked. - for (containingBundle in @[ - // Statically linked. - [NSBundle mainBundle], - // Dynamically linked. - [NSBundle bundleForClass:myClass], -#if FIREBASE_BUILD_ZIP_FILE - // Embedded static framework (zip distribution). - [NSBundle bundleWithURL:[NSBundle.mainBundle.bundleURL - URLByAppendingPathComponent: - @"Frameworks/FirebaseInAppMessaging.framework"]] -#endif // FIREBASE_BUILD_ZIP_FILE - ]) { + for (containingBundle in bundles) { bundleURL = [containingBundle URLForResource:bundledResource withExtension:@"bundle"]; if (bundleURL != nil) break; } From 317a553ba1f0beb47394d73c4bcbf0a30c4b5683 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 8 May 2024 15:33:18 -0400 Subject: [PATCH 13/13] [Release] Update FIAM changelog to reflect 10.26.0 (#12919) --- FirebaseInAppMessaging/CHANGELOG.md | 7 +++++-- .../Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/FirebaseInAppMessaging/CHANGELOG.md b/FirebaseInAppMessaging/CHANGELOG.md index 9f3a86b111c..9c5a31b6fe5 100644 --- a/FirebaseInAppMessaging/CHANGELOG.md +++ b/FirebaseInAppMessaging/CHANGELOG.md @@ -1,6 +1,9 @@ # Unreleased -- [fixed] Fixed crash at app start that affected SwiftPM users and CocoaPods - users using static frameworks (#12882). +- [fixed] Fixed crash at app start that affected CocoaPods users using static + frameworks (#12882). + +# 10.26.0 +- [fixed] Fixed crash at app start that affected SwiftPM users (#12882). # 10.25.0 - [changed] Removed usages of user defaults API to eliminate required reason diff --git a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m index f23eab96eb6..5673e179fb8 100644 --- a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m +++ b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m @@ -79,8 +79,6 @@ + (NSBundle *)getViewResourceBundle { } // When embedding static frameworks from the zip distribution, the Xcode // will copy the resources into the framework's directory. - // TODO(Firebase 11): Remove when Firebase.zip is composed of dynamic - // frameworks. NSBundle *frameworkBundle = [NSBundle bundleWithURL: [NSBundle.mainBundle.bundleURL