Pārlūkot izejas kodu

Update GoogleUtilities' clients with repo-relative imports (#5824)

Paul Beusterien 5 gadi atpakaļ
vecāks
revīzija
3f556ddb9e
90 mainītis faili ar 596 papildinājumiem un 120 dzēšanām
  1. 21 0
      .github/workflows/spm.yml
  2. 2 2
      Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m
  3. 1 1
      Example/InstanceID/Tests/FIRInstanceIDTokenOperationsTest.m
  4. 3 3
      Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m
  5. 2 2
      Firebase/InstanceID/FIRInstanceID.m
  6. 1 1
      Firebase/InstanceID/FIRInstanceIDCheckinPreferences.m
  7. 1 1
      Firebase/InstanceID/FIRInstanceIDUtilities.m
  8. 2 1
      FirebaseAppDistribution.podspec
  9. 1 1
      FirebaseAppDistribution/Sources/FIRAppDistribution.m
  10. 5 2
      FirebaseAuth.podspec
  11. 3 3
      FirebaseAuth/Sources/Auth/FIRAuth.m
  12. 1 1
      FirebaseAuth/Sources/SystemService/FIRAuthAPNSTokenManager.m
  13. 1 1
      FirebaseAuth/Sources/Utilities/FIRAuthDefaultUIDelegate.m
  14. 1 1
      FirebaseAuth/Tests/Unit/FIRAuthTests.m
  15. 4 2
      FirebaseCore.podspec
  16. 1 1
      FirebaseCore/Sources/FIRApp.m
  17. 1 1
      FirebaseCore/Sources/FIRBundleUtil.m
  18. 2 2
      FirebaseCore/Sources/FIRHeartbeatInfo.m
  19. 2 2
      FirebaseCore/Sources/FIRLogger.m
  20. 1 1
      FirebaseCore/Tests/Unit/FIRAppTest.m
  21. 1 1
      FirebaseCore/Tests/Unit/FIRBundleUtilTest.m
  22. 1 1
      FirebaseCore/Tests/Unit/FIRHeartbeatInfoTest.m
  23. 1 1
      FirebaseCore/Tests/Unit/FIRLoggerTest.m
  24. 9 4
      FirebaseCoreDiagnostics.podspec
  25. 7 3
      FirebaseDynamicLinks.podspec
  26. 2 2
      FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinkNetworkingTests.m
  27. 2 2
      FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m
  28. 2 1
      FirebaseInAppMessaging.podspec
  29. 1 1
      FirebaseInAppMessaging/Sources/Runtime/FIRInAppMessaging+Bootstrap.m
  30. 5 3
      FirebaseInstallations.podspec
  31. 1 1
      FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m
  32. 1 1
      FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m
  33. 2 2
      FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m
  34. 2 2
      FirebaseInstallations/Source/Tests/Unit/FIRInstallationsStoreTests.m
  35. 4 2
      FirebaseInstanceID.podspec
  36. 8 4
      FirebaseMessaging.podspec
  37. 3 3
      FirebaseMessaging/Sources/FIRMessaging.m
  38. 2 2
      FirebaseMessaging/Sources/FIRMessagingAnalytics.m
  39. 1 1
      FirebaseMessaging/Sources/FIRMessagingClient.m
  40. 1 1
      FirebaseMessaging/Sources/FIRMessagingContextManagerService.m
  41. 2 2
      FirebaseMessaging/Sources/FIRMessagingPubSub.m
  42. 1 1
      FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m
  43. 1 1
      FirebaseMessaging/Sources/FIRMessagingUtilities.m
  44. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRInstanceIDWithFCMTest.m
  45. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingClientTest.m
  46. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingHandlingTest.m
  47. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingLinkHandlingTest.m
  48. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingPubSubTest.m
  49. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingRemoteNotificationsProxyTest.m
  50. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingServiceTest.m
  51. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingTest.m
  52. 1 1
      FirebaseMessaging/Tests/UnitTests/FIRMessagingTestUtilities.m
  53. 4 2
      FirebaseRemoteConfig.podspec
  54. 1 1
      FirebaseRemoteConfig/Sources/RCNConfigSettings.m
  55. 1 1
      FirebaseRemoteConfig/Sources/RCNDevice.m
  56. 1 1
      FirebaseRemoteConfig/Sources/RCNFetch.m
  57. 1 1
      FirebaseRemoteConfig/Tests/Unit/RCNInstanceIDTest.m
  58. 1 1
      FirebaseRemoteConfig/Tests/Unit/RCNRemoteConfigTest.m
  59. 14 7
      GoogleUtilities.podspec
  60. 1 1
      GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m
  61. 16 0
      GoogleUtilities/AppDelegateSwizzler/Public/dummy.h
  62. 2 2
      GoogleUtilities/Environment/GULHeartbeatDateStorage.m
  63. 1 1
      GoogleUtilities/Environment/GULSecureCoding.m
  64. 0 0
      GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h
  65. 0 0
      GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h
  66. 0 0
      GoogleUtilities/Environment/Private/GULKeychainStorage.h
  67. 0 0
      GoogleUtilities/Environment/Private/GULKeychainUtils.h
  68. 0 0
      GoogleUtilities/Environment/Private/GULSecureCoding.h
  69. 3 3
      GoogleUtilities/Environment/SecureStorage/GULKeychainStorage.m
  70. 1 1
      GoogleUtilities/Environment/SecureStorage/GULKeychainUtils.m
  71. 1 1
      GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m
  72. 1 1
      GoogleUtilities/Example/Tests/Environment/GULAppEnvironmentUtilTest.m
  73. 1 1
      GoogleUtilities/Example/Tests/Environment/GULHeartbeatDateStorageTest.m
  74. 1 1
      GoogleUtilities/Example/Tests/Environment/GULKeychainStorageTests.m
  75. 1 1
      GoogleUtilities/Example/Tests/Network/GULNetworkTest.m
  76. 1 1
      GoogleUtilities/Example/Tests/SecureCoding/GULSecureCodingTests.m
  77. 7 1
      GoogleUtilities/Logger/GULLogger.m
  78. 5 1
      GoogleUtilities/Logger/Private/GULLogger.h
  79. 1 1
      GoogleUtilities/NSData+zlib/GULNSData+zlib.m
  80. 22 0
      GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h
  81. 0 0
      GoogleUtilities/NSData+zlib/Public/GULNSData+zlib.h
  82. 1 1
      GoogleUtilities/Network/GULNetwork.m
  83. 1 1
      GoogleUtilities/Network/Private/GULNetworkLoggerProtocol.h
  84. 16 0
      GoogleUtilities/Network/Public/dummy.h
  85. 1 1
      GoogleUtilities/SceneDelegateSwizzler/GULSceneDelegateSwizzler.m
  86. 297 0
      Package.swift
  87. 47 0
      Sources/firebase-test/main.swift
  88. 17 5
      scripts/change_headers.swift
  89. 2 0
      scripts/check_no_module_imports.sh
  90. 1 1
      scripts/if_changed.sh

+ 21 - 0
.github/workflows/spm.yml

@@ -0,0 +1,21 @@
+name: spm
+
+on:
+  pull_request:
+    paths:
+    - '.github/workflows/spm.yml'
+    - 'Package.swift'
+    - 'Firebase**'
+  schedule:
+    # Run every day at 11pm (PST) - cron uses UTC times
+    - cron:  '0 7 * * *'
+
+jobs:
+  swift-build-run:
+    runs-on: macOS-latest
+    steps:
+    - uses: actions/checkout@v2
+    - name: Build
+      run: swift build
+    - name: Run
+      run: swift run

+ 2 - 2
Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m

@@ -24,11 +24,11 @@
 #import <GoogleDataTransport/GDTCORTransport.h>
 #import <GoogleDataTransportCCTSupport/GDTCCTPrioritizer.h>
 #import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import <OCMock/OCMock.h>
 #import <nanopb/pb_decode.h>
 #import <nanopb/pb_encode.h>
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"
 

+ 1 - 1
Example/InstanceID/Tests/FIRInstanceIDTokenOperationsTest.m

