From bad105c1c6b7bfdedc57111bd485a5e644538374 Mon Sep 17 00:00:00 2001 From: Maksym Malyhin Date: Tue, 2 Mar 2021 15:23:26 -0500 Subject: [PATCH 01/33] Add prefix to constant name to avoid name conflicts (#10) * Add prefix to constant name to avoid name conflicts * Move the internal constant out of the * Changelog --- CHANGELOG.md | 2 ++ GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h | 2 ++ GoogleUtilities/ISASwizzler/GULObjectSwizzler.m | 7 ++++--- GoogleUtilities/ISASwizzler/GULSwizzledObject.m | 4 ++-- .../ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h | 2 -- .../Tests/Unit/Swizzler/GULObjectSwizzlerTest.m | 6 +++--- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ad256..5c8a166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 7.3.0 +- Fix conflicting internal constant name and move it out of the public header. (#7635) # 7.2.2 - Fix warnings introduced with Xcode 12.5. (#8) diff --git a/GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h b/GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h index 2b09108..26d8655 100644 --- a/GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h +++ b/GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h @@ -14,6 +14,8 @@ #import "GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULObjectSwizzler.h" +FOUNDATION_EXPORT NSString *kGULSwizzlerAssociatedObjectKey; + @interface GULObjectSwizzler (Internal) - (void)swizzledObjectHasBeenDeallocatedWithGeneratedSubclass:(BOOL)isInstanceOfGeneratedSubclass; diff --git a/GoogleUtilities/ISASwizzler/GULObjectSwizzler.m b/GoogleUtilities/ISASwizzler/GULObjectSwizzler.m index d4bbefd..e147b53 100644 --- a/GoogleUtilities/ISASwizzler/GULObjectSwizzler.m +++ b/GoogleUtilities/ISASwizzler/GULObjectSwizzler.m @@ -16,6 +16,7 @@ #import +#import "GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h" #import "GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h" @implementation GULObjectSwizzler { @@ -80,7 +81,7 @@ } GULObjectSwizzler *existingSwizzler = - [[self class] getAssociatedObject:object key:kSwizzlerAssociatedObjectKey]; + [[self class] getAssociatedObject:object key:kGULSwizzlerAssociatedObjectKey]; if ([existingSwizzler isKindOfClass:[GULObjectSwizzler class]]) { // The object has been swizzled already, no need to swizzle again. return existingSwizzler; @@ -130,7 +131,7 @@ __strong id swizzledObject = _swizzledObject; GULObjectSwizzler *existingSwizzler = - [[self class] getAssociatedObject:swizzledObject key:kSwizzlerAssociatedObjectKey]; + [[self class] getAssociatedObject:swizzledObject key:kGULSwizzlerAssociatedObjectKey]; if (existingSwizzler != nil) { NSAssert(existingSwizzler == self, @"The swizzled object has a different swizzler."); // The object has been swizzled already. @@ -139,7 +140,7 @@ if (swizzledObject) { [GULObjectSwizzler setAssociatedObject:swizzledObject - key:kSwizzlerAssociatedObjectKey + key:kGULSwizzlerAssociatedObjectKey value:self association:GUL_ASSOCIATION_RETAIN]; diff --git a/GoogleUtilities/ISASwizzler/GULSwizzledObject.m b/GoogleUtilities/ISASwizzler/GULSwizzledObject.m index 6ea7028..bf3c707 100644 --- a/GoogleUtilities/ISASwizzler/GULSwizzledObject.m +++ b/GoogleUtilities/ISASwizzler/GULSwizzledObject.m @@ -17,7 +17,7 @@ #import "GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h" #import "GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h" -NSString *kSwizzlerAssociatedObjectKey = @"gul_objectSwizzler"; +NSString *kGULSwizzlerAssociatedObjectKey = @"gul_objectSwizzler"; @interface GULSwizzledObject () @@ -46,7 +46,7 @@ NSString *kSwizzlerAssociatedObjectKey = @"gul_objectSwizzler"; } - (GULObjectSwizzler *)gul_objectSwizzler { - return [GULObjectSwizzler getAssociatedObject:self key:kSwizzlerAssociatedObjectKey]; + return [GULObjectSwizzler getAssociatedObject:self key:kGULSwizzlerAssociatedObjectKey]; } #pragma mark - Donor methods diff --git a/GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h b/GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h index 314ceec..fc07f0a 100644 --- a/GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h +++ b/GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h @@ -18,8 +18,6 @@ @class GULObjectSwizzler; -FOUNDATION_EXPORT NSString *kSwizzlerAssociatedObjectKey; - /** This class exists as a method donor. These methods will be added to all objects that are * swizzled by the object swizzler. This class should not be instantiated. */ diff --git a/GoogleUtilities/Tests/Unit/Swizzler/GULObjectSwizzlerTest.m b/GoogleUtilities/Tests/Unit/Swizzler/GULObjectSwizzlerTest.m index a6a2c4d..29b6150 100644 --- a/GoogleUtilities/Tests/Unit/Swizzler/GULObjectSwizzlerTest.m +++ b/GoogleUtilities/Tests/Unit/Swizzler/GULObjectSwizzlerTest.m @@ -15,7 +15,7 @@ #import #import -#import "GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULObjectSwizzler.h" +#import "GoogleUtilities/ISASwizzler/GULObjectSwizzler+Internal.h" #import "GoogleUtilities/ISASwizzler/Public/GoogleUtilities/GULSwizzledObject.h" #import "GoogleUtilities/SwizzlerTestHelpers/GULProxy.h" @@ -390,7 +390,7 @@ // Release GULObjectSwizzler [GULObjectSwizzler setAssociatedObject:object - key:kSwizzlerAssociatedObjectKey + key:kGULSwizzlerAssociatedObjectKey value:nil association:GUL_ASSOCIATION_RETAIN]; @@ -434,7 +434,7 @@ // Release GULObjectSwizzler [GULObjectSwizzler setAssociatedObject:object - key:kSwizzlerAssociatedObjectKey + key:kGULSwizzlerAssociatedObjectKey value:nil association:GUL_ASSOCIATION_RETAIN]; From 1c47ea135322768023ecdcc9db79bf3df821209f Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Wed, 3 Mar 2021 13:28:33 -0500 Subject: [PATCH 02/33] Bump version for M91 (#11) --- GoogleUtilities.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoogleUtilities.podspec b/GoogleUtilities.podspec index 2dcd5d6..ad96289 100644 --- a/GoogleUtilities.podspec +++ b/GoogleUtilities.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GoogleUtilities' - s.version = '7.2.2' + s.version = '7.3.0' s.summary = 'Google Utilities for Apple platform SDKs' s.description = <<-DESC From 539493bf0c45097dc9b76afba260623301b6bfe6 Mon Sep 17 00:00:00 2001 From: Maksym Malyhin Date: Mon, 15 Mar 2021 12:58:37 -0400 Subject: [PATCH 03/33] Add explicit dependency on Security framework to Environment subspec (#12) * Add explicit dependency on Security framework to Environment subspec * Bump podspec version * Changelog --- CHANGELOG.md | 3 +++ GoogleUtilities.podspec | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c8a166..3a9af55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 7.3.1 +- Add explicit dependency on Security framework to Environment subspec. (#12) + # 7.3.0 - Fix conflicting internal constant name and move it out of the public header. (#7635) # 7.2.2 diff --git a/GoogleUtilities.podspec b/GoogleUtilities.podspec index ad96289..c7a981d 100644 --- a/GoogleUtilities.podspec +++ b/GoogleUtilities.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'GoogleUtilities' - s.version = '7.3.0' + s.version = '7.3.1' s.summary = 'Google Utilities for Apple platform SDKs' s.description = <<-DESC @@ -39,6 +39,9 @@ other Google CocoaPods. They're not intended for direct public usage. es.source_files = 'GoogleUtilities/Environment/**/*.[mh]' es.public_header_files = 'GoogleUtilities/Environment/Public/GoogleUtilities/*.h' es.dependency 'PromisesObjC', '~> 1.2' + es.frameworks = [ + 'Security' + ] end s.subspec 'Logger' do |ls| From f74d187874e6421c0c6a2c9242f86b41910008a3 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 23 Mar 2021 15:23:33 -0700 Subject: [PATCH 04/33] Initial issue templates (#16) --- .github/ISSUE_TEMPLATE/config.yml | 6 ++++++ .github/ISSUE_TEMPLATE/issue_report.md | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/issue_report.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..0d4c3c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,6 @@ +blank_issues_enabled: false +contact_links: + - name: Google Utilities + url: https://github.com/firebase/firebase-ios-sdk/issues/new/choose + about: Google Utilities is not supported for direct usage. Please file the issue with the + product library that depends on Google Utilities instead of in this repository. diff --git a/.github/ISSUE_TEMPLATE/issue_report.md b/.github/ISSUE_TEMPLATE/issue_report.md new file mode 100644 index 0000000..95023f8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_report.md @@ -0,0 +1,9 @@ +--- +name: 🐞 Internal Issue +about: Googlers may file issues here or to track with Firebase use + https://github.com/firebase/firebase-ios-sdk/issues/new/choose +--- + From 1e0f385577a122bd935881cdcb24dbd1aa642663 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Tue, 23 Mar 2021 16:08:36 -0700 Subject: [PATCH 05/33] Issue Template fixes (#17) --- .github/ISSUE_TEMPLATE/config.yml | 3 +-- .github/ISSUE_TEMPLATE/issue_report.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0d4c3c1..29250d1 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,5 +2,4 @@ blank_issues_enabled: false contact_links: - name: Google Utilities url: https://github.com/firebase/firebase-ios-sdk/issues/new/choose - about: Google Utilities is not supported for direct usage. Please file the issue with the - product library that depends on Google Utilities instead of in this repository. + about: Google Utilities is not supported for direct usage. Please file with the product library that depends on Google Utilities. diff --git a/.github/ISSUE_TEMPLATE/issue_report.md b/.github/ISSUE_TEMPLATE/issue_report.md index 95023f8..31f1511 100644 --- a/.github/ISSUE_TEMPLATE/issue_report.md +++ b/.github/ISSUE_TEMPLATE/issue_report.md @@ -1,7 +1,6 @@ --- name: 🐞 Internal Issue -about: Googlers may file issues here or to track with Firebase use - https://github.com/firebase/firebase-ios-sdk/issues/new/choose +about: Googlers may file issues here or to track with [Firebase](https://github.com/firebase/firebase-ios-sdk/issues/new/choose) ---