Ryan Wilson пре 5 година
родитељ
комит
c6328a01c4
26 измењених фајлова са 90 додато и 36 уклоњено
  1. 9 0
      Firebase/InstanceID/Public/FIRInstanceID.h
  2. 3 0
      FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h
  3. 3 0
      FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h
  4. 9 0
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h
  5. 3 0
      FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h
  6. 3 0
      FirebaseAuth/Sources/Public/FirebaseAuth/FIREmailAuthProvider.h
  7. 1 1
      FirebaseAuth/Tests/Unit/FIRAuthAppCredentialManagerTests.m
  8. 2 2
      FirebaseDatabase/Sources/Api/Private/FTypedefs_Private.h
  9. 8 8
      FirebaseDatabase/Sources/Core/FWriteTree.m
  10. 2 2
      FirebaseDatabase/Tests/Integration/FIRDatabaseTests.m
  11. 1 2
      FirebaseInAppMessaging.podspec
  12. 5 1
      FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h
  13. 3 0
      FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessaging.h
  14. 5 1
      FirebasePerformance/Sources/Public/FIRHTTPMetric.h
  15. 2 1
      FirebasePerformance/Sources/Public/FIRPerformance.h
  16. 7 7
      FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m
  17. 2 1
      Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h
  18. 2 2
      Firestore/Source/Public/FirebaseFirestore/FIRFirestoreSettings.h
  19. 4 2
      Firestore/Source/Public/FirebaseFirestore/FIRQuery.h
  20. 3 0
      Firestore/core/src/util/error_apple.h
  21. 3 0
      Functions/FirebaseFunctions/Public/FirebaseFunctions/FIRError.h
  22. 1 1
      Interop/Analytics/Public/FIRInteropParameterNames.h
  23. 1 1
      README.md
  24. 5 1
      ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift
  25. 1 1
      scripts/setup_check.sh
  26. 2 2
      scripts/style.sh

+ 9 - 0
Firebase/InstanceID/Public/FIRInstanceID.h

@@ -24,8 +24,11 @@ NS_ASSUME_NONNULL_BEGIN
  *
  *  The scope to be used when fetching/deleting a token for Firebase Messaging.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
     NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging) DEPRECATED_ATTRIBUTE;