@@ -33,8 +33,8 @@
 #import "Firebase/InstanceID/NSError+FIRInstanceID.h"
 
 #import <FirebaseInstallations/FirebaseInstallations.h>
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
 
 static NSString *kDeviceID = @"fakeDeviceID";
 static NSString *kSecretToken = @"fakeSecretToken";

+ 3 - 3
Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m

@@ -22,9 +22,9 @@
 #import <GoogleDataTransport/GDTCORTargets.h>
 #import <GoogleDataTransport/GDTCORTransport.h>
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
-#import <GoogleUtilities/GULLogger.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
+#import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"

+ 2 - 2
Firebase/InstanceID/FIRInstanceID.m

@@ -18,8 +18,6 @@
 
 #import <FirebaseInstallations/FIRInstallations.h>
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FIRInstanceID+Private.h"
 #import "FIRInstanceIDAuthService.h"
 #import "FIRInstanceIDCheckinPreferences.h"
@@ -33,6 +31,8 @@
 #import "FIRInstanceIDUtilities.h"
 #import "FIRInstanceIDVersionUtilities.h"
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "NSError+FIRInstanceID.h"
 
 // Public constants

+ 1 - 1
Firebase/InstanceID/FIRInstanceIDCheckinPreferences.m

@@ -16,9 +16,9 @@
 
 #import "FIRInstanceIDCheckinPreferences.h"
 
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FIRInstanceIDCheckinService.h"
 #import "FIRInstanceIDUtilities.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 const NSTimeInterval kFIRInstanceIDDefaultCheckinInterval = 7 * 24 * 60 * 60;  // 7 days.
 

+ 1 - 1
Firebase/InstanceID/FIRInstanceIDUtilities.m

@@ -21,11 +21,11 @@
 #endif
 #import <sys/utsname.h>
 
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FIRInstanceID.h"
 #import "FIRInstanceIDConstants.h"
 #import "FIRInstanceIDLogger.h"
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 // Convert the macro to a string
 #define STR_EXPAND(x) #x

+ 2 - 1
FirebaseAppDistribution.podspec

@@ -25,13 +25,14 @@ iOS SDK for App Distribution for Firebase.
   s.source_files = [
     base_dir + '**/*.{c,h,m,mm}',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/AppDelegateSwizzler/Private/*.h',
   ]
   s.public_header_files = base_dir + 'Public/*.h'
   s.private_header_files = base_dir + 'Private/*.h'
 
   s.dependency 'FirebaseCore', '~> 6.8'
   s.dependency 'AppAuth', '~> 1.2.0'
-  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.5'
+  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.7'
 
   s.pod_target_xcconfig = {
     'GCC_C_LANGUAGE_STANDARD' => 'c99',

+ 1 - 1
FirebaseAppDistribution/Sources/FIRAppDistribution.m

@@ -19,8 +19,8 @@
 
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
 
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
 #import "FIRAppDistributionAppDelegateInterceptor.h"
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 
 /// Empty protocol to register with FirebaseCore's component system.
 @protocol FIRAppDistributionInstanceProvider <NSObject>

+ 5 - 2
FirebaseAuth.podspec

@@ -29,6 +29,9 @@ supports email and password accounts, as well as several 3rd party authenticatio
   s.source_files = [
     source + '**/*.[mh]',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/AppDelegateSwizzler/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/SceneDelegateSwizzler/Private/*.h',
     'Interop/Auth/Public/*.h',
   ]
   s.public_header_files = source + 'Public/*.h'
@@ -46,8 +49,8 @@ supports email and password accounts, as well as several 3rd party authenticatio
   s.framework = 'Security'
   s.ios.framework = 'SafariServices'
   s.dependency 'FirebaseCore', '~> 6.8'
-  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.5'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
+  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.7'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
   s.dependency 'GTMSessionFetcher/Core', '~> 1.1'
 
   s.test_spec 'unit' do |unit_tests|

+ 3 - 3
FirebaseAuth/Sources/Auth/FIRAuth.m

@@ -23,10 +23,10 @@
 #endif
 
 #import <FirebaseAuth/FirebaseAuth.h>
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULSceneDelegateSwizzler.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/SceneDelegateSwizzler/Private/GULSceneDelegateSwizzler.h"
 
 #import "FirebaseAuth/Sources/Auth/FIRAuthDataResult_Internal.h"
 #import "FirebaseAuth/Sources/Auth/FIRAuthDispatcher.h"

+ 1 - 1
FirebaseAuth/Sources/SystemService/FIRAuthAPNSTokenManager.m

@@ -17,8 +17,8 @@
 #include <TargetConditionals.h>
 #if !TARGET_OS_OSX
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 #import "FirebaseAuth/Sources/Auth/FIRAuthGlobalWorkQueue.h"
 #import "FirebaseAuth/Sources/SystemService/FIRAuthAPNSToken.h"

+ 1 - 1
FirebaseAuth/Sources/Utilities/FIRAuthDefaultUIDelegate.m

@@ -17,8 +17,8 @@
 #include <TargetConditionals.h>
 #if !TARGET_OS_OSX
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import <UIKit/UIKit.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 #import "FirebaseAuth/Sources/Utilities/FIRAuthDefaultUIDelegate.h"
 

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

@@ -21,10 +21,10 @@
 #import <FirebaseAuth/FIRGoogleAuthProvider.h>
 #import <FirebaseAuth/FIROAuthProvider.h>
 #import <Foundation/Foundation.h>
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 #import "Interop/Auth/Public/FIRAuthInterop.h"
 
 #import "FirebaseAuth/Sources/Auth/FIRAuthDispatcher.h"

+ 4 - 2
FirebaseCore.podspec

@@ -27,6 +27,8 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
 
   s.source_files = [
     'FirebaseCore/Sources/**/*.[mh]',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/Logger/Private/*.h',
     'Interop/CoreDiagnostics/Public/*.h',
   ]
   s.public_header_files = 'FirebaseCore/Sources/Public/*.h', 'FirebaseCore/Sources/Private/*.h'
@@ -36,8 +38,8 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
   s.ios.framework = 'UIKit'
   s.osx.framework = 'AppKit'
   s.tvos.framework = 'UIKit'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
-  s.dependency 'GoogleUtilities/Logger', '~> 6.5'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
+  s.dependency 'GoogleUtilities/Logger', '~> 6.7'
   s.dependency 'FirebaseCoreDiagnostics', '~> 1.3'
 
   s.pod_target_xcconfig = {

+ 1 - 1
FirebaseCore/Sources/FIRApp.m

@@ -35,7 +35,7 @@
 #import "FirebaseCore/Sources/Private/FIRLogger.h"
 #import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 #import <objc/runtime.h>
 

+ 1 - 1
FirebaseCore/Sources/FIRBundleUtil.m

@@ -14,7 +14,7 @@
 
 #import "FirebaseCore/Sources/FIRBundleUtil.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 @implementation FIRBundleUtil
 

+ 2 - 2
FirebaseCore/Sources/FIRHeartbeatInfo.m

@@ -13,8 +13,8 @@
 // limitations under the License.
 
 #import "FirebaseCore/Sources/Private/FIRHeartbeatInfo.h"
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
-#import <GoogleUtilities/GULLogger.h>
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
+#import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 const static long secondsInDay = 86400;
 @implementation FIRHeartbeatInfo : NSObject

+ 2 - 2
FirebaseCore/Sources/FIRLogger.m

@@ -14,9 +14,9 @@
 
 #import "FirebaseCore/Sources/Private/FIRLogger.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULLogger.h>
 #import "FirebaseCore/Sources/Public/FIRLoggerLevel.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 #import "FirebaseCore/Sources/FIRVersion.h"
 

+ 1 - 1
FirebaseCore/Tests/Unit/FIRAppTest.m

@@ -20,7 +20,7 @@
 #import "FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h"
 #import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 NSString *const kFIRTestAppName1 = @"test_app_name_1";
 NSString *const kFIRTestAppName2 = @"test-app-name-2";

+ 1 - 1
FirebaseCore/Tests/Unit/FIRBundleUtilTest.m

@@ -14,8 +14,8 @@
 
 #import "FirebaseCore/Tests/Unit/FIRTestCase.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseCore/Sources/FIRBundleUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 static NSString *const kResultPath = @"resultPath";
 static NSString *const kResourceName = @"resourceName";

+ 1 - 1
FirebaseCore/Tests/Unit/FIRHeartbeatInfoTest.m

@@ -12,9 +12,9 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
 #import <XCTest/XCTest.h>
 #import "FirebaseCore/Sources/Private/FIRHeartbeatInfo.h"
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
 
 @interface FIRHeartbeatInfoTest : XCTestCase
 

+ 1 - 1
FirebaseCore/Tests/Unit/FIRLoggerTest.m

@@ -19,8 +19,8 @@
 
 // TODO - FIRLoggerTest should be split into a separate FIRLoggerTest and GULLoggerTest.
 // No test should include both includes.
-#import <GoogleUtilities/GULLogger.h>
 #import "FirebaseCore/Sources/Private/FIRLogger.h"
+#import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 #import <asl.h>
 

+ 9 - 4
FirebaseCoreDiagnostics.podspec

@@ -45,22 +45,27 @@ non-Cocoapod integration. This library also respects the Firebase global data co
 
   s.source_files = [
     'Firebase/CoreDiagnostics/FIRCDLibrary/**/*.[cmh]',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/Logger/Private/*.h',
     'Interop/CoreDiagnostics/Public/*.h',
   ]
 
   s.framework = 'Foundation'
 
   s.dependency 'GoogleDataTransportCCTSupport', '~> 3.1'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
-  s.dependency 'GoogleUtilities/Logger', '~> 6.5'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
+  s.dependency 'GoogleUtilities/Logger', '~> 6.7'
   s.dependency 'nanopb', '~> 1.30905.0'
 
   s.test_spec 'unit' do |unit_tests|
     unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
     unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
-    unit_tests.dependency 'GoogleUtilities/UserDefaults', '~> 6.2'
+    unit_tests.dependency 'GoogleUtilities/UserDefaults', '~> 6.7'
     unit_tests.dependency 'OCMock'
-    unit_tests.source_files = 'Example/CoreDiagnostics/Tests/**/*.[mh]'
+    unit_tests.source_files = [
+      'Example/CoreDiagnostics/Tests/**/*.[mh]',
+      'GoogleUtilities/UserDefaults/Private/*.h',
+    ]
     unit_tests.requires_app_host = false
   end
 end

+ 7 - 3
FirebaseDynamicLinks.podspec

@@ -40,13 +40,17 @@ Firebase Dynamic Links are deep links that enhance user experience and increase
   }
 
   s.test_spec 'unit' do |unit_tests|
-    unit_tests.source_files = 'FirebaseDynamicLinks/Tests/Unit/*.[mh]'
+    unit_tests.source_files = [
+      'FirebaseDynamicLinks/Tests/Unit/*.[mh]',
+      'GoogleUtilities/SwizzlerTestHelpers/*.h',
+      'GoogleUtilities/MethodSwizzler/Private/*.h',
+    ]
     unit_tests.requires_app_host = true
     unit_tests.resources = 'FirebaseDynamicLinks/Tests/Unit/GoogleService-Info.plist',
                            # Supply plist for custom domain testing.
                            'FirebaseDynamicLinks/Tests/Unit/DL-Info.plist'
     unit_tests.dependency 'OCMock'
-    unit_tests.dependency 'GoogleUtilities/MethodSwizzler', '~> 6.2'
-    unit_tests.dependency 'GoogleUtilities/SwizzlerTestHelpers', '~> 6.2'
+    unit_tests.dependency 'GoogleUtilities/MethodSwizzler', '~> 6.7'
+    unit_tests.dependency 'GoogleUtilities/SwizzlerTestHelpers', '~> 6.7'
   end
 end

+ 2 - 2
FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinkNetworkingTests.m

@@ -18,9 +18,9 @@
 
 #import <OCMock/OCMock.h>
 
-#import <GoogleUtilities/GULSwizzler+Unswizzle.h>
-#import <GoogleUtilities/GULSwizzler.h>
 #import "FirebaseDynamicLinks/Sources/FIRDynamicLinkNetworking+Private.h"
+#import "GoogleUtilities/MethodSwizzler/Private/GULSwizzler.h"
+#import "GoogleUtilities/SwizzlerTestHelpers/GULSwizzler+Unswizzle.h"
 
 static NSString *const kAPIKey = @"myfakeapikey";
 static NSString *const kClientID = @"myfakeclientid";

+ 2 - 2
FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m

@@ -16,8 +16,6 @@
 
 #import <XCTest/XCTest.h>
 
-#import <GoogleUtilities/GULSwizzler+Unswizzle.h>
-#import <GoogleUtilities/GULSwizzler.h>
 #import <OCMock/OCMock.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
 #import "FirebaseDynamicLinks/Sources/FIRDLDefaultRetrievalProcessV2.h"
@@ -28,6 +26,8 @@
 #import "FirebaseDynamicLinks/Sources/FIRDynamicLinks+FirstParty.h"
 #import "FirebaseDynamicLinks/Sources/FIRDynamicLinks+Private.h"
 #import "FirebaseDynamicLinks/Sources/Utilities/FDLUtilities.h"
+#import "GoogleUtilities/MethodSwizzler/Private/GULSwizzler.h"
+#import "GoogleUtilities/SwizzlerTestHelpers/GULSwizzler+Unswizzle.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 static NSString *const kAPIKey = @"myAPIKey";

+ 2 - 1
FirebaseInAppMessaging.podspec

@@ -28,6 +28,7 @@ See more product details at https://firebase.google.com/products/in-app-messagin
     base_dir + "Sources/**/*.[cmh]",
     'Interop/Analytics/Public/*.h',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
   ]
   s.public_header_files = base_dir + 'Sources/Public/*.h'
   s.private_header_files = base_dir + 'Sources/Private/**/*.h'
@@ -51,7 +52,7 @@ See more product details at https://firebase.google.com/products/in-app-messagin
   s.dependency 'FirebaseInstallations', '~> 1.1'
   s.dependency 'GoogleDataTransportCCTSupport', '~> 3.1'
   s.dependency 'FirebaseABTesting', '~> 3.2'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
   s.dependency 'nanopb', '~> 1.30905.0'
 
   s.test_spec 'unit' do |unit_tests|

+ 1 - 1
FirebaseInAppMessaging/Sources/Runtime/FIRInAppMessaging+Bootstrap.m

@@ -16,8 +16,8 @@
 
 #import "FIRInAppMessaging+Bootstrap.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 #import "FIRCore+InAppMessaging.h"

+ 5 - 3
FirebaseInstallations.podspec

@@ -28,15 +28,17 @@ Pod::Spec.new do |s|
   base_dir = "FirebaseInstallations/Source/"
   s.source_files = [
     base_dir + 'Library/**/*.[mh]',
-    'FirebaseCore/Sources/Private/*.h'
+    'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/UserDefaults/Private/*.h',
   ]
   s.public_header_files = base_dir + 'Library/Public/*.h'
 
   s.framework = 'Security'
   s.dependency 'FirebaseCore', '~> 6.8'
   s.dependency 'PromisesObjC', '~> 1.2'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.6'
-  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.6'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
+  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.7'
 
   preprocessor_definitions = 'FIRInstallations_LIB_VERSION=' + String(s.version)
   if ENV['FIS_ALLOWS_INCOMPATIBLE_IID_VERSION'] && ENV['FIS_ALLOWS_INCOMPATIBLE_IID_VERSION'] == '1' then

+ 1 - 1
FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m

@@ -22,7 +22,7 @@
 #import "FBLPromises.h"
 #endif
 
-#import <GoogleUtilities/GULKeychainUtils.h>
+#import "GoogleUtilities/Environment/Private/GULKeychainUtils.h"
 
 #import "FIRInstallationsErrorUtil.h"
 

+ 1 - 1
FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m

@@ -22,8 +22,8 @@
 #import "FBLPromises.h"
 #endif
 
-#import <GoogleUtilities/GULKeychainStorage.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h"
 
 #import "FIRInstallationsAPIService.h"
 #import "FIRInstallationsErrorUtil.h"

+ 2 - 2
FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m