+// clang-format on
 
 #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
 /**
@@ -36,8 +39,11 @@ FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
  *  Instance ID service will throttle the refresh event across all devices
  *  to control the rate of token updates on application servers.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotification
     NS_SWIFT_NAME(InstanceIDTokenRefresh) DEPRECATED_ATTRIBUTE;
+// clang-format on
 #else
 /**
  *  Called when the system determines that tokens need to be refreshed.
@@ -47,8 +53,11 @@ FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotificatio
  *  Instance ID service will throttle the refresh event across all devices
  *  to control the rate of token updates on application servers.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT NSString *const kFIRInstanceIDTokenRefreshNotification
     NS_SWIFT_NAME(InstanceIDTokenRefreshNotification) DEPRECATED_ATTRIBUTE;
+// clang-format on
 #endif  // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
 
 /**

+ 3 - 0
FirebaseABTesting/Sources/Public/FirebaseABTesting/FIRLifecycleEvents.h

@@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN
 /// Default event name for when an experiment is set.
 extern NSString *const FIRSetExperimentEventName NS_SWIFT_NAME(DefaultSetExperimentEventName);
 /// Default event name for when an experiment is activated.
+// clang-format off
+// clang-format12 will merge lines and exceed 100 character limit.
 extern NSString *const FIRActivateExperimentEventName
     NS_SWIFT_NAME(DefaultActivateExperimentEventName);
 /// Default event name for when an experiment is cleared.
@@ -26,6 +28,7 @@ extern NSString *const FIRClearExperimentEventName NS_SWIFT_NAME(DefaultClearExp
 /// Default event name for when an experiment times out for being activated.
 extern NSString *const FIRTimeoutExperimentEventName
     NS_SWIFT_NAME(DefaultTimeoutExperimentEventName);
+// clang-format on
 /// Default event name for when an experiment is expired as it reaches the end of TTL.
 extern NSString *const FIRExpireExperimentEventName NS_SWIFT_NAME(DefaultExpireExperimentEventName);
 

+ 3 - 0
FirebaseAppDistribution/Sources/Public/FirebaseAppDistribution/FIRAppDistribution.h

@@ -63,12 +63,15 @@ NS_SWIFT_NAME(AppDistribution)
 @end
 
 /// The error domain for codes in the `FIRAppDistributionError` enum.
+// clang-format off
+// clang-format12 will merge lines and exceed 100 character limit.
 FOUNDATION_EXPORT NSString *const FIRAppDistributionErrorDomain
     NS_SWIFT_NAME(AppDistributionErrorDomain);
 
 /// The key for finding error details in the `NSError`'s `userInfo`.
 FOUNDATION_EXPORT NSString *const FIRAppDistributionErrorDetailsKey
     NS_SWIFT_NAME(FunctionsErrorDetailsKey);
+// clang-format on
 
 /**
  * Error codes representing sign in or version check failure reasons.

+ 9 - 0
FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h

@@ -44,8 +44,11 @@ typedef void (^FIRUserUpdateCallback)(NSError *_Nullable error) NS_SWIFT_NAME(Us
 /** @typedef FIRAuthStateDidChangeListenerHandle
     @brief The type of handle returned by `FIRAuth.addAuthStateDidChangeListener:`.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
     NS_SWIFT_NAME(AuthStateDidChangeListenerHandle);
+// clang-format on
 
 /** @typedef FIRAuthStateDidChangeListenerBlock
     @brief The type of block which can be registered as a listener for auth state did change events.
@@ -59,8 +62,11 @@ typedef void (^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Null
 /** @typedef FIRIDTokenDidChangeListenerHandle
     @brief The type of handle returned by `FIRAuth.addIDTokenDidChangeListener:`.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 typedef id<NSObject> FIRIDTokenDidChangeListenerHandle
     NS_SWIFT_NAME(IDTokenDidChangeListenerHandle);
+// clang-format on
 
 /** @typedef FIRIDTokenDidChangeListenerBlock
     @brief The type of block which can be registered as a listener for ID token did change events.
@@ -95,8 +101,11 @@ extern const NSNotificationName FIRAuthStateDidChangeNotification NS_SWIFT_NAME(
         changes (for example, a new token has been produced, a user signs in or signs out). The
         object parameter of the notification is the sender `FIRAuth` instance.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 extern NSString *const FIRAuthStateDidChangeNotification
     NS_SWIFT_NAME(AuthStateDidChangeNotification);
+// clang-format off
 #endif  // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
 
 /** @typedef FIRAuthResultCallback

+ 3 - 0
FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuthErrors.h

@@ -65,6 +65,8 @@ extern NSString *const FIRAuthErrorUserInfoEmailKey NS_SWIFT_NAME(AuthErrorUserI
         NSError object returned. This is the updated auth credential the developer should use for
         recovery if applicable.
  */
+// clang-format off
+// clang-format12 will merge lines and exceed 100 character limit.
 extern NSString *const FIRAuthErrorUserInfoUpdatedCredentialKey
     NS_SWIFT_NAME(AuthErrorUserInfoUpdatedCredentialKey);
 
@@ -74,6 +76,7 @@ extern NSString *const FIRAuthErrorUserInfoUpdatedCredentialKey
  */
 extern NSString *const FIRAuthErrorUserInfoMultiFactorResolverKey
     NS_SWIFT_NAME(AuthErrorUserInfoMultiFactorResolverKey);