@@ -16,7 +16,7 @@
 
 #import "FIRInstallationsStore.h"
 
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #if __has_include(<FBLPromises/FBLPromises.h>)
 #import <FBLPromises/FBLPromises.h>
@@ -24,7 +24,7 @@
 #import "FBLPromises.h"
 #endif
 
-#import <GoogleUtilities/GULKeychainStorage.h>
+#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h"
 
 #import "FIRInstallationsErrorUtil.h"
 #import "FIRInstallationsItem.h"

+ 2 - 2
FirebaseInstallations/Source/Tests/Unit/FIRInstallationsStoreTests.m

@@ -18,8 +18,8 @@
 
 #import <OCMock/OCMock.h>
 
-#import <GoogleUtilities/GULKeychainStorage.h>
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #import "FBLPromise+Testing.h"
 #import "FIRInstallationsErrorUtil.h"

+ 4 - 2
FirebaseInstanceID.podspec

@@ -31,6 +31,8 @@ services.
   s.source_files = [
     base_dir + '**/*.[mh]',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/UserDefaults/Private/*.h',
   ]
   s.requires_arc = base_dir + '*.m'
   s.public_header_files = base_dir + 'Public/*.h', base_dir + 'Private/*.h'
@@ -43,8 +45,8 @@ services.
   s.framework = 'Security'
   s.dependency 'FirebaseCore', '~> 6.8'
   s.dependency 'FirebaseInstallations', '~> 1.0'
-  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.5'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
+  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.7'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
 
   s.test_spec 'unit' do |unit_tests|
     unit_tests.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}

+ 8 - 4
FirebaseMessaging.podspec

@@ -33,6 +33,10 @@ device, and it is completely free.
     base_dir + 'Sources/**/*.[mh]',
     'Interop/Analytics/Public/*.h',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/AppDelegateSwizzler/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/Reachability/Private/*.h',
+    'GoogleUtilities/UserDefaults/Private/*.h',
   ]
   s.requires_arc = base_dir + 'Sources/*.m'
   s.public_header_files = base_dir + 'Sources/Public/*.h'
@@ -51,10 +55,10 @@ device, and it is completely free.
   s.weak_framework = 'UserNotifications'
   s.dependency 'FirebaseCore', '~> 6.8'
   s.dependency 'FirebaseInstanceID', '~> 4.3'
-  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.5'
-  s.dependency 'GoogleUtilities/Reachability', '~> 6.5'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.5'
-  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.5'
+  s.dependency 'GoogleUtilities/AppDelegateSwizzler', '~> 6.7'
+  s.dependency 'GoogleUtilities/Reachability', '~> 6.7'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
+  s.dependency 'GoogleUtilities/UserDefaults', '~> 6.7'
   s.dependency 'Protobuf', '~> 3.9', '>= 3.9.2'
 
   s.test_spec 'unit' do |unit_tests|

+ 3 - 3
FirebaseMessaging/Sources/FIRMessaging.m

@@ -22,10 +22,10 @@
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
 #import <FirebaseMessaging/FIRMessaging.h>
 #import <FirebaseMessaging/FIRMessagingExtensionHelper.h>
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
-#import <GoogleUtilities/GULReachabilityChecker.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
+#import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingAnalytics.h"

+ 2 - 2
FirebaseMessaging/Sources/FIRMessagingAnalytics.m

@@ -16,8 +16,8 @@
 
 #import "FirebaseMessaging/Sources/FIRMessagingAnalytics.h"
 
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 #import "Interop/Analytics/Public/FIRInteropEventNames.h"
 #import "Interop/Analytics/Public/FIRInteropParameterNames.h"
 

+ 1 - 1
FirebaseMessaging/Sources/FIRMessagingClient.m

@@ -20,7 +20,7 @@
 
 #import <FirebaseInstanceID/FIRInstanceID_Private.h>
 #import <FirebaseMessaging/FIRMessaging.h>
-#import <GoogleUtilities/GULReachabilityChecker.h>
+#import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingConnection.h"
 #import "FirebaseMessaging/Sources/FIRMessagingConstants.h"

+ 1 - 1
FirebaseMessaging/Sources/FIRMessagingContextManagerService.m

@@ -25,7 +25,7 @@
 #import "FirebaseMessaging/Sources/FIRMessagingLogger.h"
 #import "FirebaseMessaging/Sources/FIRMessagingUtilities.h"
 
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 
 #define kFIRMessagingContextManagerPrefix @"gcm."
 #define kFIRMessagingContextManagerPrefixKey @"google.c.cm."

+ 2 - 2
FirebaseMessaging/Sources/FIRMessagingPubSub.m

@@ -17,8 +17,8 @@
 #import "FirebaseMessaging/Sources/FIRMessagingPubSub.h"
 
 #import <FirebaseMessaging/FIRMessaging.h>
-#import <GoogleUtilities/GULSecureCoding.h>
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/Environment/Private/GULSecureCoding.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingClient.h"
 #import "FirebaseMessaging/Sources/FIRMessagingDefines.h"

+ 1 - 1
FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m

@@ -18,11 +18,11 @@
 
 #import <objc/runtime.h>
 
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
 #import "FirebaseMessaging/Sources/FIRMessagingConstants.h"
 #import "FirebaseMessaging/Sources/FIRMessagingLogger.h"
 #import "FirebaseMessaging/Sources/FIRMessagingUtilities.h"
 #import "FirebaseMessaging/Sources/FIRMessaging_Private.h"
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 
 static void *UserNotificationObserverContext = &UserNotificationObserverContext;
 

+ 1 - 1
FirebaseMessaging/Sources/FIRMessagingUtilities.m

@@ -20,7 +20,7 @@
 
 #import "FirebaseMessaging/Sources/FIRMessagingLogger.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 // Convert the macro to a string
 #define STR_EXPAND(x) #x

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRInstanceIDWithFCMTest.m

@@ -18,8 +18,8 @@
 #import <XCTest/XCTest.h>
 
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #import <FirebaseMessaging/FIRMessaging.h>
 

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingClientTest.m

@@ -19,7 +19,7 @@
 
 #import <FirebaseInstallations/FIRInstallations.h>
 #import <FirebaseInstanceID/FIRInstanceID_Private.h>
-#import <GoogleUtilities/GULReachabilityChecker.h>
+#import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingClient.h"
 #import "FirebaseMessaging/Sources/FIRMessagingConnection.h"

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingHandlingTest.m

@@ -20,8 +20,8 @@
 
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
 #import <FirebaseMessaging/FIRMessaging.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingAnalytics.h"

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingLinkHandlingTest.m

@@ -18,7 +18,7 @@
 #import <XCTest/XCTest.h>
 
 #import <FirebaseInstanceID/FIRInstanceID.h>
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #import <FirebaseMessaging/FIRMessaging.h>
 

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingPubSubTest.m

@@ -17,7 +17,7 @@
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 
-#import <GoogleUtilities/GULReachabilityChecker.h>
+#import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingClient.h"
 #import "FirebaseMessaging/Sources/FIRMessagingPendingTopicsList.h"

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingRemoteNotificationsProxyTest.m

@@ -22,7 +22,7 @@
 #import <XCTest/XCTest.h>
 
 #import <FirebaseMessaging/FIRMessaging.h>
-#import <GoogleUtilities/GULAppDelegateSwizzler.h>
+#import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.h"
 

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingServiceTest.m

@@ -18,7 +18,7 @@
 #import <XCTest/XCTest.h>
 
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 
 #import <FirebaseMessaging/FIRMessaging.h>
 #import "FirebaseMessaging/Sources/FIRMessagingClient.h"

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingTest.m

@@ -19,8 +19,8 @@
 #import <OCMock/OCMock.h>
 
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
-#import <GoogleUtilities/GULUserDefaults.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 #import <FirebaseMessaging/FIRMessaging.h>

+ 1 - 1
FirebaseMessaging/Tests/UnitTests/FIRMessagingTestUtilities.m

@@ -22,7 +22,7 @@
 
 #import <FirebaseInstallations/FIRInstallations.h>
 #import <FirebaseInstanceID/FirebaseInstanceID.h>
-#import <GoogleUtilities/GULUserDefaults.h>
+#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
 #import "FirebaseMessaging/Sources/FIRMessagingPubSub.h"

+ 4 - 2
FirebaseRemoteConfig.podspec

@@ -31,6 +31,8 @@ app update.
     base_dir + '**/*.[mh]',
     'Interop/Analytics/Public/*.h',
     'FirebaseCore/Sources/Private/*.h',
+    'GoogleUtilities/Environment/Private/*.h',
+    'GoogleUtilities/NSData+zlib/Private/*.h',
   ]
   s.public_header_files = base_dir + 'Public/*.h'
   s.private_header_files = base_dir + 'Private/*.h'
@@ -44,8 +46,8 @@ app update.
   s.dependency 'FirebaseABTesting', '~> 3.1'
   s.dependency 'FirebaseCore', '~> 6.8'
   s.dependency 'FirebaseInstallations', '~> 1.1'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.2'
-  s.dependency 'GoogleUtilities/NSData+zlib', '~> 6.2'
+  s.dependency 'GoogleUtilities/Environment', '~> 6.7'
+  s.dependency 'GoogleUtilities/NSData+zlib', '~> 6.7'
 
   s.test_spec 'unit' do |unit_tests|
     # TODO(dmandar) - Update or delete the commented files.

+ 1 - 1
FirebaseRemoteConfig/Sources/RCNConfigSettings.m

@@ -22,8 +22,8 @@
 #import "FirebaseRemoteConfig/Sources/RCNDevice.h"
 #import "FirebaseRemoteConfig/Sources/RCNUserDefaultsManager.h"
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 static NSString *const kRCNGroupPrefix = @"frc.group.";
 static NSString *const kRCNUserDefaultsKeyNamelastETag = @"lastETag";

+ 1 - 1
FirebaseRemoteConfig/Sources/RCNDevice.m

@@ -18,9 +18,9 @@
 
 #import <sys/utsname.h>
 
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
 #import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 #define STR(x) STR_EXPAND(x)
 #define STR_EXPAND(x) #x

+ 1 - 1
FirebaseRemoteConfig/Sources/RCNFetch.m

@@ -17,13 +17,13 @@
 #import "FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h"
 
 #import <FirebaseInstallations/FirebaseInstallations.h>
-#import <GoogleUtilities/GULNSData+zlib.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
 #import "FirebaseRemoteConfig/Sources/Private/RCNConfigSettings.h"
 #import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
 #import "FirebaseRemoteConfig/Sources/RCNConfigContent.h"
 #import "FirebaseRemoteConfig/Sources/RCNConfigExperiment.h"
 #import "FirebaseRemoteConfig/Sources/RCNDevice.h"
+#import "GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h"
 
 #ifdef RCN_STAGING_SERVER
 static NSString *const kServerURLDomain =

+ 1 - 1
FirebaseRemoteConfig/Tests/Unit/RCNInstanceIDTest.m

@@ -26,9 +26,9 @@
 #import "FirebaseRemoteConfig/Tests/Unit/RCNTestUtilities.h"
 
 #import <FirebaseInstallations/FirebaseInstallations.h>
-#import <GoogleUtilities/GULNSData+zlib.h>
 #import <OCMock/OCMock.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h"
 
 @interface RCNConfigFetch (ForTest)
 - (instancetype)initWithContent:(RCNConfigContent *)content

+ 1 - 1
FirebaseRemoteConfig/Tests/Unit/RCNRemoteConfigTest.m

@@ -25,10 +25,10 @@
 
 #import "FirebaseRemoteConfig/Tests/Unit/RCNTestUtilities.h"
 
-#import <GoogleUtilities/GULNSData+zlib.h>
 #import <OCMock/OCMStubRecorder.h>
 #import <OCMock/OCMock.h>
 #import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
+#import "GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h"
 
 @interface RCNConfigFetch (ForTest)
 - (instancetype)initWithContent:(RCNConfigContent *)content

+ 14 - 7
GoogleUtilities.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name             = 'GoogleUtilities'
-  s.version          = '6.6.0'
+  s.version          = '6.7.0'
   s.summary          = 'Google Utilities for iOS (plus community support for macOS and tvOS)'
 
   s.description      = <<-DESC
@@ -32,8 +32,8 @@ other Google CocoaPods. They're not intended for direct public usage.
 
   s.subspec 'Environment' do |es|
     es.source_files = 'GoogleUtilities/Environment/**/*.[mh]'
-    es.public_header_files = 'GoogleUtilities/Environment/**/*.h'
-    es.private_header_files = 'GoogleUtilities/Environment/**/*.h'
+    es.public_header_files = 'GoogleUtilities/Environment/Private/*.h'
+    es.private_header_files = 'GoogleUtilities/Environment/Private/*.h'
 
     es.dependency 'PromisesObjC', '~> 1.2'
   end
@@ -47,7 +47,7 @@ other Google CocoaPods. They're not intended for direct public usage.
 
 
   s.subspec 'Network' do |ns|
-    ns.source_files = 'GoogleUtilities/Network/**/*.[mh]'
+    ns.source_files = 'GoogleUtilities/Network/*.m', 'GoogleUtilities/Network/Private/*.h'
     ns.public_header_files = 'GoogleUtilities/Network/Private/*.h'
     ns.private_header_files = 'GoogleUtilities/Network/Private/*.h'
     ns.dependency 'GoogleUtilities/NSData+zlib'
@@ -59,8 +59,9 @@ other Google CocoaPods. They're not intended for direct public usage.
   end
 
   s.subspec 'NSData+zlib' do |ns|
-    ns.source_files = 'GoogleUtilities/NSData+zlib/*.[mh]'
-    ns.public_header_files = 'GoogleUtilities/NSData+zlib/GULNSData+zlib.h'
+    ns.source_files = 'GoogleUtilities/NSData+zlib/**/*.[mh]'
+    ns.public_header_files = 'GoogleUtilities/NSData+zlib/Public/*.h', 'GoogleUtilities/NSData+zlib/Private/*.h'
+    ns.private_header_files = 'GoogleUtilities/NSData+zlib/Private/*.h'
     ns.libraries = [
       'z'
     ]
@@ -83,7 +84,13 @@ other Google CocoaPods. They're not intended for direct public usage.
   end
 
   s.subspec 'AppDelegateSwizzler' do |adss|
-    adss.source_files = 'GoogleUtilities/AppDelegateSwizzler/**/*.[mh]', 'GoogleUtilities/SceneDelegateSwizzler/**/*.[mh]', 'GoogleUtilities/Common/*.h'
+    adss.source_files = [
+      'GoogleUtilities/AppDelegateSwizzler/Internal/*.h',
+      'GoogleUtilities/AppDelegateSwizzler/Private/*.h',
+      'GoogleUtilities/AppDelegateSwizzler/*.m',
+      'GoogleUtilities/SceneDelegateSwizzler/**/*.[mh]',
+      'GoogleUtilities/Common/*.h',
+    ]
     adss.public_header_files = 'GoogleUtilities/AppDelegateSwizzler/Private/*.h', 'GoogleUtilities/SceneDelegateSwizzler/Private/*.h'
     adss.private_header_files = 'GoogleUtilities/AppDelegateSwizzler/Private/*.h', 'GoogleUtilities/SceneDelegateSwizzler/Private/*.h'
     adss.dependency 'GoogleUtilities/Logger'

+ 1 - 1
GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m

@@ -17,7 +17,7 @@
 #import "GoogleUtilities/AppDelegateSwizzler/Internal/GULAppDelegateSwizzler_Private.h"
 #import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 #import "GoogleUtilities/Common/GULLoggerCodes.h"
-#import "GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 #import "GoogleUtilities/Logger/Private/GULLogger.h"
 #import "GoogleUtilities/Network/Private/GULMutableDictionary.h"
 

+ 16 - 0
GoogleUtilities/AppDelegateSwizzler/Public/dummy.h

@@ -0,0 +1,16 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Dummy public header to satisfy Swift Package Manager since Private cannot be
+// used because of its self-references.

+ 2 - 2
GoogleUtilities/Environment/GULHeartbeatDateStorage.m