+// clang-format on
 
 /**
     @brief Error codes used by Firebase Auth.

+ 3 - 0
FirebaseAuth/Sources/Public/FirebaseAuth/FIREmailAuthProvider.h

@@ -33,8 +33,11 @@ extern NSString *const FIREmailLinkAuthSignInMethod NS_SWIFT_NAME(EmailLinkAuthS
 /**
     @brief A string constant identifying the email & password sign-in method.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 extern NSString *const FIREmailPasswordAuthSignInMethod
     NS_SWIFT_NAME(EmailPasswordAuthSignInMethod);
+// clang-format on
 
 /** @class FIREmailAuthProvider
     @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In.

+ 1 - 1
FirebaseAuth/Tests/Unit/FIRAuthAppCredentialManagerTests.m

@@ -24,7 +24,7 @@
 #import "FirebaseAuth/Sources/SystemService/FIRAuthAppCredential.h"
 #import "FirebaseAuth/Sources/SystemService/FIRAuthAppCredentialManager.h"
 
-#define ANY_ERROR_POINTER ((NSError * __autoreleasing * _Nullable)[OCMArg anyPointer])
+#define ANY_ERROR_POINTER ((NSError * __autoreleasing *_Nullable)[OCMArg anyPointer])
 #define SAVE_TO(var)                     \
   [OCMArg checkWithBlock:^BOOL(id arg) { \
     var = arg;                           \

+ 2 - 2
FirebaseDatabase/Sources/Api/Private/FTypedefs_Private.h

@@ -38,8 +38,8 @@ typedef NS_ENUM(NSInteger, FTransactionStatus) {
 typedef void (^fbt_void_nserror_bool_datasnapshot)(NSError *error,
                                                    BOOL committed,
                                                    FIRDataSnapshot *snapshot);
-typedef FIRTransactionResult * (^fbt_transactionresult_mutabledata)(
-    FIRMutableData *currentData);
+typedef FIRTransactionResult * (
+    ^fbt_transactionresult_mutabledata)(FIRMutableData *currentData);
 typedef void (^fbt_void_path_node)(FPath *, id<FNode>);
 typedef void (^fbt_void_nsstring)(NSString *);
 typedef BOOL (^fbt_bool_nsstring_node)(NSString *, id<FNode>);

+ 8 - 8
FirebaseDatabase/Sources/Core/FWriteTree.m

@@ -256,14 +256,14 @@
                 return nil;
             } else {
                 BOOL (^filter)(FWriteRecord *) = ^(FWriteRecord *record) {
-                  return (BOOL)(
-                      (record.visible || includeHiddenWrites) &&
-                      (writeIdsToExclude == nil ||
-                       ![writeIdsToExclude
-                           containsObject:
-                               [NSNumber numberWithInteger:record.writeId]]) &&
-                      ([record.path contains:treePath] ||
-                       [treePath contains:record.path]));
+                  return (BOOL)((record.visible || includeHiddenWrites) &&
+                                (writeIdsToExclude == nil ||
+                                 ![writeIdsToExclude
+                                     containsObject:[NSNumber
+                                                        numberWithInteger:
+                                                            record.writeId]]) &&
+                                ([record.path contains:treePath] ||
+                                 [treePath contains:record.path]));
                 };
                 FCompoundWrite *mergeAtPath =
                     [FWriteTree layerTreeFromWrites:self.allWrites

+ 2 - 2
FirebaseDatabase/Tests/Integration/FIRDatabaseTests.m

@@ -37,7 +37,7 @@ static NSString *kFirebaseTestAltNamespace = @"https://foobar.firebaseio.com";
 @implementation FIRDatabaseTests
 
 - (void)testFIRDatabaseForNilApp {
-  XCTAssertThrowsSpecificNamed([FIRDatabase databaseForApp:(FIRApp * _Nonnull) nil], NSException,
+  XCTAssertThrowsSpecificNamed([FIRDatabase databaseForApp:(FIRApp *_Nonnull)nil], NSException,
                                @"InvalidFIRApp");
 }
 
@@ -92,7 +92,7 @@ static NSString *kFirebaseTestAltNamespace = @"https://foobar.firebaseio.com";
 - (void)testDatabaseForAppWithInvalidCustomURLs {
   id app = [[FIRFakeApp alloc] initWithName:@"testDatabaseForAppWithInvalidCustomURLs"
                                         URL:kFirebaseTestAltNamespace];
-  XCTAssertThrows([FIRDatabase databaseForApp:app URL:(NSString * _Nonnull) nil]);
+  XCTAssertThrows([FIRDatabase databaseForApp:app URL:(NSString *_Nonnull)nil]);
   XCTAssertThrows([FIRDatabase databaseForApp:app URL:@"not-a-url"]);
   XCTAssertThrows([FIRDatabase databaseForApp:app URL:@"http://x.fblocal.com:9000/paths/are/bad"]);
 }

+ 1 - 2
FirebaseInAppMessaging.podspec

@@ -63,8 +63,7 @@ See more product details at https://firebase.google.com/products/in-app-messagin
 
   s.ios.resource_bundles = {
     'InAppMessagingDisplayResources' => [
-       base_dir + 'iOS/Resources/FIRInAppMessageDisplayStoryboard.storyboard',
-       base_dir + 'Sources/Resources/Shared/*.png'
+       base_dir + 'iOS/Resources/*.{storyboard,png}',
      ]
   }
 

+ 5 - 1
FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h

@@ -22,11 +22,14 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** A notification with this name is sent each time an installation is created or deleted. */
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT const NSNotificationName FIRInstallationIDDidChangeNotification
     NS_SWIFT_NAME(InstallationIDDidChange);
 /** `userInfo` key for the `FirebaseApp.name` in `FIRInstallationIDDidChangeNotification`. */
 FOUNDATION_EXPORT NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey
     NS_SWIFT_NAME(InstallationIDDidChangeAppNameKey);