@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#import "GoogleUtilities/Environment/Public/GULHeartbeatDateStorage.h"
-#import "GoogleUtilities/Environment/Public/GULSecureCoding.h"
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
+#import "GoogleUtilities/Environment/Private/GULSecureCoding.h"
 
 @interface GULHeartbeatDateStorage ()
 /** The storage to store the date of the last sent heartbeat. */

+ 1 - 1
GoogleUtilities/Environment/GULSecureCoding.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleUtilities/Environment/Public/GULSecureCoding.h"
+#import "GoogleUtilities/Environment/Private/GULSecureCoding.h"
 
 NSString *const kGULSecureCodingError = @"GULSecureCodingError";
 

+ 0 - 0
GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h → GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h


+ 0 - 0
GoogleUtilities/Environment/Public/GULHeartbeatDateStorage.h → GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h


+ 0 - 0
GoogleUtilities/Environment/Public/GULKeychainStorage.h → GoogleUtilities/Environment/Private/GULKeychainStorage.h


+ 0 - 0
GoogleUtilities/Environment/Public/GULKeychainUtils.h → GoogleUtilities/Environment/Private/GULKeychainUtils.h


+ 0 - 0
GoogleUtilities/Environment/Public/GULSecureCoding.h → GoogleUtilities/Environment/Private/GULSecureCoding.h


+ 3 - 3
GoogleUtilities/Environment/SecureStorage/GULKeychainStorage.m

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#import "GoogleUtilities/Environment/Public/GULKeychainStorage.h"
+#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h"
 #import <Security/Security.h>
 
 #if __has_include(<FBLPromises/FBLPromises.h>)
@@ -23,8 +23,8 @@
 #import "FBLPromises.h"
 #endif
 
-#import "GoogleUtilities/Environment/Public/GULKeychainUtils.h"
-#import "GoogleUtilities/Environment/Public/GULSecureCoding.h"
+#import "GoogleUtilities/Environment/Private/GULKeychainUtils.h"
+#import "GoogleUtilities/Environment/Private/GULSecureCoding.h"
 
 @interface GULKeychainStorage ()
 @property(nonatomic, readonly) dispatch_queue_t keychainQueue;

+ 1 - 1
GoogleUtilities/Environment/SecureStorage/GULKeychainUtils.m

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#import "GoogleUtilities/Environment/Public/GULKeychainUtils.h"
+#import "GoogleUtilities/Environment/Private/GULKeychainUtils.h"
 
 NSString *const kGULKeychainUtilsErrorDomain = @"com.gul.keychain.ErrorDomain";
 

+ 1 - 1
GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 #import <Foundation/Foundation.h>
 #import <dlfcn.h>

+ 1 - 1
GoogleUtilities/Example/Tests/Environment/GULAppEnvironmentUtilTest.m

@@ -16,7 +16,7 @@
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 
-#import "GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 
 @interface GULAppEnvironmentUtilTest : XCTestCase
 

+ 1 - 1
GoogleUtilities/Example/Tests/Environment/GULHeartbeatDateStorageTest.m

@@ -15,7 +15,7 @@
  */
 
 #import <XCTest/XCTest.h>
-#import "GoogleUtilities/Environment/Public/GULHeartbeatDateStorage.h"
+#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h"
 
 @interface GULHeartbeatDateStorageTest : XCTestCase
 @property(nonatomic) NSURL *fileURL;

+ 1 - 1
GoogleUtilities/Example/Tests/Environment/GULKeychainStorageTests.m

@@ -20,7 +20,7 @@
 #import "FBLPromise+Testing.h"
 #import "GoogleUtilities/Example/Tests/Utils/GULTestKeychain.h"
 
-#import "GoogleUtilities/Environment/Public/GULKeychainStorage.h"
+#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h"
 
 @interface GULKeychainStorage (Tests)
 - (instancetype)initWithService:(NSString *)service cache:(NSCache *)cache;

+ 1 - 1
GoogleUtilities/Example/Tests/Network/GULNetworkTest.m

@@ -17,7 +17,7 @@
 #import <OCMock/OCMock.h>
 #import <XCTest/XCTest.h>
 
-#import "GoogleUtilities/NSData+zlib/GULNSData+zlib.h"
+#import "GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h"
 #import "GoogleUtilities/Network/Private/GULNetwork.h"
 #import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"
 

+ 1 - 1
GoogleUtilities/Example/Tests/SecureCoding/GULSecureCodingTests.m

@@ -14,7 +14,7 @@
 
 #import <XCTest/XCTest.h>
 
-#import "GoogleUtilities/Environment/Public/GULSecureCoding.h"
+#import "GoogleUtilities/Environment/Private/GULSecureCoding.h"
 
 @interface SecureCodingIncompatibleObject : NSObject <NSCoding>
 @end

+ 7 - 1
GoogleUtilities/Logger/GULLogger.m

@@ -12,11 +12,17 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#if SWIFT_PACKAGE
+// Need to import the public header here, since the module won't exist yet.
+// Restructure the GULLogger headers for Firebase 7.
+#import "GoogleUtilities/Logger/Public/GULLoggerLevel.h"
+#endif
+
 #import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 #include <asl.h>
 
-#import "GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 #import "GoogleUtilities/Logger/Public/GULLoggerLevel.h"
 
 /// ASL client facility name used by GULLogger.

+ 5 - 1
GoogleUtilities/Logger/Private/GULLogger.h

@@ -16,7 +16,11 @@
 
 #import <Foundation/Foundation.h>
 
-#import "GoogleUtilities/Logger/Public/GULLoggerLevel.h"
+#if SWIFT_PACKAGE
+@import GoogleUtilities_Logger;
+#else
+#import <GoogleUtilities/GULLoggerLevel.h>
+#endif
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 1 - 1
GoogleUtilities/NSData+zlib/GULNSData+zlib.m

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleUtilities/NSData+zlib/GULNSData+zlib.h"
+#import "GoogleUtilities/NSData+zlib/Public/GULNSData+zlib.h"
 
 #import <zlib.h>
 

+ 22 - 0
GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h

@@ -0,0 +1,22 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// An umbrella header, for any other libraries in this repo to access Firebase Public and Private
+// headers. Any package manager complexity should be handled here.
+
+#if SWIFT_PACKAGE
+@import GoogleUtilities_NSData;
+#else
+#import <GoogleUtilities/GULNSData+zlib.h>
+#endif

+ 0 - 0
GoogleUtilities/NSData+zlib/GULNSData+zlib.h → GoogleUtilities/NSData+zlib/Public/GULNSData+zlib.h


+ 1 - 1
GoogleUtilities/Network/GULNetwork.m

@@ -16,7 +16,7 @@
 #import "GoogleUtilities/Network/Private/GULNetworkMessageCode.h"
 
 #import "GoogleUtilities/Logger/Private/GULLogger.h"
-#import "GoogleUtilities/NSData+zlib/GULNSData+zlib.h"
+#import "GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h"
 #import "GoogleUtilities/Network/Private/GULMutableDictionary.h"
 #import "GoogleUtilities/Network/Private/GULNetworkConstants.h"
 #import "GoogleUtilities/Reachability/Private/GULReachabilityChecker.h"

+ 1 - 1
GoogleUtilities/Network/Private/GULNetworkLoggerProtocol.h

@@ -16,7 +16,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "GoogleUtilities/Logger/Public/GULLoggerLevel.h"
+#import "GoogleUtilities/Logger/Private/GULLogger.h"
 
 #import "GoogleUtilities/Network/Private/GULNetworkMessageCode.h"
 

+ 16 - 0
GoogleUtilities/Network/Public/dummy.h

@@ -0,0 +1,16 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Dummy public header to satisfy Swift Package Manager since Private cannot be
+// used because of its self-references.

+ 1 - 1
GoogleUtilities/SceneDelegateSwizzler/GULSceneDelegateSwizzler.m

@@ -16,7 +16,7 @@
 
 #import "GoogleUtilities/AppDelegateSwizzler/Private/GULAppDelegateSwizzler.h"
 #import "GoogleUtilities/Common/GULLoggerCodes.h"
-#import "GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h"
+#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h"
 #import "GoogleUtilities/Logger/Private/GULLogger.h"
 #import "GoogleUtilities/Network/Private/GULMutableDictionary.h"
 #import "GoogleUtilities/SceneDelegateSwizzler/Internal/GULSceneDelegateSwizzler_Private.h"

+ 297 - 0
Package.swift

@@ -0,0 +1,297 @@
+// swift-tools-version:5.0
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This Package.swift is a Work in Progress, primarily for CI at this point.
+// Those interested in experimenting with Swift Package Manager should use the
+// spm-master2020 branch for now.
+
+import PackageDescription
+
+let package = Package(
+  name: "Firebase",
+  platforms: [.iOS(.v9), .macOS(.v10_11), .tvOS(.v10)],
+  products: [
+    // Products define the executables and libraries produced by a package, and make them visible to
+    // other packages.
+    // This is a test-only executable for us to try `swift run` and use all imported modules from a
+    // Swift target.
+    .executable(name: "firebase-test", targets: ["firebase-test"]),
+    //
+    // .library(
+    //   name: "Firebase",
+    //   targets: ["Firebase"]
+    // ),
+    .library(
+      name: "FirebaseCore",
+      targets: ["FirebaseCore"]
+    ),
+    // .library(
+    //   name: "FirebaseAuth",
+    //   targets: ["FirebaseAuth"]
+    // ),
+    // .library(
+    //   name: "FirebaseCrashlytics",
+    //   targets: ["FirebaseCrashlytics"]
+    // ),
+    // .library(
+    //   name: "FirebaseFunctions",
+    //   targets: ["FirebaseFunctions"]),
+    // .library(
+    //   name: "FirebaseInstallations",
+    //   targets: ["FirebaseInstallations"]
+    // ),
+    // .library(
+    //   name: "FirebaseInstanceID",
+    //   targets: ["FirebaseInstanceID"]
+    // ),
+    // .library(
+    //   name: "FirebaseStorage",
+    //   targets: ["FirebaseStorage"]
+    // ),
+    // .library(
+    //   name: "FirebaseStorageSwift",
+    //   targets: ["FirebaseStorageSwift"]
+    // ),
+  ],
+  dependencies: [
+    .package(url: "https://github.com/google/promises.git", "1.2.8" ..< "1.3.0"),
+    .package(url: "https://github.com/google/gtm-session-fetcher.git", "1.4.0" ..< "2.0.0"),
+    .package(url: "https://github.com/paulb777/nanopb.git", .branch("swift-package-manager")),
+    // Branches need a force update with a run with the revision set like below.
+    //   .package(url: "https://github.com/paulb777/nanopb.git", .revision("564392bd87bd093c308a3aaed3997466efb95f74"))
+  ],
+  targets: [
+    // Targets are the basic building blocks of a package. A target can define a module or a test suite.
+    // Targets can depend on other targets in this package, and on products in packages which this package depends on.
+    .target(
+      name: "firebase-test",
+      dependencies: [
+        // "FirebaseAuth", "FirebaseFunctions",
+        //  "Firebase",
+        "FirebaseCore",
+        //  "FirebaseInstallations", "FirebaseInstanceID",
+        // "FirebaseStorage",
+        // "FirebaseStorageSwift",
+        "GoogleUtilities_AppDelegateSwizzler",
+        "GoogleUtilities_Environment",
+        // "GoogleUtilities_ISASwizzler", // Build needs to disable ARC.
+        "GoogleUtilities_Logger",
+        "GoogleUtilities_MethodSwizzler",
+        "GoogleUtilities_Network",
+        "GoogleUtilities_NSData",
+        "GoogleUtilities_Reachability",
+        "GoogleUtilities_UserDefaults",
+      ]
+    ),
+    .target(
+      name: "GoogleUtilities_AppDelegateSwizzler",
+      dependencies: ["GoogleUtilities_Environment", "GoogleUtilities_Logger",
+                     "GoogleUtilities_Network"],
+      path: "GoogleUtilities",
+      sources: [
+        "AppDelegateSwizzler/",
+        "SceneDelegateSwizzler/",
+        "Common/*.h",
+      ],
+      publicHeadersPath: "AppDelegateSwizzler/Public",
+      cSettings: [
+        .headerSearchPath("../"),
+      ]
+    ),
+    .target(
+      name: "GoogleUtilities_Environment",
+      dependencies: ["FBLPromises"],
+      path: "GoogleUtilities/Environment",
+      publicHeadersPath: "Private",
+      cSettings: [
+        .headerSearchPath("../../"),
+      ]
+    ),
+
+    // Tests need OCMock and resource support.
+
+    .target(
+      name: "GoogleUtilities_Logger",
+      dependencies: ["GoogleUtilities_Environment"],
+      path: "GoogleUtilities/Logger",
+      publicHeadersPath: "Public",
+      cSettings: [
+        .headerSearchPath("../../"),
+      ]
+    ),
+
+    // TODO: ISA_Swizzler requires building without ARC.
+
+    .target(
+      name: "GoogleUtilities_MethodSwizzler",
+      dependencies: ["GoogleUtilities_Logger"],
+      path: "GoogleUtilities/MethodSwizzler",
+      publicHeadersPath: "Private",
+      cSettings: [
+        .headerSearchPath("../../"),
+      ]
+    ),
+    .target(
+      name: "GoogleUtilities_Network",
+      dependencies: ["GoogleUtilities_Logger", "GoogleUtilities_NSData",
+                     "GoogleUtilities_Reachability"],
+      path: "GoogleUtilities/Network",
+      publicHeadersPath: "Public",
+      cSettings: [
+        .headerSearchPath("../.."),
+      ]
+      // linkerSettings: [
+      //   .linkedFramework("Security"),
+      // ]
+    ),
+    .target(
+      name: "GoogleUtilities_NSData",
+      path: "GoogleUtilities/NSData+zlib",
+      publicHeadersPath: "Public",
+      cSettings: [
+        .headerSearchPath("../.."),
+      ],
+      linkerSettings: [
+        .linkedLibrary("z"),
+      ]
+    ),
+    .target(
+      name: "GoogleUtilities_Reachability",
+      dependencies: ["GoogleUtilities_Logger"],
+      path: "GoogleUtilities/Reachability",
+      publicHeadersPath: "Private",
+      cSettings: [
+        .headerSearchPath("../../"),
+      ]
+    ),
+    .target(
+      name: "GoogleUtilities_UserDefaults",
+      dependencies: ["GoogleUtilities_Logger"],
+      path: "GoogleUtilities/UserDefaults",
+      publicHeadersPath: "Private",
+      cSettings: [
+        .headerSearchPath("../../"),
+      ]
+    ),
+    // .target(
+    //   name: "Firebase",
+    //   path: "Firebase/Sources",
+    //   publicHeadersPath: "Public"
+    // ),
+    .target(
+      name: "FirebaseCore",
+      dependencies: ["GoogleUtilities_Environment", "GoogleUtilities_Logger"],
+      path: "FirebaseCore/Sources",
+      publicHeadersPath: "Public",
+      cSettings: [
+        .headerSearchPath("../.."),
+        .define("FIRCore_VERSION", to: "0.0.1"), // TODO: Fix version
+        .define("Firebase_VERSION", to: "0.0.1"), // TODO: Fix version
+        // TODO: - Add support for cflags cSetting so that we can set the -fno-autolink option
+      ]
+    ),
+//     .target(
+//       name: "FirebaseAuth",
+//       dependencies: ["FirebaseCore", "GoogleUtilities_Environment",
+//                      "GoogleUtilities_AppDelegateSwizzler",
+//                      "GTMSessionFetcherCore"],
+//       path: "FirebaseAuth/Sources",
+//       publicHeadersPath: "Public",
+//       cSettings: [
+//         .headerSearchPath("../../"),
+//         .define("FIRAuth_VERSION", to: "0.0.1"), // TODO: Fix version
+//         .define("FIRAuth_MINOR_VERSION", to: "1.1"), // TODO: Fix version
+    // //        .define("DEBUG", .when(configuration: .debug)), // TODO - destroys other settings in DEBUG config
+//         // linkerSettings: [
+//         //   .linkedFramework("Security"),
+//         //  .linkedFramework("SafariServices", .when(platforms: [.iOS])),
+//       ]
+//    ),
+//     .target(
+//       name: "FirebaseFunctions",
+//       dependencies: ["FirebaseCore", "GTMSessionFetcher_Core"],
+//       path: "Functions/FirebaseFunctions",
+//       publicHeadersPath: "Public",
+//       cSettings: [
+//          // SPM doesn't support interface frameworks or private headers
+//         .headerSearchPath("../../"),
+//         .define("FIRFunctions_VERSION", to: "0.0.1"),  // TODO Fix version
+//         .define("SWIFT_PACKAGE", to: "1"),  // SPM loses defaults if other cSettings
+//       ]),
+    // .target(
+    //   name: "FirebaseInstanceID",
+    //   dependencies: ["FirebaseCore", "FirebaseInstallations",
+    //                  "GoogleUtilities_Environment", "GoogleUtilities_UserDefaults"],
+    //   path: "Firebase/InstanceID",
+    //   publicHeadersPath: "Public",
+    //   cSettings: [
+    //     .headerSearchPath("../../"),
+    //     .define("FIRInstanceID_LIB_VERSION", to: "0.0.1"), // TODO: Fix version
+    //   ]
+    // ),
+    // .target(
+    //   name: "FirebaseInstallations",
+    //   dependencies: ["FirebaseCore", "FBLPromises",
+    //                  "GoogleUtilities_Environment", "GoogleUtilities_UserDefaults"],
+    //   path: "FirebaseInstallations/Source/Library",
+    //   publicHeadersPath: "Public",
+    //   cSettings: [
+    //     .headerSearchPath("../../../"),
+    //   ]
+    // ),
+    // .target(
+    //   name: "FirebaseStorage",
+    //   dependencies: ["FirebaseCore", "GTMSessionFetcherCore"],
+    //   path: "FirebaseStorage/Sources",
+    //   publicHeadersPath: "Public",
+    //   cSettings: [
+    //     .headerSearchPath("../../"),
+    //     .define("FIRStorage_VERSION", to: "0.0.1"), // TODO: Fix version
+    //   ]
+    // ),
+    // .target(
+    //   name: "FirebaseStorageSwift",
+    //   dependencies: ["FirebaseStorage"],
+    //   path: "FirebaseStorageSwift/Sources"
+    // ),
+    // .target(
+    //   name: "GoogleDataTransport",
+    //   path: "GoogleDataTransport/GDTCORLibrary",
+    //   publicHeadersPath: "Public",
+    //   cSettings: [
+    //     .headerSearchPath("../"),
+    //     .define("GDTCOR_VERSION", to: "0.0.1"),
+    //   ]
+    // ),
+    // .target(
+    //   name: "GoogleDataTransportCCTSupport",
+    //   dependencies: ["GoogleDataTransport", "nanopb"],
+    //   path: "GoogleDataTransportCCTSupport/GDTCCTLibrary",
+    //   cSettings: [
+    //     .headerSearchPath("../"),
+    //     .define("PB_FIELD_32BIT", to: "1"),
+    //     .define("PB_NO_PACKED_STRUCTS", to: "1"),
+    //     .define("PB_ENABLE_MALLOC", to: "1"),
+    //   ]
+    // ),
+//       linkerSettings: [
+//         .linkedFramework("CoreServices", .when(platforms: [.macOS])),
+//         .linkedFramework("MobileCoreServices", .when(platforms: [.iOS, .tvOS])),
+//       ]),
+  ],
+  cLanguageStandard: .c99
+)