+// clang-format on
 
 /**
  * An installation ID handler block.
@@ -73,7 +76,8 @@ NS_SWIFT_NAME(Installations)
  * @returns An instance of `Installations` corresponding to the passed application.
  * @throw Throws an exception if required `FirebaseApp` options are missing.
  */
-+ (FIRInstallations *)installationsWithApp:(FIRApp *)application NS_SWIFT_NAME(installations(app:));
++ (FIRInstallations *)installationsWithApp:(FIRApp *)application
+    NS_SWIFT_NAME(installations(app:));
 
 /**
  * The method creates or retrieves an installation ID. The installation ID is a stable identifier

+ 3 - 0
FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessaging.h

@@ -61,8 +61,11 @@ typedef void (^FIRMessagingTopicOperationCompletion)(NSError *_Nullable error);
  *  FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and
  *  updated tokens.
  */
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT const NSNotificationName FIRMessagingRegistrationTokenRefreshedNotification
     NS_SWIFT_NAME(MessagingRegistrationTokenRefreshed);
+// clang-format on
 
 /**
  *  @enum FIRMessagingError

+ 5 - 1
FirebasePerformance/Sources/Public/FIRHTTPMetric.h

@@ -16,6 +16,8 @@
 
 #import "FIRPerformanceAttributable.h"
 
+// clang-format off
+// clang-format12 does a weird cascading indent of this enum.
 /* Different HTTP methods. */
 typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
   /** HTTP Method GET */
@@ -37,6 +39,7 @@ typedef NS_ENUM(NSInteger, FIRHTTPMethod) {
   /** HTTP Method CONNECT */
   FIRHTTPMethodCONNECT NS_SWIFT_NAME(connect)
 } NS_SWIFT_NAME(HTTPMethod);
+// clang-format on
 
 /**
  * FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request.
@@ -50,7 +53,8 @@ NS_SWIFT_NAME(HTTPMetric)
  * @param httpMethod HTTP method used by the request.
  */
 - (nullable instancetype)initWithURL:(nonnull NSURL *)URL
-                          HTTPMethod:(FIRHTTPMethod)httpMethod NS_SWIFT_NAME(init(url:httpMethod:));
+                          HTTPMethod:(FIRHTTPMethod)httpMethod
+    NS_SWIFT_NAME(init(url:httpMethod:));
 
 /**
  * Use `initWithURL:HTTPMethod:` for Objective-C and `init(url:httpMethod:)` for Swift.

+ 2 - 1
FirebasePerformance/Sources/Public/FIRPerformance.h

@@ -62,7 +62,8 @@ NS_SWIFT_NAME(Performance)
  * @param name The name of the Trace.
  * @return The FIRTrace object.
  */
-+ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name NS_SWIFT_NAME(startTrace(name:));
++ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name
+    NS_SWIFT_NAME(startTrace(name:));
 
 /**
  * Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the

+ 7 - 7
FirebasePerformance/Tests/Unit/Instruments/FPRNSURLSessionInstrumentTest.m

@@ -227,13 +227,13 @@
 - (void)testProxyWrappedSessionWithConfiguration {
   Method method = class_getClassMethod([NSURLSession class], @selector(sessionWithConfiguration:));
   IMP originalImp = method_getImplementation(method);
-  IMP swizzledImp =
-      imp_implementationWithBlock(^(id session, NSURLSessionConfiguration *configuration) {
-        typedef NSURLSession *(*OriginalImp)(id, SEL, NSURLSessionConfiguration *);
-        NSURLSession *originalSession = ((OriginalImp)originalImp)(
-            session, @selector(sessionWithConfiguration:), configuration);
-        return [[FPRNSURLSessionProxy alloc] initWithSession:originalSession];
-      });
+  IMP swizzledImp = imp_implementationWithBlock(^(id session,
+                                                  NSURLSessionConfiguration *configuration) {
+    typedef NSURLSession *(*OriginalImp)(id, SEL, NSURLSessionConfiguration *);
+    NSURLSession *originalSession =
+        ((OriginalImp)originalImp)(session, @selector(sessionWithConfiguration:), configuration);
+    return [[FPRNSURLSessionProxy alloc] initWithSession:originalSession];
+  });
   method_setImplementation(method, swizzledImp);
   NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
   XCTAssertEqual([[NSURLSession sessionWithConfiguration:config] class],

+ 2 - 1
Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

@@ -292,7 +292,8 @@ NS_SWIFT_NAME(Firestore)
  * @return A `FIRLoadBundleTask` (`LoadBundleTask` in Swift) which allows registered observers
  * to receive progress updates and completion or error events.
  */
-- (FIRLoadBundleTask *)loadBundleStream:(NSInputStream *)bundleStream NS_SWIFT_NAME(loadBundle(_:));
+- (FIRLoadBundleTask *)loadBundleStream:(NSInputStream *)bundleStream
+    NS_SWIFT_NAME(loadBundle(_:));
 
 /**
  * Loads a Firestore bundle into the local cache.

+ 2 - 2
Firestore/Source/Public/FirebaseFirestore/FIRFirestoreSettings.h

@@ -19,8 +19,8 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** Used to set on-disk cache size to unlimited. Garbage collection will not run. */
-FOUNDATION_EXTERN const int64_t kFIRFirestoreCacheSizeUnlimited
-    NS_SWIFT_NAME(FirestoreCacheSizeUnlimited);
+FOUNDATION_EXTERN const int64_t
+    kFIRFirestoreCacheSizeUnlimited NS_SWIFT_NAME(FirestoreCacheSizeUnlimited);
 
 /** Settings used to configure a `FIRFirestore` instance. */
 NS_SWIFT_NAME(FirestoreSettings)

+ 4 - 2
Firestore/Source/Public/FirebaseFirestore/FIRQuery.h

@@ -283,7 +283,8 @@ NS_SWIFT_NAME(Query)
  * @return The created `FIRQuery`.
  */
 - (FIRQuery *)queryWhereField:(NSString *)field
-             arrayContainsAny:(NSArray<id> *)values NS_SWIFT_NAME(whereField(_:arrayContainsAny:));
+             arrayContainsAny:(NSArray<id> *)values
+    NS_SWIFT_NAME(whereField(_:arrayContainsAny:));
 
 /**
  * Creates and returns a new `FIRQuery` with the additional filter that documents must contain
@@ -525,7 +526,8 @@ NS_SWIFT_NAME(Query)
  *
  * @return The created `FIRQuery`.
  */