+ 47 - 0
Sources/firebase-test/main.swift

@@ -0,0 +1,47 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import Foundation
+// import Firebase
+import FirebaseCore
+// import FirebaseAuth
+// import FirebaseFunctions
+// import FirebaseInstallations
+// import FirebaseInstanceID
+// import FirebaseStorage
+// import FirebaseStorageSwift
+// import GoogleDataTransport
+// import GoogleDataTransportCCTSupport
+import GoogleUtilities_AppDelegateSwizzler
+import GoogleUtilities_Environment
+import GoogleUtilities_Logger
+import GoogleUtilities_MethodSwizzler
+import GoogleUtilities_Network
+import GoogleUtilities_NSData
+import GoogleUtilities_Reachability
+import GoogleUtilities_UserDefaults
+
+print("Hello world!")
+print("Is app store receipt sandbox? Answer: \(GULAppEnvironmentUtil.isAppStoreReceiptSandbox())")
+print("Is from app store? Answer: \(GULAppEnvironmentUtil.isFromAppStore())")
+print("Is this the simulator? Answer: \(GULAppEnvironmentUtil.isSimulator())")
+print("Device model? Answer: \(GULAppEnvironmentUtil.deviceModel() ?? "NONE")")
+print("System version? Answer: \(GULAppEnvironmentUtil.systemVersion() ?? "NONE")")
+print("Is App extension? Answer: \(GULAppEnvironmentUtil.isAppExtension())")
+print("Is iOS 7 or higher? Answer: \(GULAppEnvironmentUtil.isIOS7OrHigher())")
+
+print("Is there a default app? Answer: \(FirebaseApp.app() != nil)")
+// print("Storage Version String? Answer: \(String(cString: StorageVersionString))")
+
+// print("InstanceIDScopeFirebaseMessaging? Answer: \(InstanceIDScopeFirebaseMessaging)")

+ 17 - 5
scripts/change_headers.swift

@@ -19,8 +19,14 @@
 
 import Foundation
 
-let findHeaders: Set = ["GoogleUtilities"]
-let changeImports: Set = ["GoogleUtilities"]
+let findHeaders = ["GoogleUtilities"]
+let changeImports = ["GoogleUtilities", "FirebaseAuth", "FirebaseCore", "Firebase",
+                     "FirebaseDynamicLinks", "FirebaseInAppMessaging", "FirebaseMessaging",
+                     "FirebaseRemoteConfig", "FirebaseInstallations",
+                     "FirebaseAppDistribution", "Example"]
+let skipDirPatterns = ["/Sample/", "FirebaseABTesting/Tests/Integration",
+                       "FirebaseInAppMessaging/Tests/Integration/", "Example/Database/App",
+                       "Example/InstanceID/App"]
 
 // Get a Dictionary mapping a simple header name to a repo-relative path.
 
@@ -107,16 +113,22 @@ let headerMap = getHeaderMap(url)
 for root in changeImports {
   let rootURL = url.appendingPathComponent(root)
   let enumerator = FileManager.default.enumerator(atPath: rootURL.path)
-  while let file = enumerator?.nextObject() as? String {
+  whileLoop: while let file = enumerator?.nextObject() as? String {
     if let fType = enumerator?.fileAttributes?[FileAttributeKey.type] as? FileAttributeType,
       fType == .typeRegular {
       if file.starts(with: ".") {
         continue
       }
-      if file.rangeOfString("/Public/") != nil {
+      if file.range(of: "/Public/") != nil {
         continue
       }
-      transformFile(root + "/" + file)
+      let fullTransformPath = root + "/" + file
+      for dirPattern in skipDirPatterns {
+        if fullTransformPath.range(of: dirPattern) != nil {
+          continue whileLoop
+        }
+      }
+      transformFile(fullTransformPath)
     }
   }
 }

+ 2 - 0
scripts/check_no_module_imports.sh

@@ -30,6 +30,8 @@ function exit_with_error {
 git grep "${options[@]}" \
   -- ':(exclude,glob)**/Example/**' ':(exclude,glob)**/Sample/**' \
      ':(exclude)FirebaseCore/Sources/Private/FirebaseCoreInternal.h' \
+     ':(exclude)GoogleUtilities/NSData+zlib/Private/GULNSDataInternal.h' \
+     ':(exclude)GoogleUtilities/Logger/Private/GULLogger.h' \
      ':(exclude)HeadersImports.md' && exit_with_error
 
 # Tests are under the Example directory, so we have to separately grep them for

+ 1 - 1
scripts/if_changed.sh

@@ -100,7 +100,7 @@ else
       ;;
 
     GoogleUtilitiesComponents-*)
-      check_changes '^(GoogleUtilitiesComponents|GoogleUtilitiesComponents.podspec)'
+      check_changes '^(GoogleUtilities|GoogleUtilitiesComponents|GoogleUtilitiesComponents.podspec)'
       ;;
 
     InAppMessaging-*)