-- (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document NS_SWIFT_NAME(end(atDocument:));
+- (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document
+    NS_SWIFT_NAME(end(atDocument:));
 
 /**
  * Creates and returns a new `FIRQuery` that ends at the provided fields relative to the order of

+ 3 - 0
Firestore/core/src/util/error_apple.h

@@ -34,8 +34,11 @@ NS_ASSUME_NONNULL_BEGIN
 // The Cloud Firestore error domain. Keep in sync with FIRFirestoreErrors.h.
 // Exposed here to make it possible to build in CMake without bringing in the
 // sources under Firestore/Source.
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT NSString* const FIRFirestoreErrorDomain
     NS_SWIFT_NAME(FirestoreErrorDomain);
+// clang-format on
 
 namespace firebase {
 namespace firestore {

+ 3 - 0
Functions/FirebaseFunctions/Public/FirebaseFunctions/FIRError.h

@@ -20,8 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
 FOUNDATION_EXPORT NSString *const FIRFunctionsErrorDomain NS_SWIFT_NAME(FunctionsErrorDomain);
 
 // The key for finding error details in the NSError userInfo.
+// clang-format off
+// clang-format12 merges the next two lines.
 FOUNDATION_EXPORT NSString *const FIRFunctionsErrorDetailsKey
     NS_SWIFT_NAME(FunctionsErrorDetailsKey);
+// clang-format on
 
 /**
  * The set of error status codes that can be returned from a Callable HTTPS tigger. These are the

+ 1 - 1
Interop/Analytics/Public/FIRInteropParameterNames.h

@@ -52,7 +52,7 @@ static NSString *const kFIRIParameterMedium NS_SWIFT_NAME(AnalyticsParameterMedi
 ///     };
 /// </pre>
 static NSString *const kFIRIParameterCampaign NS_SWIFT_NAME(AnalyticsParameterCampaign) =
-    @"campaign";
+                                                                @"campaign";
 
 /// Message identifier.
 static NSString *const kFIRIParameterMessageIdentifier = @"_nmid";

+ 1 - 1
README.md

@@ -169,7 +169,7 @@ GitHub Actions will verify that any code changes are done in a style compliant
 way. Install `clang-format` and `mint`:
 
 ```console
-brew install clang-format@11
+brew install clang-format@12
 brew install mint
 ```
 

+ 5 - 1
ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift

@@ -626,9 +626,13 @@ struct ZipBuilder {
                                                                         frameworks: [String]) {
     let podsToCopy = [podName] +
       CocoaPodUtils.transitiveMasterPodDependencies(for: podName, in: installedPods)
+    // Remove any duplicates from the `podsToCopy` array. The easiest way to do this is to wrap it
+    // in a set then back to an array.
+    let dedupedPods = Array(Set(podsToCopy))
+
     // Copy the frameworks into the proper product directory.
     let productDir = rootZipDir.appendingPathComponent(podName)
-    let namedFrameworks = try copyFrameworks(fromPods: podsToCopy,
+    let namedFrameworks = try copyFrameworks(fromPods: dedupedPods,
                                              toDirectory: productDir,
                                              frameworkLocations: builtFrameworks,
                                              podsToIgnore: podsToIgnore)

+ 1 - 1
scripts/setup_check.sh

@@ -35,7 +35,7 @@ fi
 
 # install clang-format
 brew update
-brew install clang-format@11
+brew install clang-format@12
 
 # mint installs tools from Mintfile on demand.
 brew install mint

+ 2 - 2
scripts/style.sh

@@ -42,7 +42,7 @@ version="${version/ (*)/}"
 version="${version/.*/}"
 
 case "$version" in
-  11)
+  12)
     ;;
   google3-trunk)
     echo "Please use a publicly released clang-format; a recent LLVM release"
@@ -51,7 +51,7 @@ case "$version" in
     exit 1
     ;;
   *)
-    echo "Please upgrade to clang-format version 11."
+    echo "Please upgrade to clang-format version 12."
     echo "If it's installed via homebrew you can run:"
     echo "brew upgrade clang-format"
     exit 1