Paul Beusterien пре 5 година
родитељ
комит
54d28547d3
100 измењених фајлова са 38 додато и 6898 уклоњено
  1. 1 1
      .github/workflows/archiving.yml
  2. 0 79
      .github/workflows/datatransport.yml
  3. 14 0
      .swiftpm/xcode/xcshareddata/xcschemes/Firebase-Package.xcscheme
  4. 0 1
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile
  5. 0 1
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_staticLibs/Podfile
  6. 0 1
      CoreOnly/Tests/FirebasePodTest/Podfile
  7. 1 1
      Crashlytics/Crashlytics/Controllers/FIRCLSReportUploader.m
  8. 1 1
      Crashlytics/Crashlytics/FIRCrashlytics.m
  9. 1 1
      Crashlytics/Crashlytics/Models/Record/FIRCLSReportAdapter.h
  10. 1 1
      Crashlytics/UnitTests/FIRCLSReportAdapterTests.m
  11. 1 1
      Crashlytics/UnitTests/Mocks/FIRMockGDTCoreTransport.h
  12. 0 3
      Dangerfile
  13. 1 1
      Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m
  14. 0 1
      Example/tvOSSample/Podfile
  15. 0 1
      Example/watchOSSample/Podfile
  16. 1 1
      Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m
  17. 0 1
      FirebaseAppDistribution.podspec
  18. 0 1
      FirebaseAuth/Tests/Sample/Podfile
  19. 0 1
      FirebaseCoreDiagnostics.podspec
  20. 0 1
      FirebaseCrashlytics.podspec
  21. 1 1
      FirebaseDynamicLinks/Sources/Logging/FDLLogging.m
  22. 0 1
      FirebaseDynamicLinks/Tests/Sample/Podfile
  23. 0 1
      FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/Podfile
  24. 0 1
      FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/Podfile
  25. 0 1
      FirebaseMessaging/Apps/AdvancedSample/Podfile
  26. 0 1
      FirebaseMessaging/Apps/Sample/Podfile
  27. 0 4
      FirebasePerformance.podspec
  28. 1 1
      FirebasePerformance/Sources/FPRURLFilter.m
  29. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTCCLogger.m
  30. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTCCLogger_Private.h
  31. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTEvent.h
  32. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.h
  33. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.m
  34. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.h
  35. 1 1
      FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.m
  36. 0 6
      FirebasePerformance/Tests/FIRPerfE2E/Podfile
  37. 1 1
      FirebasePerformance/Tests/Unit/FPRTestUtils.h
  38. 1 1
      FirebasePerformance/Tests/Unit/FPRURLFilterTests.m
  39. 1 1
      FirebasePerformance/Tests/Unit/Loggers/FPRGDTCCLoggerTest.m
  40. 1 1
      FirebasePerformance/Tests/Unit/Loggers/FPRGDTLogSamplerTest.m
  41. 1 1
      FirebasePerformance/Tests/Unit/Loggers/FPRGDTRateLimiterTest.m
  42. 0 1
      FirebaseRemoteConfig/Tests/Sample/Podfile
  43. 0 1
      FirebaseSegmentation/Tests/Sample/Podfile
  44. 0 3
      Firestore/Example/Podfile
  45. 2 2
      Firestore/core/test/unit/util/ordered_code_test.cc
  46. 0 183
      GoogleDataTransport.podspec
  47. 0 130
      GoogleDataTransport/CHANGELOG.md
  48. 0 95
      GoogleDataTransport/GDTCCTLibrary/GDTCCTCompressionHelper.m
  49. 0 270
      GoogleDataTransport/GDTCCTLibrary/GDTCCTNanopbHelpers.m
  50. 0 661
      GoogleDataTransport/GDTCCTLibrary/GDTCCTUploader.m
  51. 0 236
      GoogleDataTransport/GDTCCTLibrary/GDTCOREvent+GDTCCTSupport.m
  52. 0 40
      GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h
  53. 0 128
      GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h
  54. 0 60
      GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTUploader.h
  55. 0 128
      GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c
  56. 0 281
      GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h
  57. 0 51
      GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h
  58. 0 151
      GoogleDataTransport/GDTCCTTestApp/app.swift
  59. 0 31
      GoogleDataTransport/GDTCCTTestApp/gdthelpers.swift
  60. 0 27
      GoogleDataTransport/GDTCCTTestApp/globals.swift
  61. 0 136
      GoogleDataTransport/GDTCCTTestApp/ios/Main.storyboard
  62. 0 820
      GoogleDataTransport/GDTCCTTestApp/macos/Main.storyboard
  63. 0 262
      GoogleDataTransport/GDTCCTTestApp/proto/flltest.pb.swift
  64. 0 48
      GoogleDataTransport/GDTCCTTestApp/proto/flltest.proto
  65. 0 116
      GoogleDataTransport/GDTCCTTestApp/tvos/Main.storyboard
  66. 0 154
      GoogleDataTransport/GDTCCTTestApp/viewcontroller.swift
  67. 0 57
      GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.h
  68. 0 144
      GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.m
  69. BIN
      GoogleDataTransport/GDTCCTTests/Data/message-32347456.dat
  70. BIN
      GoogleDataTransport/GDTCCTTests/Data/message-35458880.dat
  71. BIN
      GoogleDataTransport/GDTCCTTests/Data/message-39882816.dat
  72. BIN
      GoogleDataTransport/GDTCCTTests/Data/message-40043840.dat
  73. BIN
      GoogleDataTransport/GDTCCTTests/Data/message-40657984.dat
  74. 0 217
      GoogleDataTransport/GDTCCTTests/Integration/GDTCCTIntegrationTest.m
  75. 0 32
      GoogleDataTransport/GDTCCTTests/Monkey/GDTCCTMonkeyTest.swift
  76. 0 193
      GoogleDataTransport/GDTCCTTests/Unit/GDTCCTNanopbHelpersTest.m
  77. 0 787
      GoogleDataTransport/GDTCCTTests/Unit/GDTCCTUploaderTest.m
  78. 0 64
      GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.h
  79. 0 248
      GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.m
  80. 0 65
      GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.h
  81. 0 184
      GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.m
  82. 0 31
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTServiceExtension/Info.plist
  83. 0 69
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTServiceExtension/NotificationService.swift
  84. 0 81
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json
  85. 0 6
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Assets.xcassets/Contents.json
  86. 0 78
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Base.lproj/Interface.storyboard
  87. 0 33
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Info.plist
  88. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
  89. 0 48
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Contents.json
  90. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
  91. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
  92. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json
  93. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json
  94. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json
  95. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
  96. 0 28
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
  97. 0 6
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Contents.json
  98. 0 19
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/ExtensionDelegate.swift
  99. 0 36
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Info.plist
  100. 0 133
      GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/InterfaceController.swift

+ 1 - 1
.github/workflows/archiving.yml

@@ -38,7 +38,7 @@ jobs:
       matrix:
         target: [ios, tvos, macos]
         # These need to be on a single line or else the formatting won't validate.
-        pod: ["FirebaseABTesting", "FirebaseAuth", "FirebaseCore", "FirebaseCrashlytics", "FirebaseDatabase", "FirebaseFirestore", "FirebaseFunctions", "FirebaseMessaging", "FirebaseRemoteConfig", "FirebaseStorage", "GoogleDataTransport"]
+        pod: ["FirebaseABTesting", "FirebaseAuth", "FirebaseCore", "FirebaseCrashlytics", "FirebaseDatabase", "FirebaseFirestore", "FirebaseFunctions", "FirebaseMessaging", "FirebaseRemoteConfig", "FirebaseStorage"]
     steps:
     - uses: actions/checkout@v2
     - name: Setup Bundler

+ 0 - 79
.github/workflows/datatransport.yml

@@ -1,79 +0,0 @@
-name: datatransport
-
-on:
-  pull_request:
-    paths:
-    - 'GoogleDataTransport**'
-    - '.github/workflows/datatransport.yml'
-    - 'Gemfile'
-  schedule:
-    # Run every day at 11pm (PST) - cron uses UTC times
-    - cron:  '0 7 * * *'
-
-jobs:
-  pod_lib_lint:
-    # Don't run on private repo unless it is a PR.
-    if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
-
-    runs-on: macos-latest
-    strategy:
-      matrix:
-        target: [ios, tvos, macos, watchos]
-    steps:
-    - uses: actions/checkout@v2
-    - name: Setup Bundler
-      run: ./scripts/setup_bundler.sh
-    - name: PodLibLint DataTransport
-      run: |
-        scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb GoogleDataTransport.podspec --platforms=${{ matrix.target }}
-
-  catalyst:
-    # Don't run on private repo unless it is a PR.
-    if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
-
-    runs-on: macOS-latest
-    steps:
-    - uses: actions/checkout@v2
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: Setup project and Test Catalyst
-      run: scripts/third_party/travis/retry.sh scripts/test_catalyst.sh GoogleDataTransport build
-
-  watchos-testapp:
-    # Don't run on private repo unless it is a PR.
-    if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
-
-    runs-on: macOS-latest
-    steps:
-    - uses: actions/checkout@v2
-    - name: Xcode 12
-      run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: Prereqs
-      run: scripts/install_prereqs.sh GoogleDataTransport watchOS xcodebuild
-    - name: Setup project and build watchOS test app
-      run: scripts/third_party/travis/retry.sh scripts/build.sh GoogleDataTransport watchOS xcodebuild
-
-# Scheduled jobs
-
-  datatransport-cron-only:
-    # Don't run on private repo.
-    if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
-
-    runs-on: macos-latest
-    strategy:
-      matrix:
-        target: [ios, tvos, macos, watchos]
-        flags: [
-          '--use-static-frameworks',
-          '--use-libraries'
-        ]
-    needs: pod_lib_lint
-    steps:
-    - uses: actions/checkout@v2
-    - name: Setup Bundler
-      run: ./scripts/setup_bundler.sh
-    - name: PodLibLint DataTransport Cron
-      run: |
-        scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb GoogleDataTransport.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

+ 14 - 0
.swiftpm/xcode/xcshareddata/xcschemes/Firebase-Package.xcscheme

@@ -720,6 +720,20 @@
                ReferencedContainer = "container:">
             </BuildableReference>
          </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "Firebase_RemoteConfigUnit"
+               BuildableName = "Firebase_RemoteConfigUnit"
+               BlueprintName = "Firebase_RemoteConfigUnit"
+               ReferencedContainer = "container:">
+            </BuildableReference>
+         </BuildActionEntry>
       </BuildActionEntries>
    </BuildAction>
    <TestAction

+ 0 - 1
CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile

@@ -20,7 +20,6 @@ target 'CocoapodsIntegrationTest' do
   pod 'FirebaseMessaging', :path => '../'
   pod 'FirebasePerformance', :path => '../'
   pod 'FirebaseStorage', :path => '../'
-  pod 'GoogleDataTransport', :path => '../'
 end
 
 # Using the new speed-enhancing features available with CocoaPods 1.7+

+ 0 - 1
CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_staticLibs/Podfile

@@ -18,7 +18,6 @@ target 'CocoapodsIntegrationTest' do
   pod 'FirebaseMessaging', :path => '../'
   pod 'FirebasePerformance', :path => '../'
   pod 'FirebaseStorage', :path => '../'
-  pod 'GoogleDataTransport', :path => '../'
 end
 
 # Using the new speed-enhancing features available with CocoaPods 1.7+

+ 0 - 1
CoreOnly/Tests/FirebasePodTest/Podfile

@@ -29,7 +29,6 @@ target 'FirebasePodTest' do
 
   # Get dependent pods from the repo also
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
 
   pod 'FirebaseAnalytics' # Analytics is not open source
 end

+ 1 - 1
Crashlytics/Crashlytics/Controllers/FIRCLSReportUploader.m

@@ -34,7 +34,7 @@
 #import "Crashlytics/Shared/FIRCLSNetworking/FIRCLSMultipartMimeStreamEncoder.h"
 #import "Crashlytics/Shared/FIRCLSNetworking/FIRCLSURLBuilder.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 @interface FIRCLSReportUploader () {
   id<FIRAnalyticsInterop> _analytics;

+ 1 - 1
Crashlytics/Crashlytics/FIRCrashlytics.m

@@ -46,7 +46,7 @@
 #import "FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h"
 #import "Interop/Analytics/Public/FIRAnalyticsInterop.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #if TARGET_OS_IPHONE
 #import <UIKit/UIKit.h>

+ 1 - 1
Crashlytics/Crashlytics/Models/Record/FIRCLSReportAdapter.h

@@ -18,7 +18,7 @@
 
 #include "Crashlytics/Protogen/nanopb/crashlytics.nanopb.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 /// This class is responsible for reading the persisted crash reports from disk and converting them
 /// the information into the nanopb model to be used with GoogleDataTransport

+ 1 - 1
Crashlytics/UnitTests/FIRCLSReportAdapterTests.m

@@ -23,7 +23,7 @@
 
 #import "Crashlytics/Crashlytics/Helpers/FIRCLSFile.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 @interface FIRCLSReportAdapterTests : XCTestCase
 

+ 1 - 1
Crashlytics/UnitTests/Mocks/FIRMockGDTCoreTransport.h

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 @interface FIRMockGDTCORTransport : GDTCORTransport
 

+ 0 - 3
Dangerfile

@@ -52,7 +52,6 @@ def labelsForModifiedFiles()
   labels.push("api: remoteconfig") if @has_remoteconfig_changes
   labels.push("api: segmentation") if @has_segmentation_changes
   labels.push("api: storage") if @has_storage_changes
-  labels.push("GoogleDataTransport") if @has_gdt_changes
   labels.push("release-tooling") if @has_releasetooling_changes
   labels.push("public-api-change") if @has_api_changes
   return labels
@@ -110,8 +109,6 @@ has_license_changes = didModify(["LICENSE"])
 @has_storage_changes = hasChangesIn("FirebaseStorage/")
 @has_storage_api_changes = hasChangesIn("FirebaseStorage/Sources/Public/")
 
-@has_gdt_changes = hasChangesIn(["GoogleDataTransport/"])
-@has_gdt_api_changes = hasChangesIn("GoogleDataTransport/GDTCORLibrary/Public")
 @has_releasetooling_changes = hasChangesIn("ReleaseTooling/")
 
 # Convenient flag for all API changes.

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

@@ -19,13 +19,13 @@
 #import <UIKit/UIKit.h>
 #endif  // TARGET_OS_IOS || TARGET_OS_TV
 
+#import <GoogleDataTransport/GoogleDataTransport.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 "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
 #import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"
 

+ 0 - 1
Example/tvOSSample/Podfile

@@ -10,6 +10,5 @@ target 'tvOSSample' do
   pod 'FirebaseAuth', :path => '../../'
   pod 'FirebaseDatabase', :path => '../../'
   pod 'FirebaseStorage', :path => '../../'
-  pod 'GoogleDataTransport', :path => '../../'
 
 end

+ 0 - 1
Example/watchOSSample/Podfile

@@ -10,7 +10,6 @@ target 'SampleWatchAppWatchKitExtension' do
   pod 'FirebaseMessaging', :path => '../../'
   pod 'FirebaseInstanceID', :path => '../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../'
-  pod 'GoogleDataTransport', :path => '../../'
   pod 'FirebaseInstallations', :path => '../../'
   pod 'FirebaseStorage', :path => '../../'
 

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

@@ -17,7 +17,7 @@
 #import <objc/runtime.h>
 #include <sys/utsname.h>
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import <GoogleUtilities/GULHeartbeatDateStorage.h>

+ 0 - 1
FirebaseAppDistribution.podspec

@@ -25,7 +25,6 @@ iOS SDK for App Distribution for Firebase.
     base_dir + '**/*.{c,h,m,mm}',
     'FirebaseCore/Sources/Private/*.h',
     'FirebaseInstallations/Source/Library/Private/*.h',
-    'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
   ]
   s.public_header_files = base_dir + 'Public/FirebaseAppDistribution/*.h'
 

+ 0 - 1
FirebaseAuth/Tests/Sample/Podfile

@@ -11,7 +11,6 @@ target 'AuthSample' do
   platform :ios, '10.0'
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
   pod 'FirebaseAuth', :path => '../../../', :testspecs => ['unit']
   pod 'FirebaseInstallations', :path => '../../..'
   pod 'FirebaseInstanceID', :path => '../../..'

+ 0 - 1
FirebaseCoreDiagnostics.podspec

@@ -50,7 +50,6 @@ non-Cocoapod integration. This library also respects the Firebase global data co
 
   s.source_files = [
     'Firebase/CoreDiagnostics/FIRCDLibrary/**/*.[cmh]',
-    'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
     'Interop/CoreDiagnostics/Public/*.h',
   ]
   s.public_header_files = 'Firebase/CoreDiagnostics/FIRCDLibrary/Public/*.h'

+ 0 - 1
FirebaseCrashlytics.podspec

@@ -26,7 +26,6 @@ Pod::Spec.new do |s|
     'Crashlytics/third_party/**/*.{c,h,m,mm}',
     'FirebaseCore/Sources/Private/*.h',
     'FirebaseInstallations/Source/Library/Private/*.h',
-    'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
     'Interop/Analytics/Public/*.h',
   ]
 

+ 1 - 1
FirebaseDynamicLinks/Sources/Logging/FDLLogging.m

@@ -29,7 +29,7 @@ FIRLoggerService kFIRLoggerDynamicLinks = @"[Firebase/DynamicLinks]";
 
 #if __LP64__  // 64-bit
 NSString *const FDLMessageCodeIntegerFormat = @"%06ld";
-#else  // 32-bit
+#else   // 32-bit
 NSString *const FDLMessageCodeIntegerFormat = @"%06d";
 #endif  // #if __LP64__
 

+ 0 - 1
FirebaseDynamicLinks/Tests/Sample/Podfile

@@ -7,6 +7,5 @@ target 'FDLBuilderTestAppObjC' do
 
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
   pod 'FirebaseDynamicLinks', :path => '../../../'
 end

+ 0 - 1
FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/Podfile

@@ -6,7 +6,6 @@ use_frameworks!
 pod 'FirebaseCore', :path => '../../../..'
 pod 'FirebaseInstallations', :path => '../../../..'
 pod 'FirebaseCoreDiagnostics', :path => '../../../..'
-pod 'GoogleDataTransport', :path => '../../../..'
 pod 'FirebaseABTesting', :path => '../../../..'
 
 target 'FiamDisplaySwiftExample' do

+ 0 - 1
FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/Podfile

@@ -7,7 +7,6 @@ pod 'FirebaseAnalytics'
 pod 'FirebaseCore', :path => '../../../..'
 pod 'FirebaseInstallations', :path => '../../../..'
 pod 'FirebaseCoreDiagnostics', :path => '../../../..'
-pod 'GoogleDataTransport', :path => '../../../..'
 pod 'FirebaseABTesting', :path => '../../../..'
 
 target 'InAppMessaging_Example_iOS' do

+ 0 - 1
FirebaseMessaging/Apps/AdvancedSample/Podfile

@@ -8,7 +8,6 @@ def shared_pods
   pod 'FirebaseMessaging', :path => '../../../'
   pod 'FirebaseInstanceID', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
 end
 

+ 0 - 1
FirebaseMessaging/Apps/Sample/Podfile

@@ -10,7 +10,6 @@ target 'Sample' do
   pod 'FirebaseMessaging', :path => '../../../'
   pod 'FirebaseInstanceID', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
 
 end

+ 0 - 4
FirebasePerformance.podspec

@@ -29,10 +29,6 @@ Firebase Performance library to measure performance of Mobile and Web Apps.
     'FirebaseCore/Sources/Private/*.h',
     'FirebaseInstallations/Source/Library/Private/*.h',
     'FirebaseRemoteConfig/Sources/Private/*.h',
-    'GoogleDataTransport/GDTCORLibrary/Internal/*.h',
-    'GoogleUtilities/ISASwizzler/Private/*.h',
-    'GoogleUtilities/MethodSwizzler/Private/*.h',
-    'GoogleUtilities/Environment/Private/*.h',
   ]
 
   s.requires_arc = [

+ 1 - 1
FirebasePerformance/Sources/FPRURLFilter.m

@@ -17,7 +17,7 @@
 
 #import "FirebasePerformance/Sources/FPRConsoleLogger.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 /** The expected key of the domain allowlist array. */
 static NSString *const kFPRAllowlistDomainsKey = @"FPRWhitelistedDomains";

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTCCLogger.m

@@ -21,7 +21,7 @@
 #import "FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.h"
 #import "FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import "FirebasePerformance/ProtoSupport/PerfMetric.pbobjc.h"
 

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTCCLogger_Private.h

@@ -16,8 +16,8 @@
 
 #import "FirebasePerformance/Sources/Loggers/FPRGDTCCLogger.h"
 
+#import <GoogleDataTransport/GoogleDataTransport.h>
 #import "FirebasePerformance/Sources/Configurations/FPRConfigurations.h"
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
 
 /** FPRGDTCCLogger private definition used for unit testing. */
 @interface FPRGDTCCLogger ()

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTEvent.h

@@ -14,7 +14,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.h

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.m

@@ -14,7 +14,7 @@
 
 #import "FirebasePerformance/Sources/Loggers/FPRGDTLogSampler.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import "FirebasePerformance/Sources/AppActivity/FPRSessionManager.h"
 #import "FirebasePerformance/Sources/Common/FPRDiagnostics.h"

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.h

@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 /**
  * FPRGDTRateLimiter class helps in limiting the number of events that are sent

+ 1 - 1
FirebasePerformance/Sources/Loggers/FPRGDTRateLimiter.m

@@ -22,7 +22,7 @@
 #import "FirebasePerformance/Sources/Common/FPRPerfDate.h"
 #import "FirebasePerformance/Sources/Loggers/FPRGDTEvent.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import "FirebasePerformance/ProtoSupport/PerfMetric.pbobjc.h"
 

+ 0 - 6
FirebasePerformance/Tests/FIRPerfE2E/Podfile

@@ -17,9 +17,6 @@ target 'FIRPerfE2EAutopush' do
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
 
-  # Data transport dependencies
-  pod 'GoogleDataTransport', :path => '../../../'
-
   # Other dependencies
   pod 'Protobuf'
   pod 'GoogleToolboxForMac/Logger'
@@ -41,9 +38,6 @@ target 'FIRPerfE2EProd' do
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
 
-  # Data transport dependencies
-  pod 'GoogleDataTransport', :path => '../../../'
-
   # Other dependencies
   pod 'Protobuf'
   pod 'GoogleToolboxForMac/Logger'

+ 1 - 1
FirebasePerformance/Tests/Unit/FPRTestUtils.h

@@ -19,7 +19,7 @@
 
 #import "FirebasePerformance/Sources/Loggers/FPRGDTEvent.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import "FirebasePerformance/ProtoSupport/PerfMetric.pbobjc.h"
 

+ 1 - 1
FirebasePerformance/Tests/Unit/FPRURLFilterTests.m

@@ -19,7 +19,7 @@
 
 #import "FirebasePerformance/Tests/Unit/Fakes/NSBundleFake.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 @interface FPRURLFilterTest : XCTestCase
 

+ 1 - 1
FirebasePerformance/Tests/Unit/Loggers/FPRGDTCCLoggerTest.m

@@ -26,7 +26,7 @@
 
 #import "FirebasePerformance/Tests/Unit/FPRTestUtils.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 #import "GoogleDataTransport/GDTCORLibrary/Private/GDTCORTransport_Private.h"
 #import "GoogleDataTransport/GDTCORTests/Common/Fakes/GDTCORTransportFake.h"
 

+ 1 - 1
FirebasePerformance/Tests/Unit/Loggers/FPRGDTLogSamplerTest.m

@@ -29,7 +29,7 @@
 #import "FirebasePerformance/Tests/Unit/FPRTestUtils.h"
 #import "FirebasePerformance/Tests/Unit/Fakes/FPRFakeConfigurations.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import <OCMock/OCMock.h>
 

+ 1 - 1
FirebasePerformance/Tests/Unit/Loggers/FPRGDTRateLimiterTest.m

@@ -28,7 +28,7 @@
 #import "FirebasePerformance/Tests/Unit/FPRTestCase.h"
 #import "FirebasePerformance/Tests/Unit/FPRTestUtils.h"
 
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
+#import <GoogleDataTransport/GoogleDataTransport.h>
 
 #import "FirebasePerformance/ProtoSupport/PerfMetric.pbobjc.h"
 

+ 0 - 1
FirebaseRemoteConfig/Tests/Sample/Podfile

@@ -13,7 +13,6 @@ target 'RemoteConfigSampleApp' do
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseABTesting', :path => '../../..'
-  pod 'GoogleDataTransport', :path => '../../..'
 
   # Pods for RemoteConfigSampleApp
 

+ 0 - 1
FirebaseSegmentation/Tests/Sample/Podfile

@@ -13,6 +13,5 @@ target 'SegmentationSampleApp' do
   pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseSegmentation', :path => '../../../'
-  pod 'GoogleDataTransport', :path => '../../../'
 
 end

+ 0 - 3
Firestore/Example/Podfile

@@ -55,13 +55,10 @@ def configure_local_pods()
   # scripts/install_prereqs.sh for more details.
   pod 'FirebaseCore', :path => '../..'
   pod 'FirebaseCoreDiagnostics', :path => '../..'
-  pod 'GoogleDataTransport', :path => '../..'
 
   # Pull in local sources conditionally.
   maybe_local_pod 'FirebaseAuth'
-
   maybe_local_pod 'FirebaseCoreDiagnostics'
-  maybe_local_pod 'GoogleDataTransport'
 end
 
 # Reads the value of the PLATFORM environment variable, converts it to the

+ 2 - 2
Firestore/core/test/unit/util/ordered_code_test.cc

@@ -350,7 +350,7 @@ TEST(OrderedCodeInvalidEncodingsTest, NonCanonical) {
 
 #if defined(NDEBUG)
     EXPECT_ANY_THROW(TestRead<uint64_t>(INCREASING, non_minimal));
-#else  // defined(NDEBUG)
+#else   // defined(NDEBUG)
     absl::string_view s(non_minimal);
     EXPECT_ANY_THROW(OrderedCode::ReadNumIncreasing(&s, NULL));
 #endif  // defined(NDEBUG)
@@ -372,7 +372,7 @@ TEST(OrderedCodeInvalidEncodingsTest, NonCanonical) {
 
 #if defined(NDEBUG)
     EXPECT_ANY_THROW(TestRead<int64_t>(INCREASING, non_minimal));
-#else  // defined(NDEBUG)
+#else   // defined(NDEBUG)
     absl::string_view s(non_minimal);
     EXPECT_ANY_THROW(OrderedCode::ReadSignedNumIncreasing(&s, NULL));
     s = non_minimal;

+ 0 - 183
GoogleDataTransport.podspec

@@ -1,183 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'GoogleDataTransport'
-  s.version          = '8.2.0'
-  s.summary          = 'Google iOS SDK data transport.'
-
-  s.description      = <<-DESC
-Shared library for iOS SDK data transport needs.
-                       DESC
-
-  s.homepage         = 'https://developers.google.com/'
-  s.license          = { :type => 'Apache', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'DataTransport-' + s.version.to_s
-  }
-
-  ios_deployment_target = '9.0'
-  osx_deployment_target = '10.12'
-  tvos_deployment_target = '10.0'
-  watchos_deployment_target = '6.0'
-
-  s.ios.deployment_target = ios_deployment_target
-  s.osx.deployment_target = osx_deployment_target
-  s.tvos.deployment_target = tvos_deployment_target
-  s.watchos.deployment_target = watchos_deployment_target
-
-  # To develop or run the tests, >= 1.8.0 must be installed.
-  s.cocoapods_version = '>= 1.4.0'
-
-  s.prefix_header_file = false
-
-  s.source_files = ['GoogleDataTransport/GDTCORLibrary/**/*',
-                    'GoogleDataTransport/GDTCCTLibrary/**/*']
-  s.public_header_files = 'GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/*.h'
-  s.ios.frameworks = 'SystemConfiguration', 'CoreTelephony'
-  s.osx.frameworks = 'SystemConfiguration', 'CoreTelephony'
-  s.tvos.frameworks = 'SystemConfiguration'
-
-  s.libraries = ['z']
-
-  s.dependency 'nanopb', '~> 2.30907.0'
-
-  header_search_paths = {
-    'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/"'
-  }
-
-  s.pod_target_xcconfig = {
-    'GCC_C_LANGUAGE_STANDARD' => 'c99',
-    'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
-    'GCC_PREPROCESSOR_DEFINITIONS' =>
-      # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
-      # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
-      # anyways.)
-      'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1 GDTCOR_VERSION=' + s.version.to_s,
-  }.merge(header_search_paths)
-
-  common_test_sources = ['GoogleDataTransport/GDTCORTests/Common/**/*.{h,m}']
-
-  # Test app specs
-  if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
-    s.app_spec 'TestApp' do |app_spec|
-      app_spec.platforms =  {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-      app_spec.source_files = [
-        'GoogleDataTransport/GDTTestApp/*.swift',
-        'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h',
-        'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORUploader.h',
-        'GoogleDataTransport/GDTCORTests/Common/Categories/GDTCORFlatFileStorage+Testing.h',
-        'GoogleDataTransport/GDTCORTests/Unit/Helpers/*.[hm]',
-        'GoogleDataTransport/GDTTestApp/Bridging-Header.h',
-      ]
-
-      app_spec.ios.resources = ['GoogleDataTransport/GDTTestApp/ios/*.storyboard']
-      app_spec.macos.resources = ['GoogleDataTransport/GDTTestApp/macos/*.storyboard']
-      app_spec.tvos.resources = ['GoogleDataTransport/GDTTestApp/tvos/*.storyboard']
-      app_spec.info_plist = {
-        'UILaunchStoryboardName' => 'Main',
-        'UIMainStoryboardFile' => 'Main',
-        'NSMainStoryboardFile' => 'Main'
-      }
-
-      app_spec.pod_target_xcconfig = {
-        'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/GoogleDataTransport/GDTTestApp/Bridging-Header.h'
-      }
-    end
-  end
-
-  # Unit test specs
-  s.test_spec 'Tests-Unit' do |test_spec|
-    test_spec.scheme = { :code_coverage => true }
-    test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-    test_spec.requires_app_host = false
-    test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
-    test_spec.pod_target_xcconfig = header_search_paths
-  end
-
-  s.test_spec 'Tests-Lifecycle' do |test_spec|
-    test_spec.scheme = { :code_coverage => true }
-    test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-    test_spec.requires_app_host = false
-    test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
-    test_spec.pod_target_xcconfig = header_search_paths
-  end
-
-  # Integration test specs
-  s.test_spec 'Tests-Integration' do |test_spec|
-    test_spec.scheme = { :code_coverage => true }
-    test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-    test_spec.requires_app_host = false
-    test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
-    test_spec.pod_target_xcconfig = header_search_paths
-    test_spec.dependency 'GCDWebServer'
-  end
-
-  # Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
-  if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
-    s.test_spec 'Tests-Monkey' do |test_spec|
-      test_spec.scheme = { :code_coverage => true }
-      test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-      test_spec.requires_app_host = true
-      test_spec.app_host_name = 'GoogleDataTransport/TestApp'
-      test_spec.dependency 'GoogleDataTransport/TestApp'
-      test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Monkey/**/*.{swift}']
-      test_spec.info_plist = {
-        'GDT_MONKEYTEST' => '1'
-      }
-    end
-  end
-
-  # CCT Tests follow
-  if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
-    s.app_spec 'CCTTestApp' do |app_spec|
-      app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-      app_spec.source_files = 'GoogleDataTransport/GDTCCTTestApp/**/*.swift'
-      app_spec.ios.resources = ['GoogleDataTransport/GDTCCTTestApp/ios/*.storyboard']
-      app_spec.macos.resources = ['GoogleDataTransport/GDTCCTTestApp/macos/*.storyboard']
-      app_spec.tvos.resources = ['GoogleDataTransport/GDTCCTTestApp/tvos/*.storyboard']
-      app_spec.dependency 'SwiftProtobuf'
-      app_spec.info_plist = {
-        'UILaunchStoryboardName' => 'Main',
-        'UIMainStoryboardFile' => 'Main',
-        'NSMainStoryboardFile' => 'Main'
-      }
-    end
-  end
-
-  common_cct_test_sources = ['GoogleDataTransport/GDTCCTTests/Common/**/*.{h,m}']
-
-  # Test specs
-  s.test_spec 'CCT-Tests-Unit' do |test_spec|
-    test_spec.scheme = { :code_coverage => true }
-    test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-    test_spec.requires_app_host = false
-    test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
-    test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
-    test_spec.pod_target_xcconfig = header_search_paths
-    test_spec.dependency 'GCDWebServer'
-  end
-
-  s.test_spec 'CCT-Tests-Integration' do |test_spec|
-    test_spec.scheme = { :code_coverage => true }
-    test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-    test_spec.requires_app_host = false
-    test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}'] + common_cct_test_sources
-    test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
-    test_spec.pod_target_xcconfig = header_search_paths
-  end
-
-  # Monkey test specs, only enabled for development.
-  if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
-    s.test_spec 'CCT-Tests-Monkey' do |test_spec|
-      test_spec.scheme = { :code_coverage => true }
-      test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
-      test_spec.requires_app_host = true
-      test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'
-      test_spec.dependency 'GoogleDataTransport/CCTTestApp'
-      test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Monkey/**/*.{swift}'] + common_cct_test_sources
-      test_spec.info_plist = {
-        'GDT_MONKEYTEST' => '1'
-      }
-    end
-  end
-end

+ 0 - 130
GoogleDataTransport/CHANGELOG.md

@@ -1,130 +0,0 @@
-# v8.2.0
-- Expose upload URLs as a public API for Firebase Performance to use for denying instrumentation those URLs.
-
-# v8.1.0
-- Expose upload URLs which FirebasePerformance will depend upon.
-- Fix out-of-memory crash for a big amount of pending events. (#6995)
-
-# v8.0.1
-- Remove `GCC_TREAT_WARNINGS_AS_ERRORS` from the podspec.
-- Reduce pre-main startup time footprint. (#6855)
-
-# v8.0.0
-- Source restructuring to limit the public API surface.
-
-# v7.5.1
-- Fix deprecation warning for iOS 12.0 and higher projects. (#6682)
-
-# v7.5.0
-- Legacy pre Xcode 10 compatibility checks removed. (#6486)
-- `GDTCORDirectorySizeTracker` crash fixed. (#6540)
-
-# v7.4.0
-- Limit disk space consumed by GoogleDataTransport to store events. (#6365)
-- Fix `GDTTransformer` background task handling.  (#6258)
-
-# v7.1.1
-- Use `NSTimeZone` instead of `CFTimeZone` to get time zone offset respecting daylight. (#6246)
-
-# v7.1.0
-- Device uptime calculation fixes. (#6102)
-
-# v7.0.0
-- Storage has been completely reimplemented to a flat-file system. It
-is not backwards compatible with previously saved events.
-- Prioritizers, data futures, and upload packages have been removed.
-- Consolidated GoogleDataTransportCCTSupport with GoogleDataTransport. Starting
-with this version, GoogleDataTransportCCTSupport should no longer be linked.
-- `GDTCORFlatFileStorage`: keep not expired events when expired batch removed. (#6010)
-
-# v6.2.1
-- Stopped GDTCORUploadCoordinator from blocking main thread. (#5707, #5708)
-
-# v6.2.0
-- Added an API for arbitrary data persistence on storage instances.
-- Added an API for fetching storage instances specific to a target.
-
-# v6.1.1
-- Fixes writing event counts in a directory that doesn't yet exist. (#5549)
-
-# v6.1.0
-- watchOS extension and independent apps now supported. (#4292)
-- iOS extensions better supported.
-- GDTCORReachability will lazily initialize to address library loading hang. (#5463)
-
-# v6.0.0
-- Internal refactor to change storage to a protocol.
-
-# v5.1.1
-- Remove usage of memcpy and convert calls from malloc to calloc.
-- Fixes a race condition likely to occur when removing events.
-
-# v5.1.0
-- Stops creation of an event with a nil fileURL. (#5088)
-- Adds API to consolidate make NSSecureCoding related calls.
-- Better Catalyst support in testing.
-- GDTCOREvent is moved to an app cache relative path model.
-- Better debug logging.
-
-# v5.0.0
-- Refactors some APIs to fix passing of data from event generation to storage.
-
-# v4.0.1
-- Fixes missing a dispatch_sync and on-queue work in appWillTerminate of storage. (#4546)
-
-# v4.0.0
-- Internal restructuring to support a single class implementing several backends.
-
-# v3.3.1
-- Added extensive debug logging that can be turned on by changing
-GDT_VERBOSE_LOGGING to 1 in GDTCORConsoleLogger.h.
-
-# v3.3.0
-- Implemented initial support for watchOS.
-
-# v3.2.0
-- Expose the library version with a #define to a const string var.
-
-# v3.1.0
-- Fixes additional sanitizer issues and runtime errors.
-
-# v3.0.1
-- Fixes sanitizer issues and runtime errors. (#4039, #4027)
-
-# v3.0.0
-- Changes backgrounding logic to reduce background usage and properly complete
-all tasks. (#3893)
-- Fix Catalyst define checks. (#3695)
-- Fix ubsan issues in GDT (#3910)
-- Add support for FLL. (#3867)
-
-# v2.0.0
-- Change/rename all classes and references from GDT to GDTCOR. (#3729)
-
-# v1.2.0
-- Removes all NSAsserts in favor of custom asserts. (#3747)
-
-# v1.1.3
-- Wrap decoding in GDTCORUploadCoordinator in a try catch. (#3676)
-
-# v1.1.2
-- Add initial support for iOS 13.
-- Add initial support for Catalyst.
-- Backgrounding in GDTCORStorage is fixed. (#3623 and #3625)
-
-# v1.1.1
-- Fixes a crash in GDTCORUploadPackage and GDTCORStorage. (#3547)
-
-# v1.1.0
-- Remove almost all NSAsserts and NSCAsserts for a better development
-experience. (#3530)
-
-# v1.0.0
-- Initial Release--for Google-use only. This library is the foundation of a
-network transport layer that focuses on transparently and respectfully
-transporting data that is collected for purposes that vary depending on the
-adopting SDK. Primarily, we seek to reduce Firebase's impact on binary size,
-mobile data consumption, and battery use for end users by aggregating collected
-data and transporting it under ideal conditions. Users should expect to see an
-increase in the number of Cocoapods/frameworks/libraries, but a decrease in
-binary size over time as our codebase becomes more modularized.

+ 0 - 95
GoogleDataTransport/GDTCCTLibrary/GDTCCTCompressionHelper.m

@@ -1,95 +0,0 @@
-/*
- * 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 "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h"
-
-#import <zlib.h>
-
-@implementation GDTCCTCompressionHelper
-
-+ (nullable NSData *)gzippedData:(NSData *)data {
-#if defined(__LP64__) && __LP64__
-  // Don't support > 32bit length for 64 bit, see note in header.
-  if (data.length > UINT_MAX) {
-    return nil;
-  }
-#endif
-
-  const uint kChunkSize = 1024;
-
-  const void *bytes = [data bytes];
-  NSUInteger length = [data length];
-
-  int level = Z_DEFAULT_COMPRESSION;
-  if (!bytes || !length) {
-    return nil;
-  }
-
-  z_stream strm;
-  bzero(&strm, sizeof(z_stream));
-
-  int memLevel = 8;          // Default.
-  int windowBits = 15 + 16;  // Enable gzip header instead of zlib header.
-
-  int retCode;
-  if (deflateInit2(&strm, level, Z_DEFLATED, windowBits, memLevel, Z_DEFAULT_STRATEGY) != Z_OK) {
-    return nil;
-  }
-
-  // Hint the size at 1/4 the input size.
-  NSMutableData *result = [NSMutableData dataWithCapacity:(length / 4)];
-  unsigned char output[kChunkSize];
-
-  // Setup the input.
-  strm.avail_in = (unsigned int)length;
-  strm.next_in = (unsigned char *)bytes;
-
-  // Collect the data.
-  do {
-    // update what we're passing in
-    strm.avail_out = kChunkSize;
-    strm.next_out = output;
-    retCode = deflate(&strm, Z_FINISH);
-    if ((retCode != Z_OK) && (retCode != Z_STREAM_END)) {
-      deflateEnd(&strm);
-      return nil;
-    }
-    // Collect what we got.
-    unsigned gotBack = kChunkSize - strm.avail_out;
-    if (gotBack > 0) {
-      [result appendBytes:output length:gotBack];
-    }
-
-  } while (retCode == Z_OK);
-
-  // If the loop exits, it used all input and the stream ended.
-  NSAssert(strm.avail_in == 0,
-           @"Should have finished deflating without using all input, %u bytes left", strm.avail_in);
-  NSAssert(retCode == Z_STREAM_END,
-           @"thought we finished deflate w/o getting a result of stream end, code %d", retCode);
-
-  // Clean up.
-  deflateEnd(&strm);
-
-  return result;
-}
-
-+ (BOOL)isGzipped:(NSData *)data {
-  const UInt8 *bytes = (const UInt8 *)data.bytes;
-  return (data.length >= 2 && bytes[0] == 0x1f && bytes[1] == 0x8b);
-}
-
-@end

+ 0 - 270
GoogleDataTransport/GDTCCTLibrary/GDTCCTNanopbHelpers.m

@@ -1,270 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
-
-#if TARGET_OS_IOS || TARGET_OS_TV
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_OSX
-#import <AppKit/AppKit.h>
-#endif  // TARGET_OS_IOS || TARGET_OS_TV
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORPlatform.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORClock.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORConsoleLogger.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-
-#import <nanopb/pb.h>
-#import <nanopb/pb_decode.h>
-#import <nanopb/pb_encode.h>
-
-#import "GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h"
-
-#pragma mark - General purpose encoders
-
-pb_bytes_array_t *GDTCCTEncodeString(NSString *string) {
-  NSData *stringBytes = [string dataUsingEncoding:NSUTF8StringEncoding];
-  return GDTCCTEncodeData(stringBytes);
-}
-
-pb_bytes_array_t *GDTCCTEncodeData(NSData *data) {
-  pb_bytes_array_t *pbBytesArray = calloc(1, PB_BYTES_ARRAY_T_ALLOCSIZE(data.length));
-  if (pbBytesArray != NULL) {
-    [data getBytes:pbBytesArray->bytes length:data.length];
-    pbBytesArray->size = (pb_size_t)data.length;
-  }
-  return pbBytesArray;
-}
-
-#pragma mark - CCT object constructors
-
-NSData *_Nullable GDTCCTEncodeBatchedLogRequest(gdt_cct_BatchedLogRequest *batchedLogRequest) {
-  pb_ostream_t sizestream = PB_OSTREAM_SIZING;
-  // Encode 1 time to determine the size.
-  if (!pb_encode(&sizestream, gdt_cct_BatchedLogRequest_fields, batchedLogRequest)) {
-    GDTCORLogError(GDTCORMCEGeneralError, @"Error in nanopb encoding for size: %s",
-                   PB_GET_ERROR(&sizestream));
-  }
-
-  // Encode a 2nd time to actually get the bytes from it.
-  size_t bufferSize = sizestream.bytes_written;
-  CFMutableDataRef dataRef = CFDataCreateMutable(CFAllocatorGetDefault(), bufferSize);
-  CFDataSetLength(dataRef, bufferSize);
-  pb_ostream_t ostream = pb_ostream_from_buffer((void *)CFDataGetBytePtr(dataRef), bufferSize);
-  if (!pb_encode(&ostream, gdt_cct_BatchedLogRequest_fields, batchedLogRequest)) {
-    GDTCORLogError(GDTCORMCEGeneralError, @"Error in nanopb encoding for bytes: %s",
-                   PB_GET_ERROR(&ostream));
-  }
-
-  return CFBridgingRelease(dataRef);
-}
-
-gdt_cct_BatchedLogRequest GDTCCTConstructBatchedLogRequest(
-    NSDictionary<NSString *, NSSet<GDTCOREvent *> *> *logMappingIDToLogSet) {
-  gdt_cct_BatchedLogRequest batchedLogRequest = gdt_cct_BatchedLogRequest_init_default;
-  NSUInteger numberOfLogRequests = logMappingIDToLogSet.count;
-  gdt_cct_LogRequest *logRequests = calloc(numberOfLogRequests, sizeof(gdt_cct_LogRequest));
-  if (logRequests == NULL) {
-    return batchedLogRequest;
-  }
-
-  __block int i = 0;
-  [logMappingIDToLogSet enumerateKeysAndObjectsUsingBlock:^(NSString *_Nonnull logMappingID,
-                                                            NSSet<GDTCOREvent *> *_Nonnull logSet,
-                                                            BOOL *_Nonnull stop) {
-    int32_t logSource = [logMappingID intValue];
-    gdt_cct_LogRequest logRequest = GDTCCTConstructLogRequest(logSource, logSet);
-    logRequests[i] = logRequest;
-    i++;
-  }];
-
-  batchedLogRequest.log_request = logRequests;
-  batchedLogRequest.log_request_count = (pb_size_t)numberOfLogRequests;
-  return batchedLogRequest;
-}
-
-gdt_cct_LogRequest GDTCCTConstructLogRequest(int32_t logSource,
-                                             NSSet<GDTCOREvent *> *_Nonnull logSet) {
-  if (logSet.count == 0) {
-    GDTCORLogError(GDTCORMCEGeneralError, @"%@",
-                   @"An empty event set can't be serialized to proto.");
-    gdt_cct_LogRequest logRequest = gdt_cct_LogRequest_init_default;
-    return logRequest;
-  }
-  gdt_cct_LogRequest logRequest = gdt_cct_LogRequest_init_default;
-  logRequest.log_source = logSource;
-  logRequest.has_log_source = 1;
-  logRequest.client_info = GDTCCTConstructClientInfo();
-  logRequest.has_client_info = 1;
-  logRequest.log_event = calloc(logSet.count, sizeof(gdt_cct_LogEvent));
-  if (logRequest.log_event == NULL) {
-    return logRequest;
-  }
-  int i = 0;
-  for (GDTCOREvent *log in logSet) {
-    gdt_cct_LogEvent logEvent = GDTCCTConstructLogEvent(log);
-    logRequest.log_event[i] = logEvent;
-    i++;
-  }
-  logRequest.log_event_count = (pb_size_t)logSet.count;
-
-  GDTCORClock *currentTime = [GDTCORClock snapshot];
-  logRequest.request_time_ms = currentTime.timeMillis;
-  logRequest.has_request_time_ms = 1;
-  logRequest.request_uptime_ms = [currentTime uptimeMilliseconds];
-  logRequest.has_request_uptime_ms = 1;
-
-  return logRequest;
-}
-
-gdt_cct_LogEvent GDTCCTConstructLogEvent(GDTCOREvent *event) {
-  gdt_cct_LogEvent logEvent = gdt_cct_LogEvent_init_default;
-  logEvent.event_time_ms = event.clockSnapshot.timeMillis;
-  logEvent.has_event_time_ms = 1;
-  logEvent.event_uptime_ms = [event.clockSnapshot uptimeMilliseconds];
-  logEvent.has_event_uptime_ms = 1;
-  logEvent.timezone_offset_seconds = event.clockSnapshot.timezoneOffsetSeconds;
-  logEvent.has_timezone_offset_seconds = 1;
-  if (event.customBytes) {
-    NSData *networkConnectionInfoData = event.networkConnectionInfoData;
-    if (networkConnectionInfoData) {
-      [networkConnectionInfoData getBytes:&logEvent.network_connection_info
-                                   length:networkConnectionInfoData.length];
-      logEvent.has_network_connection_info = 1;
-    }
-    NSNumber *eventCode = event.eventCode;
-    if (eventCode != nil) {
-      logEvent.has_event_code = 1;
-      logEvent.event_code = [eventCode intValue];
-    }
-  }
-  NSError *error;
-  NSData *extensionBytes;
-  extensionBytes = event.serializedDataObjectBytes;
-  if (error) {
-    GDTCORLogWarning(GDTCORMCWFileReadError,
-                     @"There was an error reading extension bytes from disk: %@", error);
-    return logEvent;
-  }
-  logEvent.source_extension = GDTCCTEncodeData(extensionBytes);  // read bytes from the file.
-  return logEvent;
-}
-
-gdt_cct_ClientInfo GDTCCTConstructClientInfo() {
-  gdt_cct_ClientInfo clientInfo = gdt_cct_ClientInfo_init_default;
-  clientInfo.client_type = gdt_cct_ClientInfo_ClientType_IOS_FIREBASE;
-  clientInfo.has_client_type = 1;
-#if TARGET_OS_IOS || TARGET_OS_TV
-  clientInfo.ios_client_info = GDTCCTConstructiOSClientInfo();
-  clientInfo.has_ios_client_info = 1;
-#elif TARGET_OS_OSX
-  // TODO(mikehaney24): Expand the proto to include macOS client info.
-#endif
-  return clientInfo;
-}
-
-gdt_cct_IosClientInfo GDTCCTConstructiOSClientInfo() {
-  gdt_cct_IosClientInfo iOSClientInfo = gdt_cct_IosClientInfo_init_default;
-#if TARGET_OS_IOS || TARGET_OS_TV
-  UIDevice *device = [UIDevice currentDevice];
-  NSBundle *bundle = [NSBundle mainBundle];
-  NSLocale *locale = [NSLocale currentLocale];
-  iOSClientInfo.os_full_version = GDTCCTEncodeString(device.systemVersion);
-  NSArray *versionComponents = [device.systemVersion componentsSeparatedByString:@"."];
-  iOSClientInfo.os_major_version = GDTCCTEncodeString(versionComponents[0]);
-  NSString *version = [bundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
-  if (version) {
-    iOSClientInfo.application_build = GDTCCTEncodeString(version);
-  }
-  NSString *countryCode = [locale objectForKey:NSLocaleCountryCode];
-  if (countryCode) {
-    iOSClientInfo.country = GDTCCTEncodeString([locale objectForKey:NSLocaleCountryCode]);
-  }
-  iOSClientInfo.model = GDTCCTEncodeString(GDTCORDeviceModel());
-  NSString *languageCode = bundle.preferredLocalizations.firstObject;
-  iOSClientInfo.language_code =
-      languageCode ? GDTCCTEncodeString(languageCode) : GDTCCTEncodeString(@"en");
-  iOSClientInfo.application_bundle_id = GDTCCTEncodeString(bundle.bundleIdentifier);
-#endif
-  return iOSClientInfo;
-}
-
-NSData *GDTCCTConstructNetworkConnectionInfoData() {
-  gdt_cct_NetworkConnectionInfo networkConnectionInfo = gdt_cct_NetworkConnectionInfo_init_default;
-  NSInteger currentNetworkType = GDTCORNetworkTypeMessage();
-  if (currentNetworkType) {
-    networkConnectionInfo.has_network_type = 1;
-    if (currentNetworkType == GDTCORNetworkTypeMobile) {
-      networkConnectionInfo.network_type = gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE;
-      networkConnectionInfo.mobile_subtype = GDTCCTNetworkConnectionInfoNetworkMobileSubtype();
-      if (networkConnectionInfo.mobile_subtype !=
-          gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE) {
-        networkConnectionInfo.has_mobile_subtype = 1;
-      }
-    } else {
-      networkConnectionInfo.network_type = gdt_cct_NetworkConnectionInfo_NetworkType_WIFI;
-    }
-  }
-  NSData *networkConnectionInfoData = [NSData dataWithBytes:&networkConnectionInfo
-                                                     length:sizeof(networkConnectionInfo)];
-  return networkConnectionInfoData;
-}
-
-gdt_cct_NetworkConnectionInfo_MobileSubtype GDTCCTNetworkConnectionInfoNetworkMobileSubtype() {
-  NSNumber *networkMobileSubtypeMessage = @(GDTCORNetworkMobileSubTypeMessage());
-  if (!networkMobileSubtypeMessage.intValue) {
-    return gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE;
-  }
-  static NSDictionary<NSNumber *, NSNumber *> *MessageToNetworkSubTypeMessage;
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    MessageToNetworkSubTypeMessage = @{
-      @(GDTCORNetworkMobileSubtypeGPRS) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_GPRS),
-      @(GDTCORNetworkMobileSubtypeEdge) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_EDGE),
-      @(GDTCORNetworkMobileSubtypeWCDMA) :
-          @(gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE),
-      @(GDTCORNetworkMobileSubtypeHSDPA) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_HSDPA),
-      @(GDTCORNetworkMobileSubtypeHSUPA) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_HSUPA),
-      @(GDTCORNetworkMobileSubtypeCDMA1x) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_CDMA),
-      @(GDTCORNetworkMobileSubtypeCDMAEVDORev0) :
-          @(gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_0),
-      @(GDTCORNetworkMobileSubtypeCDMAEVDORevA) :
-          @(gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_A),
-      @(GDTCORNetworkMobileSubtypeCDMAEVDORevB) :
-          @(gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_B),
-      @(GDTCORNetworkMobileSubtypeHRPD) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_EHRPD),
-      @(GDTCORNetworkMobileSubtypeLTE) : @(gdt_cct_NetworkConnectionInfo_MobileSubtype_LTE),
-    };
-  });
-  NSNumber *networkMobileSubtype = MessageToNetworkSubTypeMessage[networkMobileSubtypeMessage];
-  return networkMobileSubtype.intValue;
-}
-
-#pragma mark - CCT Object decoders
-
-gdt_cct_LogResponse GDTCCTDecodeLogResponse(NSData *data, NSError **error) {
-  gdt_cct_LogResponse response = gdt_cct_LogResponse_init_default;
-  pb_istream_t istream = pb_istream_from_buffer([data bytes], [data length]);
-  if (!pb_decode(&istream, gdt_cct_LogResponse_fields, &response)) {
-    NSString *nanopb_error = [NSString stringWithFormat:@"%s", PB_GET_ERROR(&istream)];
-    NSDictionary *userInfo = @{@"nanopb error:" : nanopb_error};
-    if (error != NULL) {
-      *error = [NSError errorWithDomain:NSURLErrorDomain code:-1 userInfo:userInfo];
-    }
-    response = (gdt_cct_LogResponse)gdt_cct_LogResponse_init_default;
-  }
-  return response;
-}

+ 0 - 661
GoogleDataTransport/GDTCCTLibrary/GDTCCTUploader.m

@@ -1,661 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTUploader.h"
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORPlatform.h"
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h"
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageProtocol.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORConsoleLogger.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREndpoints.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-
-#import <nanopb/pb.h>
-#import <nanopb/pb_decode.h>
-#import <nanopb/pb_encode.h>
-
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h"
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-#ifdef GDTCOR_VERSION
-#define STR(x) STR_EXPAND(x)
-#define STR_EXPAND(x) #x
-static NSString *const kGDTCCTSupportSDKVersion = @STR(GDTCOR_VERSION);
-#else
-static NSString *const kGDTCCTSupportSDKVersion = @"UNKNOWN";
-#endif  // GDTCOR_VERSION
-
-/** */
-static NSInteger kWeekday;
-
-/** */
-static NSString *const kLibraryDataCCTNextUploadTimeKey = @"GDTCCTUploaderFLLNextUploadTimeKey";
-
-/** */
-static NSString *const kLibraryDataFLLNextUploadTimeKey = @"GDTCCTUploaderFLLNextUploadTimeKey";
-
-#if !NDEBUG
-NSNotificationName const GDTCCTUploadCompleteNotification = @"com.GDTCCTUploader.UploadComplete";
-#endif  // #if !NDEBUG
-
-typedef void (^GDTCCTUploaderURLTaskCompletion)(NSNumber *batchID,
-                                                NSSet<GDTCOREvent *> *_Nullable events,
-                                                NSData *_Nullable data,
-                                                NSURLResponse *_Nullable response,
-                                                NSError *_Nullable error);
-
-typedef void (^GDTCCTUploaderEventBatchBlock)(NSNumber *_Nullable batchID,
-                                              NSSet<GDTCOREvent *> *_Nullable events);
-
-@interface GDTCCTUploader () <NSURLSessionDelegate>
-
-/// Redeclared as readwrite.
-@property(nullable, nonatomic, readwrite) NSURLSessionUploadTask *currentTask;
-
-/// A flag indicating if there is an ongoing upload. The current implementation supports only a
-/// single upload operation. If `uploadTarget` method is called when  `isCurrentlyUploading == YES`
-/// then no new uploads will be started.
-@property(atomic) BOOL isCurrentlyUploading;
-
-@end
-
-@implementation GDTCCTUploader
-
-@synthesize uploaderSession = _uploaderSession;
-static NSURL *_testServerURL = nil;
-
-+ (void)load {
-  GDTCCTUploader *uploader = [GDTCCTUploader sharedInstance];
-  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetCCT];
-  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetFLL];
-  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetCSH];
-  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetINT];
-}
-
-+ (instancetype)sharedInstance {
-  static GDTCCTUploader *sharedInstance;
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    sharedInstance = [[GDTCCTUploader alloc] init];
-  });
-  return sharedInstance;
-}
-
-+ (void)setTestServerURL:(NSURL *_Nullable)serverURL {
-  _testServerURL = serverURL;
-}
-
-+ (NSURL *_Nullable)testServerURL {
-  return _testServerURL;
-}
-
-+ (nullable NSURL *)serverURLForTarget:(GDTCORTarget)target {
-#if !NDEBUG
-  if (_testServerURL) {
-    return _testServerURL;
-  }
-#endif  // !NDEBUG
-
-  return [GDTCOREndpoints uploadURLForTarget:target];
-}
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    _uploaderQueue = dispatch_queue_create("com.google.GDTCCTUploader", DISPATCH_QUEUE_SERIAL);
-  }
-  return self;
-}
-
-- (NSURLSession *)uploaderSession {
-  if (_uploaderSession == nil) {
-    NSURLSessionConfiguration *config = [NSURLSessionConfiguration ephemeralSessionConfiguration];
-    _uploaderSession = [NSURLSession sessionWithConfiguration:config
-                                                     delegate:self
-                                                delegateQueue:nil];
-  }
-  return _uploaderSession;
-}
-
-- (NSString *)FLLAndCSHandINTAPIKey {
-  static NSString *defaultServerKey;
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    // These strings should be interleaved to construct the real key.
-    const char *p1 = "AzSBG0honD6A-PxV5nBc";
-    const char *p2 = "Iay44Iwtu2vV0AOrz1C";
-    const char defaultKey[40] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],
-                                 p1[4],  p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],
-                                 p1[8],  p2[8],  p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11],
-                                 p1[12], p2[12], p1[13], p2[13], p1[14], p2[14], p1[15], p2[15],
-                                 p1[16], p2[16], p1[17], p2[17], p1[18], p2[18], p1[19], '\0'};
-    defaultServerKey = [NSString stringWithUTF8String:defaultKey];
-  });
-  return defaultServerKey;
-}
-
-#
-
-- (void)uploadTarget:(GDTCORTarget)target withConditions:(GDTCORUploadConditions)conditions {
-  __block GDTCORBackgroundIdentifier backgroundTaskID = GDTCORBackgroundIdentifierInvalid;
-
-  dispatch_block_t backgroundTaskCompletion = ^{
-    // End the background task if there was one.
-    if (backgroundTaskID != GDTCORBackgroundIdentifierInvalid) {
-      [[GDTCORApplication sharedApplication] endBackgroundTask:backgroundTaskID];
-      backgroundTaskID = GDTCORBackgroundIdentifierInvalid;
-    }
-  };
-
-  backgroundTaskID = [[GDTCORApplication sharedApplication]
-      beginBackgroundTaskWithName:@"GDTCCTUploader-upload"
-                expirationHandler:^{
-                  if (backgroundTaskID != GDTCORBackgroundIdentifierInvalid) {
-                    // Cancel the upload and complete delivery.
-                    [self.currentTask cancel];
-
-                    // End the background task.
-                    backgroundTaskCompletion();
-                  }
-                }];
-
-  dispatch_async(_uploaderQueue, ^{
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(target);
-
-    // 1. Fetch events to upload.
-    [self batchToUploadForTarget:target
-                         storage:storage
-                      conditions:conditions
-                      completion:^(NSNumber *_Nullable batchID,
-                                   NSSet<GDTCOREvent *> *_Nullable events) {
-                        // 2. Check if there are events to upload.
-                        if (!events || events.count == 0) {
-                          dispatch_async(self.uploaderQueue, ^{
-                            GDTCORLogDebug(@"Target %ld reported as ready for upload, but no "
-                                           @"events were selected",
-                                           (long)target);
-                            self.isCurrentlyUploading = NO;
-                            backgroundTaskCompletion();
-                          });
-
-                          return;
-                        }
-                        // 3. Upload events.
-                        [self uploadBatchWithID:batchID
-                                         events:events
-                                         target:target
-                                        storage:storage
-                                     completion:^{
-                                       backgroundTaskCompletion();
-                                     }];
-                      }];
-  });
-}
-
-#pragma mark - Upload implementation details
-
-/** Performs URL request, handles the result and updates the uploader state. */
-- (void)uploadBatchWithID:(nullable NSNumber *)batchID
-                   events:(nullable NSSet<GDTCOREvent *> *)events
-                   target:(GDTCORTarget)target
-                  storage:(id<GDTCORStorageProtocol>)storage
-               completion:(dispatch_block_t)completion {
-  [self
-      sendURLRequestForBatchWithID:batchID
-                            events:events
-                            target:target
-                 completionHandler:^(NSNumber *_Nonnull batchID,
-                                     NSSet<GDTCOREvent *> *_Nullable events, NSData *_Nullable data,
-                                     NSURLResponse *_Nullable response, NSError *_Nullable error) {
-                   dispatch_async(self.uploaderQueue, ^{
-                     [self handleURLResponse:response
-                                        data:data
-                                       error:error
-                                      target:target
-                                     storage:storage
-                                     batchID:batchID];
-#if !NDEBUG
-                     // Post a notification when in DEBUG mode to state how many packages
-                     // were uploaded. Useful for validation during tests.
-                     [[NSNotificationCenter defaultCenter]
-                         postNotificationName:GDTCCTUploadCompleteNotification
-                                       object:@(events.count)];
-#endif  // #if !NDEBUG
-                     self.isCurrentlyUploading = NO;
-                     completion();
-                   });
-                 }];
-}
-
-/** Validates events and sends URL request and calls completion with the result. Modifies uploading
- * state in the case of the failure.*/
-- (void)sendURLRequestForBatchWithID:(nullable NSNumber *)batchID
-                              events:(nullable NSSet<GDTCOREvent *> *)events
-                              target:(GDTCORTarget)target
-                   completionHandler:(GDTCCTUploaderURLTaskCompletion)completionHandler {
-  dispatch_async(self.uploaderQueue, ^{
-    NSData *requestProtoData = [self constructRequestProtoWithEvents:events];
-    NSData *gzippedData = [GDTCCTCompressionHelper gzippedData:requestProtoData];
-    BOOL usingGzipData = gzippedData != nil && gzippedData.length < requestProtoData.length;
-    NSData *dataToSend = usingGzipData ? gzippedData : requestProtoData;
-    NSURLRequest *request = [self constructRequestForTarget:target data:dataToSend];
-    GDTCORLogDebug(@"CTT: request containing %lu events created: %@", (unsigned long)events.count,
-                   request);
-    NSSet<GDTCOREvent *> *eventsForDebug;
-#if !NDEBUG
-    eventsForDebug = events;
-#endif
-    self.currentTask = [self.uploaderSession
-        uploadTaskWithRequest:request
-                     fromData:dataToSend
-            completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response,
-                                NSError *_Nullable error) {
-              completionHandler(batchID, eventsForDebug, data, response, error);
-            }];
-    GDTCORLogDebug(@"%@", @"CCT: The upload task is about to begin.");
-    [self.currentTask resume];
-  });
-}
-
-/** Handles URL request response. */
-- (void)handleURLResponse:(nullable NSURLResponse *)response
-                     data:(nullable NSData *)data
-                    error:(nullable NSError *)error
-                   target:(GDTCORTarget)target
-                  storage:(id<GDTCORStorageProtocol>)storage
-                  batchID:(NSNumber *)batchID {
-  GDTCORLogDebug(@"%@", @"CCT: request completed");
-  if (error) {
-    GDTCORLogWarning(GDTCORMCWUploadFailed, @"There was an error uploading events: %@", error);
-  }
-  NSError *decodingError;
-  GDTCORClock *futureUploadTime;
-  if (data) {
-    gdt_cct_LogResponse logResponse = GDTCCTDecodeLogResponse(data, &decodingError);
-    if (!decodingError && logResponse.has_next_request_wait_millis) {
-      GDTCORLogDebug(@"CCT: The backend responded asking to not upload for %lld millis from now.",
-                     logResponse.next_request_wait_millis);
-      futureUploadTime =
-          [GDTCORClock clockSnapshotInTheFuture:logResponse.next_request_wait_millis];
-    } else if (decodingError) {
-      GDTCORLogDebug(@"There was a response decoding error: %@", decodingError);
-    }
-    pb_release(gdt_cct_LogResponse_fields, &logResponse);
-  }
-  if (!futureUploadTime) {
-    GDTCORLogDebug(@"%@", @"CCT: The backend response failed to parse, so the next request "
-                          @"won't occur until 15 minutes from now");
-    // 15 minutes from now.
-    futureUploadTime = [GDTCORClock clockSnapshotInTheFuture:15 * 60 * 1000];
-  }
-  switch (target) {
-    case kGDTCORTargetCCT:
-      self->_CCTNextUploadTime = futureUploadTime;
-      break;
-
-    case kGDTCORTargetFLL:
-      // Falls through.
-    case kGDTCORTargetINT:
-      // Falls through.
-    case kGDTCORTargetCSH:
-      self->_FLLNextUploadTime = futureUploadTime;
-      break;
-    default:
-      break;
-  }
-
-  // Only retry if one of these codes is returned, or there was an error.
-  if (error || ((NSHTTPURLResponse *)response).statusCode == 429 ||
-      ((NSHTTPURLResponse *)response).statusCode == 503) {
-    // Move the events back to the main storage to be uploaded on the next attempt.
-    [storage removeBatchWithID:batchID deleteEvents:NO onComplete:nil];
-  } else {
-    GDTCORLogDebug(@"%@", @"CCT: package delivered");
-    [storage removeBatchWithID:batchID deleteEvents:YES onComplete:nil];
-  }
-
-  self.currentTask = nil;
-}
-
-#pragma mark - Stored events upload
-
-/** Fetches a batch of pending events for the specified target and conditions. Passes `nil` to
- * completion if there are no suitable events to upload. */
-- (void)batchToUploadForTarget:(GDTCORTarget)target
-                       storage:(id<GDTCORStorageProtocol>)storage
-                    conditions:(GDTCORUploadConditions)conditions
-                    completion:(GDTCCTUploaderEventBatchBlock)completion {
-  // 1. Check if the conditions for the target are suitable.
-  if (![self readyToUploadTarget:target conditions:conditions]) {
-    completion(nil, nil);
-    return;
-  }
-
-  // 2. Remove previously attempted batches
-  [self removeBatchesForTarget:target
-                       storage:storage
-                    onComplete:^{
-                      // There may be a big amount of events stored, so creating a batch may be an
-                      // expensive operation.
-
-                      // 3. Do a lightweight check if there are any events for the target first to
-                      // finish early if there are no.
-                      [storage hasEventsForTarget:target
-                                       onComplete:^(BOOL hasEvents) {
-                                         // 4. Proceed with fetching the events.
-                                         [self batchToUploadForTarget:target
-                                                              storage:storage
-                                                           conditions:conditions
-                                                            hasEvents:hasEvents
-                                                           completion:completion];
-                                       }];
-                    }];
-}
-
-/** Makes final checks before and makes */
-- (void)batchToUploadForTarget:(GDTCORTarget)target
-                       storage:(id<GDTCORStorageProtocol>)storage
-                    conditions:(GDTCORUploadConditions)conditions
-                     hasEvents:(BOOL)hasEvents
-                    completion:(GDTCCTUploaderEventBatchBlock)completion {
-  dispatch_async(self.uploaderQueue, ^{
-    if (!hasEvents) {
-      // No events to upload.
-      completion(nil, nil);
-      return;
-    }
-
-    // Check if the conditions are still met before starting upload.
-    if (![self readyToUploadTarget:target conditions:conditions]) {
-      completion(nil, nil);
-      return;
-    }
-
-    // All conditions have been checked and met. Lock uploader for this target to prevent other
-    // targets upload attempts.
-    self.isCurrentlyUploading = YES;
-
-    // Fetch a batch to upload and pass along.
-    GDTCORStorageEventSelector *eventSelector = [self eventSelectorTarget:target
-                                                           withConditions:conditions];
-    [storage batchWithEventSelector:eventSelector
-                    batchExpiration:[NSDate dateWithTimeIntervalSinceNow:600]
-                         onComplete:completion];
-  });
-}
-
-- (void)removeBatchesForTarget:(GDTCORTarget)target
-                       storage:(id<GDTCORStorageProtocol>)storage
-                    onComplete:(dispatch_block_t)onComplete {
-  [storage batchIDsForTarget:target
-                  onComplete:^(NSSet<NSNumber *> *_Nullable batchIDs) {
-                    // No stored batches, no need to remove anything.
-                    if (batchIDs.count < 1) {
-                      onComplete();
-                      return;
-                    }
-
-                    dispatch_group_t dispatchGroup = dispatch_group_create();
-                    for (NSNumber *batchID in batchIDs) {
-                      dispatch_group_enter(dispatchGroup);
-
-                      // Remove batches and moves events back to the storage.
-                      [storage removeBatchWithID:batchID
-                                    deleteEvents:NO
-                                      onComplete:^{
-                                        dispatch_group_leave(dispatchGroup);
-                                      }];
-                    }
-
-                    // Wait until all batches are removed and call completion handler.
-                    dispatch_group_notify(dispatchGroup, self.uploaderQueue, ^{
-                      onComplete();
-                    });
-                  }];
-}
-
-#pragma mark - Private helper methods
-
-/** */
-- (BOOL)readyToUploadTarget:(GDTCORTarget)target conditions:(GDTCORUploadConditions)conditions {
-  if (self.isCurrentlyUploading) {
-    GDTCORLogDebug(@"%@", @"CCT: Wait until previous upload finishes. The current version supports "
-                          @"only a single batch uploading at the time.");
-    return NO;
-  }
-
-  // Not ready to upload with no network connection.
-  // TODO: Reconsider using reachability to prevent an upload attempt.
-  // See https://developer.apple.com/videos/play/wwdc2019/712/ (49:40) for more details.
-  if (conditions & GDTCORUploadConditionNoNetwork) {
-    GDTCORLogDebug(@"%@", @"CCT: Not ready to upload without a network connection.");
-    return NO;
-  }
-
-  // Upload events when there are with no additional conditions for kGDTCORTargetCSH.
-  if (target == kGDTCORTargetCSH) {
-    GDTCORLogDebug(@"%@", @"CCT: kGDTCORTargetCSH events are allowed to be "
-                          @"uploaded straight away.");
-    return YES;
-  }
-
-  if (target == kGDTCORTargetINT) {
-    GDTCORLogDebug(@"%@", @"CCT: kGDTCORTargetINT events are allowed to be "
-                          @"uploaded straight away.");
-    return YES;
-  }
-
-  // Upload events with no additional conditions if high priority.
-  if ((conditions & GDTCORUploadConditionHighPriority) == GDTCORUploadConditionHighPriority) {
-    GDTCORLogDebug(@"%@", @"CCT: a high priority event is allowing an upload");
-    return YES;
-  }
-
-  // Check next upload time for the target.
-  BOOL isAfterNextUploadTime = YES;
-  switch (target) {
-    case kGDTCORTargetCCT:
-      if (self->_CCTNextUploadTime) {
-        isAfterNextUploadTime = [[GDTCORClock snapshot] isAfter:self->_CCTNextUploadTime];
-      }
-      break;
-
-    case kGDTCORTargetFLL:
-      if (self->_FLLNextUploadTime) {
-        isAfterNextUploadTime = [[GDTCORClock snapshot] isAfter:self->_FLLNextUploadTime];
-      }
-      break;
-
-    default:
-      // The CSH backend should be handled above.
-      break;
-  }
-
-  if (isAfterNextUploadTime) {
-    GDTCORLogDebug(@"CCT: can upload to target %ld because the request wait time has transpired",
-                   (long)target);
-  } else {
-    GDTCORLogDebug(@"CCT: can't upload to target %ld because the backend asked to wait",
-                   (long)target);
-  }
-
-  return isAfterNextUploadTime;
-}
-
-/** Constructs data given an upload package.
- *
- * @param events The events used to construct the request proto bytes.
- * @return Proto bytes representing a gdt_cct_LogRequest object.
- */
-- (nonnull NSData *)constructRequestProtoWithEvents:(NSSet<GDTCOREvent *> *)events {
-  // Segment the log events by log type.
-  NSMutableDictionary<NSString *, NSMutableSet<GDTCOREvent *> *> *logMappingIDToLogSet =
-      [[NSMutableDictionary alloc] init];
-  [events enumerateObjectsUsingBlock:^(GDTCOREvent *_Nonnull event, BOOL *_Nonnull stop) {
-    NSMutableSet *logSet = logMappingIDToLogSet[event.mappingID];
-    logSet = logSet ? logSet : [[NSMutableSet alloc] init];
-    [logSet addObject:event];
-    logMappingIDToLogSet[event.mappingID] = logSet;
-  }];
-
-  gdt_cct_BatchedLogRequest batchedLogRequest =
-      GDTCCTConstructBatchedLogRequest(logMappingIDToLogSet);
-
-  NSData *data = GDTCCTEncodeBatchedLogRequest(&batchedLogRequest);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batchedLogRequest);
-  return data ? data : [[NSData alloc] init];
-}
-
-/** Constructs a request to FLL given a URL and request body data.
- *
- * @param target The target backend to send the request to.
- * @param data The request body data.
- * @return A new NSURLRequest ready to be sent to FLL.
- */
-- (nullable NSURLRequest *)constructRequestForTarget:(GDTCORTarget)target data:(NSData *)data {
-  if (data == nil || data.length == 0) {
-    GDTCORLogDebug(@"There was no data to construct a request for target %ld.", (long)target);
-    return nil;
-  }
-  NSURL *URL = [[self class] serverURLForTarget:target];
-  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
-  NSString *targetString;
-  switch (target) {
-    case kGDTCORTargetCCT:
-      targetString = @"cct";
-      break;
-
-    case kGDTCORTargetFLL:
-      targetString = @"fll";
-      break;
-
-    case kGDTCORTargetCSH:
-      targetString = @"csh";
-      break;
-    case kGDTCORTargetINT:
-      targetString = @"int";
-      break;
-
-    default:
-      targetString = @"unknown";
-      break;
-  }
-  NSString *userAgent =
-      [NSString stringWithFormat:@"datatransport/%@ %@support/%@ apple/", kGDTCORVersion,
-                                 targetString, kGDTCCTSupportSDKVersion];
-  if (target == kGDTCORTargetFLL || target == kGDTCORTargetCSH) {
-    [request setValue:[self FLLAndCSHandINTAPIKey] forHTTPHeaderField:@"X-Goog-Api-Key"];
-  }
-
-  if (target == kGDTCORTargetINT) {
-    [request setValue:[self FLLAndCSHandINTAPIKey] forHTTPHeaderField:@"X-Goog-Api-Key"];
-  }
-
-  if ([GDTCCTCompressionHelper isGzipped:data]) {
-    [request setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"];
-  }
-  [request setValue:@"application/x-protobuf" forHTTPHeaderField:@"Content-Type"];
-  [request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
-  [request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
-  request.HTTPMethod = @"POST";
-  [request setHTTPBody:data];
-  return request;
-}
-
-/** */
-- (nullable GDTCORStorageEventSelector *)eventSelectorTarget:(GDTCORTarget)target
-                                              withConditions:(GDTCORUploadConditions)conditions {
-  id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(target);
-  if ((conditions & GDTCORUploadConditionHighPriority) == GDTCORUploadConditionHighPriority) {
-    return [GDTCORStorageEventSelector eventSelectorForTarget:target];
-  }
-  NSMutableSet<NSNumber *> *qosTiers = [[NSMutableSet alloc] init];
-  if (conditions & GDTCORUploadConditionWifiData) {
-    [qosTiers addObjectsFromArray:@[
-      @(GDTCOREventQoSFast), @(GDTCOREventQoSWifiOnly), @(GDTCOREventQosDefault),
-      @(GDTCOREventQoSTelemetry), @(GDTCOREventQoSUnknown)
-    ]];
-  }
-  if (conditions & GDTCORUploadConditionMobileData) {
-    [qosTiers addObjectsFromArray:@[ @(GDTCOREventQoSFast), @(GDTCOREventQosDefault) ]];
-  }
-
-  __block NSInteger lastDayOfDailyUpload;
-  NSString *lastDailyUploadDataKey = [NSString
-      stringWithFormat:@"%@LastDailyUpload-%ld", NSStringFromClass([self class]), (long)target];
-  [storage libraryDataForKey:lastDailyUploadDataKey
-      onFetchComplete:^(NSData *_Nullable data, NSError *_Nullable error) {
-        [data getBytes:&lastDayOfDailyUpload length:sizeof(NSInteger)];
-      }
-      setNewValue:^NSData *_Nullable {
-        if (lastDayOfDailyUpload != kWeekday) {
-          return [NSData dataWithBytes:&lastDayOfDailyUpload length:sizeof(NSInteger)];
-        }
-        return nil;
-      }];
-
-  return [[GDTCORStorageEventSelector alloc] initWithTarget:target
-                                                   eventIDs:nil
-                                                 mappingIDs:nil
-                                                   qosTiers:qosTiers];
-}
-
-#pragma mark - GDTCORLifecycleProtocol
-
-- (void)appWillForeground:(GDTCORApplication *)app {
-  dispatch_async(_uploaderQueue, ^{
-    NSDateComponents *dateComponents = [[NSDateComponents alloc] init];
-    NSCalendar *gregorianCalendar =
-        [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
-    NSDate *date = [gregorianCalendar dateFromComponents:dateComponents];
-    kWeekday = [gregorianCalendar component:NSCalendarUnitWeekday fromDate:date];
-  });
-}
-
-- (void)appWillTerminate:(GDTCORApplication *)application {
-  dispatch_sync(_uploaderQueue, ^{
-    [self.currentTask cancel];
-  });
-}
-
-#pragma mark - NSURLSessionDelegate
-
-- (void)URLSession:(NSURLSession *)session
-                          task:(NSURLSessionTask *)task
-    willPerformHTTPRedirection:(NSHTTPURLResponse *)response
-                    newRequest:(NSURLRequest *)request
-             completionHandler:(void (^)(NSURLRequest *_Nullable))completionHandler {
-  if (!completionHandler) {
-    return;
-  }
-  if (response.statusCode == 302 || response.statusCode == 301) {
-    if ([request.URL isEqual:[[self class] serverURLForTarget:kGDTCORTargetFLL]]) {
-      NSURLRequest *newRequest = [self constructRequestForTarget:kGDTCORTargetCCT
-                                                            data:task.originalRequest.HTTPBody];
-      completionHandler(newRequest);
-    }
-  } else {
-    completionHandler(request);
-  }
-}
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 236
GoogleDataTransport/GDTCCTLibrary/GDTCOREvent+GDTCCTSupport.m

@@ -1,236 +0,0 @@
-/*
- * 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 "GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h"
-
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORConsoleLogger.h"
-
-NSString *const GDTCCTNeedsNetworkConnectionInfo = @"needs_network_connection_info";
-
-NSString *const GDTCCTNetworkConnectionInfo = @"network_connection_info";
-
-NSString *const GDTCCTEventCodeInfo = @"event_code_info";
-
-@implementation GDTCOREvent (GDTCCTSupport)
-
-- (void)setNeedsNetworkConnectionInfoPopulated:(BOOL)needsNetworkConnectionInfoPopulated {
-  if (!needsNetworkConnectionInfoPopulated) {
-    if (!self.customBytes) {
-      return;
-    }
-
-    // Make sure we don't destroy the eventCode data, if any is present.
-    @try {
-      NSError *error;
-      NSMutableDictionary *bytesDict =
-          [[NSJSONSerialization JSONObjectWithData:self.customBytes options:0
-                                             error:&error] mutableCopy];
-      if (error) {
-        GDTCORLogDebug(@"Error when setting an event's event_code: %@", error);
-        return;
-      }
-      NSNumber *eventCode = bytesDict[GDTCCTEventCodeInfo];
-      if (eventCode != nil) {
-        self.customBytes =
-            [NSJSONSerialization dataWithJSONObject:@{GDTCCTEventCodeInfo : eventCode}
-                                            options:0
-                                              error:&error];
-      }
-    } @catch (NSException *exception) {
-      GDTCORLogDebug(@"Error when setting the event for needs_network_connection_info: %@",
-                     exception);
-    }
-  } else {
-    @try {
-      NSError *error;
-      NSMutableDictionary *bytesDict;
-      if (self.customBytes) {
-        bytesDict = [[NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                     options:0
-                                                       error:&error] mutableCopy];
-        if (error) {
-          GDTCORLogDebug(@"Error when setting an even'ts event_code: %@", error);
-          return;
-        }
-      } else {
-        bytesDict = [[NSMutableDictionary alloc] init];
-      }
-      [bytesDict setObject:@YES forKey:GDTCCTNeedsNetworkConnectionInfo];
-      self.customBytes = [NSJSONSerialization dataWithJSONObject:bytesDict options:0 error:&error];
-    } @catch (NSException *exception) {
-      GDTCORLogDebug(@"Error when setting the event for needs_network_connection_info: %@",
-                     exception);
-    }
-  }
-}
-
-- (BOOL)needsNetworkConnectionInfoPopulated {
-  if (self.customBytes) {
-    @try {
-      NSError *error;
-      NSDictionary *bytesDict = [NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                                options:0
-                                                                  error:&error];
-      return bytesDict && !error && [bytesDict[GDTCCTNeedsNetworkConnectionInfo] boolValue];
-    } @catch (NSException *exception) {
-      GDTCORLogDebug(@"Error when checking the event for needs_network_connection_info: %@",
-                     exception);
-    }
-  }
-  return NO;
-}
-
-- (void)setNetworkConnectionInfoData:(NSData *)networkConnectionInfoData {
-  @try {
-    NSError *error;
-    NSString *dataString = [networkConnectionInfoData base64EncodedStringWithOptions:0];
-    if (dataString != nil) {
-      NSMutableDictionary *bytesDict;
-      if (self.customBytes) {
-        bytesDict = [[NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                     options:0
-                                                       error:&error] mutableCopy];
-        if (error) {
-          GDTCORLogDebug(@"Error when setting an even'ts event_code: %@", error);
-          return;
-        }
-      } else {
-        bytesDict = [[NSMutableDictionary alloc] init];
-      }
-      [bytesDict setObject:dataString forKey:GDTCCTNetworkConnectionInfo];
-      self.customBytes = [NSJSONSerialization dataWithJSONObject:bytesDict options:0 error:&error];
-      if (error) {
-        self.customBytes = nil;
-        GDTCORLogDebug(@"Error when setting an event's network_connection_info: %@", error);
-      }
-    }
-  } @catch (NSException *exception) {
-    GDTCORLogDebug(@"Error when setting an event's network_connection_info: %@", exception);
-  }
-}
-
-- (nullable NSData *)networkConnectionInfoData {
-  if (self.customBytes) {
-    @try {
-      NSError *error;
-      NSDictionary *bytesDict = [NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                                options:0
-                                                                  error:&error];
-      NSString *base64Data = bytesDict[GDTCCTNetworkConnectionInfo];
-      NSData *networkConnectionInfoData = [[NSData alloc] initWithBase64EncodedString:base64Data
-                                                                              options:0];
-      if (error) {
-        GDTCORLogDebug(@"Error when getting an event's network_connection_info: %@", error);
-        return nil;
-      } else {
-        return networkConnectionInfoData;
-      }
-    } @catch (NSException *exception) {
-      GDTCORLogDebug(@"Error when getting an event's network_connection_info: %@", exception);
-    }
-  }
-  return nil;
-}
-
-- (NSNumber *)eventCode {
-  if (self.customBytes) {
-    @try {
-      NSError *error;
-      NSDictionary *bytesDict = [NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                                options:0
-                                                                  error:&error];
-      NSString *eventCodeString = bytesDict[GDTCCTEventCodeInfo];
-
-      if (!eventCodeString) {
-        return nil;
-      }
-
-      NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
-      formatter.numberStyle = NSNumberFormatterDecimalStyle;
-      NSNumber *eventCode = [formatter numberFromString:eventCodeString];
-
-      if (error) {
-        GDTCORLogDebug(@"Error when getting an event's network_connection_info: %@", error);
-        return nil;
-      } else {
-        return eventCode;
-      }
-    } @catch (NSException *exception) {
-      GDTCORLogDebug(@"Error when getting an event's event_code: %@", exception);
-    }
-  }
-  return nil;
-}
-
-- (void)setEventCode:(NSNumber *)eventCode {
-  if (eventCode == nil) {
-    if (!self.customBytes) {
-      return;
-    }
-
-    NSError *error;
-    NSMutableDictionary *bytesDict = [[NSJSONSerialization JSONObjectWithData:self.customBytes
-                                                                      options:0
-                                                                        error:&error] mutableCopy];
-    if (error) {
-      GDTCORLogDebug(@"Error when setting an event's event_code: %@", error);
-      return;
-    }
-
-    [bytesDict removeObjectForKey:GDTCCTEventCodeInfo];
-    self.customBytes = [NSJSONSerialization dataWithJSONObject:bytesDict options:0 error:&error];
-    if (error) {
-      self.customBytes = nil;
-      GDTCORLogDebug(@"Error when setting an event's event_code: %@", error);
-      return;
-    }
-    return;
-  }
-
-  @try {
-    NSMutableDictionary *bytesDict;
-    NSError *error;
-    if (self.customBytes) {
-      bytesDict = [[NSJSONSerialization JSONObjectWithData:self.customBytes options:0
-                                                     error:&error] mutableCopy];
-      if (error) {
-        GDTCORLogDebug(@"Error when setting an event's event_code: %@", error);
-        return;
-      }
-    } else {
-      bytesDict = [[NSMutableDictionary alloc] init];
-    }
-
-    NSString *eventCodeString = [eventCode stringValue];
-    if (eventCodeString == nil) {
-      return;
-    }
-
-    [bytesDict setObject:eventCodeString forKey:GDTCCTEventCodeInfo];
-
-    self.customBytes = [NSJSONSerialization dataWithJSONObject:bytesDict options:0 error:&error];
-    if (error) {
-      self.customBytes = nil;
-      GDTCORLogDebug(@"Error when setting an event's network_connection_info: %@", error);
-      return;
-    }
-
-  } @catch (NSException *exception) {
-    GDTCORLogDebug(@"Error when getting an event's network_connection_info: %@", exception);
-  }
-}
-
-@end

+ 0 - 40
GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h

@@ -1,40 +0,0 @@
-/*
- * 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/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** A class with methods to help with gzipped data. */
-@interface GDTCCTCompressionHelper : NSObject
-
-/** Compresses the given data and returns a new data object.
- *
- * @note Reduced version from GULNSData+zlib.m of GoogleUtilities.
- * @return Compressed data, or nil if there was an error.
- */
-+ (nullable NSData *)gzippedData:(NSData *)data;
-
-/** Returns YES if the data looks like it was gzip compressed by checking for the gzip magic number.
- *
- * @note: From https://en.wikipedia.org/wiki/Gzip, gzip's magic number is 1f 8b.
- * @return YES if the data appears gzipped, NO otherwise.
- */
-+ (BOOL)isGzipped:(NSData *)data;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 128
GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h

@@ -1,128 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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/Foundation.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORReachability.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - General purpose encoders
-
-/** Converts an NSString* to a pb_bytes_array_t*.
- *
- * @note calloc is called in this method. Ensure that pb_release is called on this or the parent.
- *
- * @param string The string to convert.
- * @return A newly allocated array of bytes representing the UTF8 encoding of the string.
- */
-pb_bytes_array_t *GDTCCTEncodeString(NSString *string);
-
-/** Converts an NSData to a pb_bytes_array_t*.
- *
- * @note calloc is called in this method. Ensure that pb_release is called on this or the parent.
- *
- * @param data The data to convert.
- * @return A newly allocated array of bytes with [data bytes] copied into it.
- */
-pb_bytes_array_t *GDTCCTEncodeData(NSData *data);
-
-#pragma mark - CCT object constructors
-
-/** Encodes a batched log request.
- *
- * @note Ensure that pb_release is called on the batchedLogRequest param.
- *
- * @param batchedLogRequest A pointer to the log batch to encode to bytes.
- * @return An NSData object representing the bytes of the log request batch.
- */
-FOUNDATION_EXPORT
-NSData *GDTCCTEncodeBatchedLogRequest(gdt_cct_BatchedLogRequest *batchedLogRequest);
-
-/** Constructs a gdt_cct_BatchedLogRequest given sets of events segemented by mapping ID.
- *
- * @note calloc is called in this method. Ensure that pb_release is called on this or the parent.
- *
- * @param logMappingIDToLogSet A map of mapping IDs to sets of events to convert into a batch.
- * @return A newly created gdt_cct_BatchedLogRequest.
- */
-FOUNDATION_EXPORT
-gdt_cct_BatchedLogRequest GDTCCTConstructBatchedLogRequest(
-    NSDictionary<NSString *, NSSet<GDTCOREvent *> *> *logMappingIDToLogSet);
-
-/** Constructs a log request given a log source and a set of events.
- *
- * @note calloc is called in this method. Ensure that pb_release is called on this or the parent.
- * @param logSource The CCT log source to put into the log request.
- * @param logSet The set of events to send in this log request.
- */
-FOUNDATION_EXPORT
-gdt_cct_LogRequest GDTCCTConstructLogRequest(int32_t logSource, NSSet<GDTCOREvent *> *logSet);
-
-/** Constructs a gdt_cct_LogEvent given a GDTCOREvent*.
- *
- * @param event The GDTCOREvent to convert.
- * @return The new gdt_cct_LogEvent object.
- */
-FOUNDATION_EXPORT
-gdt_cct_LogEvent GDTCCTConstructLogEvent(GDTCOREvent *event);
-
-/** Constructs a gdt_cct_ClientInfo representing the client device.
- *
- * @return The new gdt_cct_ClientInfo object.
- */
-FOUNDATION_EXPORT
-gdt_cct_ClientInfo GDTCCTConstructClientInfo(void);
-
-/** Constructs a gdt_cct_IosClientInfo representing the client device.
- *
- * @return The new gdt_cct_IosClientInfo object.
- */
-FOUNDATION_EXPORT
-gdt_cct_IosClientInfo GDTCCTConstructiOSClientInfo(void);
-
-/** Constructs the data of a gdt_cct_NetworkConnectionInfo representing the client nework connection
- * information.
- *
- * @return The data of a gdt_cct_NetworkConnectionInfo object.
- */
-FOUNDATION_EXPORT
-NSData *GDTCCTConstructNetworkConnectionInfoData(void);
-
-/** Return a gdt_cct_NetworkConnectionInfo_MobileSubtype representing the client
- *
- * @return The gdt_cct_NetworkConnectionInfo_MobileSubtype.
- */
-FOUNDATION_EXPORT
-gdt_cct_NetworkConnectionInfo_MobileSubtype GDTCCTNetworkConnectionInfoNetworkMobileSubtype(void);
-
-#pragma mark - CCT object decoders
-
-/** Decodes a gdt_cct_LogResponse given proto bytes.
- *
- * @note calloc is called in this method. Ensure that pb_release is called on the return value.
- *
- * @param data The proto bytes of the gdt_cct_LogResponse.
- * @param error An error that will be populated if something went wrong during decoding.
- * @return A newly allocated gdt_cct_LogResponse from the data, if the bytes decoded properly.
- */
-FOUNDATION_EXPORT
-gdt_cct_LogResponse GDTCCTDecodeLogResponse(NSData *data, NSError **error);
-
-NS_ASSUME_NONNULL_END

+ 0 - 60
GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTUploader.h

@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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/Foundation.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORUploader.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-#if !NDEBUG
-/** A notification fired when uploading is complete, detailing the number of events uploaded. */
-extern NSNotificationName const GDTCCTUploadCompleteNotification;
-#endif  // #if !NDEBUG
-
-/** Class capable of uploading events to the CCT backend. */
-@interface GDTCCTUploader : NSObject <GDTCORUploader>
-
-/** The queue on which all CCT uploading will occur. */
-@property(nonatomic, readonly) dispatch_queue_t uploaderQueue;
-
-/** The URL session that will attempt upload. */
-@property(nonatomic, readonly) NSURLSession *uploaderSession;
-
-/** The current upload task. */
-@property(nullable, nonatomic, readonly) NSURLSessionUploadTask *currentTask;
-
-/** The next upload time for the CCT target. */
-@property(nullable, nonatomic) GDTCORClock *CCTNextUploadTime;
-
-/** The next upload time for the FLL target. */
-@property(nullable, nonatomic) GDTCORClock *FLLNextUploadTime;
-
-#if !NDEBUG
-/** An upload URL used across all targets. For testing only. */
-@property(class, nullable, nonatomic) NSURL *testServerURL;
-
-#endif  // !NDEBUG
-
-/** Creates and/or returns the singleton instance of this class.
- *
- * @return The singleton instance of this class.
- */
-+ (instancetype)sharedInstance;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 128
GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.c

@@ -1,128 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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.
- */
-
-/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.9.7 */
-
-#include "GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"
-
-/* @@protoc_insertion_point(includes) */
-#if PB_PROTO_HEADER_VERSION != 30
-#error Regenerate this file with the current version of nanopb generator.
-#endif
-
-const gdt_cct_NetworkConnectionInfo_NetworkType gdt_cct_NetworkConnectionInfo_network_type_default = gdt_cct_NetworkConnectionInfo_NetworkType_NONE;
-const gdt_cct_NetworkConnectionInfo_MobileSubtype gdt_cct_NetworkConnectionInfo_mobile_subtype_default = gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE;
-const gdt_cct_QosTierConfiguration_QosTier gdt_cct_LogRequest_qos_tier_default = gdt_cct_QosTierConfiguration_QosTier_DEFAULT;
-const int32_t gdt_cct_QosTierConfiguration_log_source_default = 0;
-
-
-const pb_field_t gdt_cct_LogEvent_fields[7] = {
-    PB_FIELD(  1, INT64   , OPTIONAL, STATIC  , FIRST, gdt_cct_LogEvent, event_time_ms, event_time_ms, 0),
-    PB_FIELD(  6, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_LogEvent, source_extension, event_time_ms, 0),
-    PB_FIELD( 11, INT32   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogEvent, event_code, source_extension, 0),
-    PB_FIELD( 15, SINT64  , OPTIONAL, STATIC  , OTHER, gdt_cct_LogEvent, timezone_offset_seconds, event_code, 0),
-    PB_FIELD( 17, INT64   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogEvent, event_uptime_ms, timezone_offset_seconds, 0),
-    PB_FIELD( 23, MESSAGE , OPTIONAL, STATIC  , OTHER, gdt_cct_LogEvent, network_connection_info, event_uptime_ms, &gdt_cct_NetworkConnectionInfo_fields),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_NetworkConnectionInfo_fields[3] = {
-    PB_FIELD(  1, ENUM    , OPTIONAL, STATIC  , FIRST, gdt_cct_NetworkConnectionInfo, network_type, network_type, &gdt_cct_NetworkConnectionInfo_network_type_default),
-    PB_FIELD(  2, UENUM   , OPTIONAL, STATIC  , OTHER, gdt_cct_NetworkConnectionInfo, mobile_subtype, network_type, &gdt_cct_NetworkConnectionInfo_mobile_subtype_default),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_IosClientInfo_fields[8] = {
-    PB_FIELD(  3, BYTES   , OPTIONAL, POINTER , FIRST, gdt_cct_IosClientInfo, os_major_version, os_major_version, 0),
-    PB_FIELD(  4, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, os_full_version, os_major_version, 0),
-    PB_FIELD(  5, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, application_build, os_full_version, 0),
-    PB_FIELD(  6, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, country, application_build, 0),
-    PB_FIELD(  7, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, model, country, 0),
-    PB_FIELD(  8, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, language_code, model, 0),
-    PB_FIELD( 11, BYTES   , OPTIONAL, POINTER , OTHER, gdt_cct_IosClientInfo, application_bundle_id, language_code, 0),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_ClientInfo_fields[3] = {
-    PB_FIELD(  1, UENUM   , OPTIONAL, STATIC  , FIRST, gdt_cct_ClientInfo, client_type, client_type, 0),
-    PB_FIELD(  4, MESSAGE , OPTIONAL, STATIC  , OTHER, gdt_cct_ClientInfo, ios_client_info, client_type, &gdt_cct_IosClientInfo_fields),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_BatchedLogRequest_fields[2] = {
-    PB_FIELD(  1, MESSAGE , REPEATED, POINTER , FIRST, gdt_cct_BatchedLogRequest, log_request, log_request, &gdt_cct_LogRequest_fields),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_LogRequest_fields[7] = {
-    PB_FIELD(  1, MESSAGE , OPTIONAL, STATIC  , FIRST, gdt_cct_LogRequest, client_info, client_info, &gdt_cct_ClientInfo_fields),
-    PB_FIELD(  2, INT32   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogRequest, log_source, client_info, 0),
-    PB_FIELD(  3, MESSAGE , REPEATED, POINTER , OTHER, gdt_cct_LogRequest, log_event, log_source, &gdt_cct_LogEvent_fields),
-    PB_FIELD(  4, INT64   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogRequest, request_time_ms, log_event, 0),
-    PB_FIELD(  8, INT64   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogRequest, request_uptime_ms, request_time_ms, 0),
-    PB_FIELD(  9, UENUM   , OPTIONAL, STATIC  , OTHER, gdt_cct_LogRequest, qos_tier, request_uptime_ms, &gdt_cct_LogRequest_qos_tier_default),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_QosTierConfiguration_fields[3] = {
-    PB_FIELD(  2, UENUM   , OPTIONAL, STATIC  , FIRST, gdt_cct_QosTierConfiguration, qos_tier, qos_tier, 0),
-    PB_FIELD(  3, INT32   , OPTIONAL, STATIC  , OTHER, gdt_cct_QosTierConfiguration, log_source, qos_tier, &gdt_cct_QosTierConfiguration_log_source_default),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_QosTiersOverride_fields[3] = {
-    PB_FIELD(  1, MESSAGE , REPEATED, POINTER , FIRST, gdt_cct_QosTiersOverride, qos_tier_configuration, qos_tier_configuration, &gdt_cct_QosTierConfiguration_fields),
-    PB_FIELD(  2, INT64   , OPTIONAL, STATIC  , OTHER, gdt_cct_QosTiersOverride, qos_tier_fingerprint, qos_tier_configuration, 0),
-    PB_LAST_FIELD
-};
-
-const pb_field_t gdt_cct_LogResponse_fields[3] = {
-    PB_FIELD(  1, INT64   , OPTIONAL, STATIC  , FIRST, gdt_cct_LogResponse, next_request_wait_millis, next_request_wait_millis, 0),
-    PB_FIELD(  3, MESSAGE , OPTIONAL, STATIC  , OTHER, gdt_cct_LogResponse, qos_tier, next_request_wait_millis, &gdt_cct_QosTiersOverride_fields),
-    PB_LAST_FIELD
-};
-
-
-
-
-
-
-/* Check that field information fits in pb_field_t */
-#if !defined(PB_FIELD_32BIT)
-/* If you get an error here, it means that you need to define PB_FIELD_32BIT
- * compile-time option. You can do that in pb.h or on compiler command line.
- * 
- * The reason you need to do this is that some of your messages contain tag
- * numbers or field sizes that are larger than what can fit in 8 or 16 bit
- * field descriptors.
- */
-PB_STATIC_ASSERT((pb_membersize(gdt_cct_LogEvent, network_connection_info) < 65536 && pb_membersize(gdt_cct_ClientInfo, ios_client_info) < 65536 && pb_membersize(gdt_cct_LogRequest, client_info) < 65536 && pb_membersize(gdt_cct_LogResponse, qos_tier) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_gdt_cct_LogEvent_gdt_cct_NetworkConnectionInfo_gdt_cct_IosClientInfo_gdt_cct_ClientInfo_gdt_cct_BatchedLogRequest_gdt_cct_LogRequest_gdt_cct_QosTierConfiguration_gdt_cct_QosTiersOverride_gdt_cct_LogResponse)
-#endif
-
-#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
-/* If you get an error here, it means that you need to define PB_FIELD_16BIT
- * compile-time option. You can do that in pb.h or on compiler command line.
- * 
- * The reason you need to do this is that some of your messages contain tag
- * numbers or field sizes that are larger than what can fit in the default
- * 8 bit descriptors.
- */
-PB_STATIC_ASSERT((pb_membersize(gdt_cct_LogEvent, network_connection_info) < 256 && pb_membersize(gdt_cct_ClientInfo, ios_client_info) < 256 && pb_membersize(gdt_cct_LogRequest, client_info) < 256 && pb_membersize(gdt_cct_LogResponse, qos_tier) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_gdt_cct_LogEvent_gdt_cct_NetworkConnectionInfo_gdt_cct_IosClientInfo_gdt_cct_ClientInfo_gdt_cct_BatchedLogRequest_gdt_cct_LogRequest_gdt_cct_QosTierConfiguration_gdt_cct_QosTiersOverride_gdt_cct_LogResponse)
-#endif
-
-
-/* @@protoc_insertion_point(eof) */

+ 0 - 281
GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h

@@ -1,281 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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.
- */
-
-/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.9.7 */
-
-#ifndef PB_GDT_CCT_CCT_NANOPB_H_INCLUDED
-#define PB_GDT_CCT_CCT_NANOPB_H_INCLUDED
-#include <nanopb/pb.h>
-
-/* @@protoc_insertion_point(includes) */
-#if PB_PROTO_HEADER_VERSION != 30
-#error Regenerate this file with the current version of nanopb generator.
-#endif
-
-
-/* Enum definitions */
-typedef enum _gdt_cct_NetworkConnectionInfo_NetworkType {
-    gdt_cct_NetworkConnectionInfo_NetworkType_NONE = -1,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE = 0,
-    gdt_cct_NetworkConnectionInfo_NetworkType_WIFI = 1,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_MMS = 2,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_SUPL = 3,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_DUN = 4,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_HIPRI = 5,
-    gdt_cct_NetworkConnectionInfo_NetworkType_WIMAX = 6,
-    gdt_cct_NetworkConnectionInfo_NetworkType_BLUETOOTH = 7,
-    gdt_cct_NetworkConnectionInfo_NetworkType_DUMMY = 8,
-    gdt_cct_NetworkConnectionInfo_NetworkType_ETHERNET = 9,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_FOTA = 10,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_IMS = 11,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_CBS = 12,
-    gdt_cct_NetworkConnectionInfo_NetworkType_WIFI_P2P = 13,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_IA = 14,
-    gdt_cct_NetworkConnectionInfo_NetworkType_MOBILE_EMERGENCY = 15,
-    gdt_cct_NetworkConnectionInfo_NetworkType_PROXY = 16,
-    gdt_cct_NetworkConnectionInfo_NetworkType_VPN = 17
-} gdt_cct_NetworkConnectionInfo_NetworkType;
-#define _gdt_cct_NetworkConnectionInfo_NetworkType_MIN gdt_cct_NetworkConnectionInfo_NetworkType_NONE
-#define _gdt_cct_NetworkConnectionInfo_NetworkType_MAX gdt_cct_NetworkConnectionInfo_NetworkType_VPN
-#define _gdt_cct_NetworkConnectionInfo_NetworkType_ARRAYSIZE ((gdt_cct_NetworkConnectionInfo_NetworkType)(gdt_cct_NetworkConnectionInfo_NetworkType_VPN+1))
-
-typedef enum _gdt_cct_NetworkConnectionInfo_MobileSubtype {
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE = 0,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_GPRS = 1,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_EDGE = 2,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_UMTS = 3,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_CDMA = 4,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_0 = 5,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_A = 6,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_RTT = 7,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_HSDPA = 8,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_HSUPA = 9,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_HSPA = 10,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_IDEN = 11,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_EVDO_B = 12,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_LTE = 13,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_EHRPD = 14,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_HSPAP = 15,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_GSM = 16,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_TD_SCDMA = 17,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_IWLAN = 18,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_LTE_CA = 19,
-    gdt_cct_NetworkConnectionInfo_MobileSubtype_COMBINED = 100
-} gdt_cct_NetworkConnectionInfo_MobileSubtype;
-#define _gdt_cct_NetworkConnectionInfo_MobileSubtype_MIN gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE
-#define _gdt_cct_NetworkConnectionInfo_MobileSubtype_MAX gdt_cct_NetworkConnectionInfo_MobileSubtype_COMBINED
-#define _gdt_cct_NetworkConnectionInfo_MobileSubtype_ARRAYSIZE ((gdt_cct_NetworkConnectionInfo_MobileSubtype)(gdt_cct_NetworkConnectionInfo_MobileSubtype_COMBINED+1))
-
-typedef enum _gdt_cct_ClientInfo_ClientType {
-    gdt_cct_ClientInfo_ClientType_CLIENT_UNKNOWN = 0,
-    gdt_cct_ClientInfo_ClientType_IOS_FIREBASE = 15
-} gdt_cct_ClientInfo_ClientType;
-#define _gdt_cct_ClientInfo_ClientType_MIN gdt_cct_ClientInfo_ClientType_CLIENT_UNKNOWN
-#define _gdt_cct_ClientInfo_ClientType_MAX gdt_cct_ClientInfo_ClientType_IOS_FIREBASE
-#define _gdt_cct_ClientInfo_ClientType_ARRAYSIZE ((gdt_cct_ClientInfo_ClientType)(gdt_cct_ClientInfo_ClientType_IOS_FIREBASE+1))
-
-typedef enum _gdt_cct_QosTierConfiguration_QosTier {
-    gdt_cct_QosTierConfiguration_QosTier_DEFAULT = 0,
-    gdt_cct_QosTierConfiguration_QosTier_UNMETERED_ONLY = 1,
-    gdt_cct_QosTierConfiguration_QosTier_UNMETERED_OR_DAILY = 2,
-    gdt_cct_QosTierConfiguration_QosTier_FAST_IF_RADIO_AWAKE = 3,
-    gdt_cct_QosTierConfiguration_QosTier_NEVER = 4
-} gdt_cct_QosTierConfiguration_QosTier;
-#define _gdt_cct_QosTierConfiguration_QosTier_MIN gdt_cct_QosTierConfiguration_QosTier_DEFAULT
-#define _gdt_cct_QosTierConfiguration_QosTier_MAX gdt_cct_QosTierConfiguration_QosTier_NEVER
-#define _gdt_cct_QosTierConfiguration_QosTier_ARRAYSIZE ((gdt_cct_QosTierConfiguration_QosTier)(gdt_cct_QosTierConfiguration_QosTier_NEVER+1))
-
-/* Struct definitions */
-typedef struct _gdt_cct_BatchedLogRequest {
-    pb_size_t log_request_count;
-    struct _gdt_cct_LogRequest *log_request;
-/* @@protoc_insertion_point(struct:gdt_cct_BatchedLogRequest) */
-} gdt_cct_BatchedLogRequest;
-
-typedef struct _gdt_cct_IosClientInfo {
-    pb_bytes_array_t *os_major_version;
-    pb_bytes_array_t *os_full_version;
-    pb_bytes_array_t *application_build;
-    pb_bytes_array_t *country;
-    pb_bytes_array_t *model;
-    pb_bytes_array_t *language_code;
-    pb_bytes_array_t *application_bundle_id;
-/* @@protoc_insertion_point(struct:gdt_cct_IosClientInfo) */
-} gdt_cct_IosClientInfo;
-
-typedef struct _gdt_cct_ClientInfo {
-    bool has_client_type;
-    gdt_cct_ClientInfo_ClientType client_type;
-    bool has_ios_client_info;
-    gdt_cct_IosClientInfo ios_client_info;
-/* @@protoc_insertion_point(struct:gdt_cct_ClientInfo) */
-} gdt_cct_ClientInfo;
-
-typedef struct _gdt_cct_NetworkConnectionInfo {
-    bool has_network_type;
-    gdt_cct_NetworkConnectionInfo_NetworkType network_type;
-    bool has_mobile_subtype;
-    gdt_cct_NetworkConnectionInfo_MobileSubtype mobile_subtype;
-/* @@protoc_insertion_point(struct:gdt_cct_NetworkConnectionInfo) */
-} gdt_cct_NetworkConnectionInfo;
-
-typedef struct _gdt_cct_QosTierConfiguration {
-    bool has_qos_tier;
-    gdt_cct_QosTierConfiguration_QosTier qos_tier;
-    bool has_log_source;
-    int32_t log_source;
-/* @@protoc_insertion_point(struct:gdt_cct_QosTierConfiguration) */
-} gdt_cct_QosTierConfiguration;
-
-typedef struct _gdt_cct_QosTiersOverride {
-    pb_size_t qos_tier_configuration_count;
-    struct _gdt_cct_QosTierConfiguration *qos_tier_configuration;
-    bool has_qos_tier_fingerprint;
-    int64_t qos_tier_fingerprint;
-/* @@protoc_insertion_point(struct:gdt_cct_QosTiersOverride) */
-} gdt_cct_QosTiersOverride;
-
-typedef struct _gdt_cct_LogEvent {
-    bool has_event_time_ms;
-    int64_t event_time_ms;
-    pb_bytes_array_t *source_extension;
-    bool has_event_code;
-    int32_t event_code;
-    bool has_timezone_offset_seconds;
-    int64_t timezone_offset_seconds;
-    bool has_event_uptime_ms;
-    int64_t event_uptime_ms;
-    bool has_network_connection_info;
-    gdt_cct_NetworkConnectionInfo network_connection_info;
-/* @@protoc_insertion_point(struct:gdt_cct_LogEvent) */
-} gdt_cct_LogEvent;
-
-typedef struct _gdt_cct_LogRequest {
-    bool has_client_info;
-    gdt_cct_ClientInfo client_info;
-    bool has_log_source;
-    int32_t log_source;
-    pb_size_t log_event_count;
-    struct _gdt_cct_LogEvent *log_event;
-    bool has_request_time_ms;
-    int64_t request_time_ms;
-    bool has_request_uptime_ms;
-    int64_t request_uptime_ms;
-    bool has_qos_tier;
-    gdt_cct_QosTierConfiguration_QosTier qos_tier;
-/* @@protoc_insertion_point(struct:gdt_cct_LogRequest) */
-} gdt_cct_LogRequest;
-
-typedef struct _gdt_cct_LogResponse {
-    bool has_next_request_wait_millis;
-    int64_t next_request_wait_millis;
-    bool has_qos_tier;
-    gdt_cct_QosTiersOverride qos_tier;
-/* @@protoc_insertion_point(struct:gdt_cct_LogResponse) */
-} gdt_cct_LogResponse;
-
-/* Default values for struct fields */
-extern const gdt_cct_NetworkConnectionInfo_NetworkType gdt_cct_NetworkConnectionInfo_network_type_default;
-extern const gdt_cct_NetworkConnectionInfo_MobileSubtype gdt_cct_NetworkConnectionInfo_mobile_subtype_default;
-extern const gdt_cct_QosTierConfiguration_QosTier gdt_cct_LogRequest_qos_tier_default;
-extern const int32_t gdt_cct_QosTierConfiguration_log_source_default;
-
-/* Initializer values for message structs */
-#define gdt_cct_LogEvent_init_default            {false, 0, NULL, false, 0, false, 0, false, 0, false, gdt_cct_NetworkConnectionInfo_init_default}
-#define gdt_cct_NetworkConnectionInfo_init_default {false, gdt_cct_NetworkConnectionInfo_NetworkType_NONE, false, gdt_cct_NetworkConnectionInfo_MobileSubtype_UNKNOWN_MOBILE_SUBTYPE}
-#define gdt_cct_IosClientInfo_init_default       {NULL, NULL, NULL, NULL, NULL, NULL, NULL}
-#define gdt_cct_ClientInfo_init_default          {false, _gdt_cct_ClientInfo_ClientType_MIN, false, gdt_cct_IosClientInfo_init_default}
-#define gdt_cct_BatchedLogRequest_init_default   {0, NULL}
-#define gdt_cct_LogRequest_init_default          {false, gdt_cct_ClientInfo_init_default, false, 0, 0, NULL, false, 0, false, 0, false, gdt_cct_QosTierConfiguration_QosTier_DEFAULT}
-#define gdt_cct_QosTierConfiguration_init_default {false, _gdt_cct_QosTierConfiguration_QosTier_MIN, false, 0}
-#define gdt_cct_QosTiersOverride_init_default    {0, NULL, false, 0}
-#define gdt_cct_LogResponse_init_default         {false, 0, false, gdt_cct_QosTiersOverride_init_default}
-#define gdt_cct_LogEvent_init_zero               {false, 0, NULL, false, 0, false, 0, false, 0, false, gdt_cct_NetworkConnectionInfo_init_zero}
-#define gdt_cct_NetworkConnectionInfo_init_zero  {false, _gdt_cct_NetworkConnectionInfo_NetworkType_MIN, false, _gdt_cct_NetworkConnectionInfo_MobileSubtype_MIN}
-#define gdt_cct_IosClientInfo_init_zero          {NULL, NULL, NULL, NULL, NULL, NULL, NULL}
-#define gdt_cct_ClientInfo_init_zero             {false, _gdt_cct_ClientInfo_ClientType_MIN, false, gdt_cct_IosClientInfo_init_zero}
-#define gdt_cct_BatchedLogRequest_init_zero      {0, NULL}
-#define gdt_cct_LogRequest_init_zero             {false, gdt_cct_ClientInfo_init_zero, false, 0, 0, NULL, false, 0, false, 0, false, _gdt_cct_QosTierConfiguration_QosTier_MIN}
-#define gdt_cct_QosTierConfiguration_init_zero   {false, _gdt_cct_QosTierConfiguration_QosTier_MIN, false, 0}
-#define gdt_cct_QosTiersOverride_init_zero       {0, NULL, false, 0}
-#define gdt_cct_LogResponse_init_zero            {false, 0, false, gdt_cct_QosTiersOverride_init_zero}
-
-/* Field tags (for use in manual encoding/decoding) */
-#define gdt_cct_BatchedLogRequest_log_request_tag 1
-#define gdt_cct_IosClientInfo_os_major_version_tag 3
-#define gdt_cct_IosClientInfo_os_full_version_tag 4
-#define gdt_cct_IosClientInfo_application_build_tag 5
-#define gdt_cct_IosClientInfo_country_tag        6
-#define gdt_cct_IosClientInfo_model_tag          7
-#define gdt_cct_IosClientInfo_language_code_tag  8
-#define gdt_cct_IosClientInfo_application_bundle_id_tag 11
-#define gdt_cct_ClientInfo_client_type_tag       1
-#define gdt_cct_ClientInfo_ios_client_info_tag   4
-#define gdt_cct_NetworkConnectionInfo_network_type_tag 1
-#define gdt_cct_NetworkConnectionInfo_mobile_subtype_tag 2
-#define gdt_cct_QosTierConfiguration_qos_tier_tag 2
-#define gdt_cct_QosTierConfiguration_log_source_tag 3
-#define gdt_cct_QosTiersOverride_qos_tier_configuration_tag 1
-#define gdt_cct_QosTiersOverride_qos_tier_fingerprint_tag 2
-#define gdt_cct_LogEvent_event_time_ms_tag       1
-#define gdt_cct_LogEvent_event_code_tag          11
-#define gdt_cct_LogEvent_event_uptime_ms_tag     17
-#define gdt_cct_LogEvent_source_extension_tag    6
-#define gdt_cct_LogEvent_timezone_offset_seconds_tag 15
-#define gdt_cct_LogEvent_network_connection_info_tag 23
-#define gdt_cct_LogRequest_request_time_ms_tag   4
-#define gdt_cct_LogRequest_request_uptime_ms_tag 8
-#define gdt_cct_LogRequest_client_info_tag       1
-#define gdt_cct_LogRequest_log_source_tag        2
-#define gdt_cct_LogRequest_log_event_tag         3
-#define gdt_cct_LogRequest_qos_tier_tag          9
-#define gdt_cct_LogResponse_next_request_wait_millis_tag 1
-#define gdt_cct_LogResponse_qos_tier_tag         3
-
-/* Struct field encoding specification for nanopb */
-extern const pb_field_t gdt_cct_LogEvent_fields[7];
-extern const pb_field_t gdt_cct_NetworkConnectionInfo_fields[3];
-extern const pb_field_t gdt_cct_IosClientInfo_fields[8];
-extern const pb_field_t gdt_cct_ClientInfo_fields[3];
-extern const pb_field_t gdt_cct_BatchedLogRequest_fields[2];
-extern const pb_field_t gdt_cct_LogRequest_fields[7];
-extern const pb_field_t gdt_cct_QosTierConfiguration_fields[3];
-extern const pb_field_t gdt_cct_QosTiersOverride_fields[3];
-extern const pb_field_t gdt_cct_LogResponse_fields[3];
-
-/* Maximum encoded size of messages (where known) */
-/* gdt_cct_LogEvent_size depends on runtime parameters */
-#define gdt_cct_NetworkConnectionInfo_size       13
-/* gdt_cct_IosClientInfo_size depends on runtime parameters */
-/* gdt_cct_ClientInfo_size depends on runtime parameters */
-/* gdt_cct_BatchedLogRequest_size depends on runtime parameters */
-/* gdt_cct_LogRequest_size depends on runtime parameters */
-#define gdt_cct_QosTierConfiguration_size        13
-/* gdt_cct_QosTiersOverride_size depends on runtime parameters */
-/* gdt_cct_LogResponse_size depends on runtime parameters */
-
-/* Message IDs (where set with "msgid" option) */
-#ifdef PB_MSGID
-
-#define CCT_MESSAGES \
-
-
-#endif
-
-/* @@protoc_insertion_point(eof) */
-
-#endif

+ 0 - 51
GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h

@@ -1,51 +0,0 @@
-/*
- * 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 "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** A string sets in customBytes as a key paired to @YES if current event needs to
- * populate network connection info data, @NO otherwise.
- */
-FOUNDATION_EXPORT NSString *const GDTCCTNeedsNetworkConnectionInfo;
-
-/** A string sets in customBytes as a key paired to the network connection info data
- * of current event.
- */
-FOUNDATION_EXPORT NSString *const GDTCCTNetworkConnectionInfo;
-
-/** A category that uses the customBytes property of a GDTCOREvent to store network connection info.
- */
-@interface GDTCOREvent (GDTCCTSupport)
-
-/** If YES, needs the network connection info field set during prioritization.
- * @note Uses the GDTCOREvent customBytes property.
- */
-@property(nonatomic) BOOL needsNetworkConnectionInfoPopulated;
-
-/** The network connection info as collected at the time of the event.
- * @note Uses the GDTCOREvent customBytes property.
- */
-@property(nullable, nonatomic) NSData *networkConnectionInfoData;
-
-/** Code that identifies the event to be sent to the CCT backend.
- */
-@property(nullable, nonatomic) NSNumber *eventCode;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 151
GoogleDataTransport/GDTCCTTestApp/app.swift

@@ -1,151 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 GoogleDataTransport
-
-// iOS and tvOS specifics.
-#if os(iOS) || os(tvOS)
-  import UIKit
-
-  @UIApplicationMain
-  class AppDelegate: UIResponder, UIApplicationDelegate {
-    var window: UIWindow?
-
-    func application(_ application: UIApplication,
-                     didFinishLaunchingWithOptions launchOptions: [UIApplication
-                       .LaunchOptionsKey: Any]?) -> Bool {
-      return true
-    }
-  }
-
-  public class ViewController: UIViewController {
-    let cctTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.CCT)!
-    let fllTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.FLL)!
-    let cshTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.CSH)!
-
-    @IBOutlet var backendSwitch: UISegmentedControl?
-
-    var transport: GDTCORTransport {
-      var theTransport: GDTCORTransport = fllTransport
-
-      if !Thread.current.isMainThread {
-        DispatchQueue.main.sync {
-          if Globals.IsMonkeyTesting {
-            backendSwitch?.selectedSegmentIndex = Int(arc4random_uniform(3))
-          }
-          switch backendSwitch?.selectedSegmentIndex {
-          case 0:
-            theTransport = cctTransport
-
-          case 1:
-            theTransport = fllTransport
-
-          case 2:
-            theTransport = cshTransport
-
-          default:
-            theTransport = cctTransport
-          }
-        }
-      } else {
-        if Globals.IsMonkeyTesting {
-          backendSwitch?.selectedSegmentIndex = Int(arc4random_uniform(3))
-        }
-
-        switch backendSwitch?.selectedSegmentIndex {
-        case 0:
-          theTransport = cctTransport
-
-        case 1:
-          theTransport = fllTransport
-
-        case 2:
-          theTransport = cshTransport
-
-        default:
-          theTransport = cctTransport
-        }
-      }
-      return theTransport
-    }
-  }
-
-// macOS specifics.
-#elseif os(macOS)
-  import Cocoa
-
-  @NSApplicationMain class Main: NSObject, NSApplicationDelegate {
-    var windowController: NSWindowController!
-
-    func applicationDidFinishLaunching(aNotification: NSNotification) {}
-  }
-
-  public class ViewController: NSViewController {
-    let cctTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.CCT)!
-    let fllTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.FLL)!
-    let cshTransport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                        target: GDTCORTarget.CSH)!
-
-    @IBOutlet var backendSwitch: NSSegmentedControl?
-
-    var transport: GDTCORTransport {
-      var theTransport: GDTCORTransport = fllTransport
-      if !Thread.current.isMainThread {
-        DispatchQueue.main.sync {
-          if Globals.IsMonkeyTesting {
-            backendSwitch?.selectedSegment = Int(arc4random_uniform(3))
-          }
-          switch backendSwitch?.selectedSegment {
-          case 0:
-            theTransport = cctTransport
-
-          case 1:
-            theTransport = fllTransport
-
-          case 2:
-            theTransport = cshTransport
-
-          default:
-            theTransport = cctTransport
-          }
-        }
-      } else {
-        if Globals.IsMonkeyTesting {
-          backendSwitch?.selectedSegment = Int(arc4random_uniform(3))
-        }
-        switch backendSwitch?.selectedSegment {
-        case 0:
-          theTransport = cctTransport
-
-        case 1:
-          theTransport = fllTransport
-
-        case 2:
-          theTransport = cshTransport
-
-        default:
-          theTransport = cctTransport
-        }
-      }
-      return theTransport
-    }
-  }
-#endif

+ 0 - 31
GoogleDataTransport/GDTCCTTestApp/gdthelpers.swift

@@ -1,31 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 GoogleDataTransport
-
-class FirelogTestMessageHolder: NSObject, GDTCOREventDataObject {
-  public var root: FirelogTestMessage = FirelogTestMessage()
-
-  func transportBytes() -> Data {
-    do {
-      let data: Data? = try root.serializedData()
-      return data!
-    } catch {
-      print("There was an error producing proto bytes.")
-      return Data()
-    }
-  }
-}

+ 0 - 27
GoogleDataTransport/GDTCCTTestApp/globals.swift

@@ -1,27 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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
-
-public struct Globals {
-  public static var SharedViewController: ViewController?
-
-  public static var IsMonkeyTesting: Bool = false
-
-  public static let MonkeyTestLength: TimeInterval = 60.0
-
-  public static let MonkeyTestLengthPlusBuffer: TimeInterval = MonkeyTestLength + 10.0
-}

+ 0 - 136
GoogleDataTransport/GDTCCTTestApp/ios/Main.storyboard

@@ -1,136 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
-    <device id="retina5_5" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--View Controller-->
-        <scene sceneID="tne-QT-ifu">
-            <objects>
-                <viewController storyboardIdentifier="MainViewController" id="BYZ-38-t0r" customClass="ViewController" customModule="GoogleDataTransportCCTSupport_iOS_TestApp" customModuleProvider="target" sceneMemberID="viewController">
-                    <layoutGuides>
-                        <viewControllerLayoutGuide type="top" id="g2S-RU-pP8"/>
-                        <viewControllerLayoutGuide type="bottom" id="adO-yW-BBx"/>
-                    </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GoogleDataTransport Test App" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L83-mC-jNW">
-                                <rect key="frame" x="20" y="8" width="236" height="21"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="9fC-1b-Rvu">
-                                <rect key="frame" x="20" y="37" width="140" height="32"/>
-                                <color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                                <segments>
-                                    <segment title="CCT"/>
-                                    <segment title="FLL"/>
-                                    <segment title="CSH"/>
-                                </segments>
-                            </segmentedControl>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="674-uo-mtw">
-                                <rect key="frame" x="20" y="76" width="369" height="55"/>
-                                <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="55" id="S2Z-8q-89v"/>
-                                </constraints>
-                                <state key="normal" title="Generate data event">
-                                    <color key="titleShadowColor" cocoaTouchSystemColor="darkTextColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="generateDataEventWithSender:" destination="BYZ-38-t0r" eventType="touchUpInside" id="iph-QW-BXy"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FD9-Mn-in7">
-                                <rect key="frame" x="20" y="139" width="369" height="55"/>
-                                <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="55" id="mYc-rL-3cW"/>
-                                </constraints>
-                                <state key="normal" title="Generate telemetry event">
-                                    <color key="titleShadowColor" cocoaTouchSystemColor="darkTextColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="generateTelemetryEventWithSender:" destination="BYZ-38-t0r" eventType="touchUpInside" id="rcX-UQ-Br6"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IFu-Rf-wNA">
-                                <rect key="frame" x="20" y="202" width="369" height="55"/>
-                                <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="55" id="Xp1-a8-nh0"/>
-                                </constraints>
-                                <state key="normal" title="Generate high priority event (force uploads)">
-                                    <color key="titleShadowColor" cocoaTouchSystemColor="darkTextColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="generateHighPriorityEventWithSender:" destination="BYZ-38-t0r" eventType="touchUpInside" id="yWd-rX-cMS"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yTs-B1-Yoh">
-                                <rect key="frame" x="20" y="265" width="369" height="55"/>
-                                <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="55" id="jJR-dP-ezp"/>
-                                </constraints>
-                                <state key="normal" title="Generate wifi only event">
-                                    <color key="titleShadowColor" cocoaTouchSystemColor="darkTextColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="generateWifiOnlyEventWithSender:" destination="BYZ-38-t0r" eventType="touchUpInside" id="wo7-Wu-4YZ"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QpN-cI-JZa">
-                                <rect key="frame" x="20" y="328" width="369" height="55"/>
-                                <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="55" id="LEk-X2-0qf"/>
-                                    <constraint firstAttribute="height" constant="55" id="qg8-hL-w44"/>
-                                </constraints>
-                                <state key="normal" title="Generate daily event">
-                                    <color key="titleShadowColor" cocoaTouchSystemColor="darkTextColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="generateDailyEventWithSender:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Rfm-OO-P8A"/>
-                                </connections>
-                            </button>
-                        </subviews>
-                        <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
-                        <constraints>
-                            <constraint firstItem="674-uo-mtw" firstAttribute="leading" secondItem="FD9-Mn-in7" secondAttribute="leading" id="2MG-RM-cIL"/>
-                            <constraint firstItem="yTs-B1-Yoh" firstAttribute="leading" secondItem="QpN-cI-JZa" secondAttribute="leading" id="3AV-qq-ttG"/>
-                            <constraint firstItem="9fC-1b-Rvu" firstAttribute="leading" secondItem="L83-mC-jNW" secondAttribute="trailing" constant="-236" id="F3k-xF-AZv"/>
-                            <constraint firstItem="IFu-Rf-wNA" firstAttribute="leading" secondItem="yTs-B1-Yoh" secondAttribute="leading" id="J3A-D1-3Wc"/>
-                            <constraint firstItem="QpN-cI-JZa" firstAttribute="top" secondItem="yTs-B1-Yoh" secondAttribute="bottom" constant="8" symbolic="YES" id="JwZ-sw-3Fd"/>
-                            <constraint firstItem="674-uo-mtw" firstAttribute="trailing" secondItem="FD9-Mn-in7" secondAttribute="trailing" id="K5w-h4-9CX"/>
-                            <constraint firstItem="IFu-Rf-wNA" firstAttribute="trailing" secondItem="yTs-B1-Yoh" secondAttribute="trailing" id="T4O-m6-Say"/>
-                            <constraint firstItem="IFu-Rf-wNA" firstAttribute="top" secondItem="FD9-Mn-in7" secondAttribute="bottom" constant="8" symbolic="YES" id="VKg-qT-YB0"/>
-                            <constraint firstItem="yTs-B1-Yoh" firstAttribute="trailing" secondItem="QpN-cI-JZa" secondAttribute="trailing" id="Xhn-ed-QPx"/>
-                            <constraint firstItem="FD9-Mn-in7" firstAttribute="trailing" secondItem="IFu-Rf-wNA" secondAttribute="trailing" id="Zdy-HC-lCF"/>
-                            <constraint firstItem="FD9-Mn-in7" firstAttribute="leading" secondItem="IFu-Rf-wNA" secondAttribute="leading" id="c4U-a7-6n1"/>
-                            <constraint firstItem="L83-mC-jNW" firstAttribute="leading" secondItem="674-uo-mtw" secondAttribute="leading" id="lAj-7i-j6v"/>
-                            <constraint firstItem="L83-mC-jNW" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="nvB-a3-zME"/>
-                            <constraint firstItem="L83-mC-jNW" firstAttribute="top" secondItem="g2S-RU-pP8" secondAttribute="bottom" constant="8" symbolic="YES" id="oIo-Sf-jM7"/>
-                            <constraint firstItem="FD9-Mn-in7" firstAttribute="top" secondItem="674-uo-mtw" secondAttribute="bottom" constant="8" symbolic="YES" id="oVp-fp-45A"/>
-                            <constraint firstItem="yTs-B1-Yoh" firstAttribute="top" secondItem="IFu-Rf-wNA" secondAttribute="bottom" constant="8" symbolic="YES" id="pOu-Fj-7jV"/>
-                            <constraint firstItem="674-uo-mtw" firstAttribute="top" secondItem="9fC-1b-Rvu" secondAttribute="bottom" constant="8" symbolic="YES" id="sw7-fX-DwC"/>
-                            <constraint firstAttribute="trailingMargin" secondItem="674-uo-mtw" secondAttribute="trailing" constant="5" id="ySl-NP-P12"/>
-                            <constraint firstItem="L83-mC-jNW" firstAttribute="centerY" secondItem="9fC-1b-Rvu" secondAttribute="centerY" constant="-34" id="yh9-Qb-nF3"/>
-                        </constraints>
-                    </view>
-                    <connections>
-                        <outlet property="backendSwitch" destination="9fC-1b-Rvu" id="cI6-Gy-NlV"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="134.78260869565219" y="135.32608695652175"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 820
GoogleDataTransport/GDTCCTTestApp/macos/Main.storyboard

@@ -1,820 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15702"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--Application-->
-        <scene sceneID="JPo-4y-FX3">
-            <objects>
-                <application id="hnw-xV-0zn" sceneMemberID="viewController">
-                    <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
-                        <items>
-                            <menuItem title="deleteme" id="1Xt-HY-uBw">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="deleteme" systemMenu="apple" id="uQy-DD-JDr">
-                                    <items>
-                                        <menuItem title="About deleteme" id="5kV-Vb-QxS">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
-                                        <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
-                                        <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
-                                        <menuItem title="Services" id="NMo-om-nkz">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
-                                        <menuItem title="Hide deleteme" keyEquivalent="h" id="Olw-nP-bQN">
-                                            <connections>
-                                                <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Show All" id="Kd2-mp-pUS">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
-                                        <menuItem title="Quit deleteme" keyEquivalent="q" id="4sb-4s-VLi">
-                                            <connections>
-                                                <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="File" id="dMs-cI-mzQ">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="File" id="bib-Uj-vzu">
-                                    <items>
-                                        <menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
-                                            <connections>
-                                                <action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
-                                            <connections>
-                                                <action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Open Recent" id="tXI-mr-wws">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
-                                                <items>
-                                                    <menuItem title="Clear Menu" id="vNY-rz-j42">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
-                                        <menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
-                                            <connections>
-                                                <action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
-                                            <connections>
-                                                <action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
-                                            <connections>
-                                                <action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
-                                            <connections>
-                                                <action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
-                                        <menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
-                                            <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
-                                            <connections>
-                                                <action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Edit" id="5QF-Oa-p0T">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Edit" id="W48-6f-4Dl">
-                                    <items>
-                                        <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
-                                            <connections>
-                                                <action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
-                                            <connections>
-                                                <action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
-                                        <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
-                                            <connections>
-                                                <action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
-                                            <connections>
-                                                <action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
-                                            <connections>
-                                                <action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Delete" id="pa3-QI-u2k">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
-                                            <connections>
-                                                <action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
-                                        <menuItem title="Find" id="4EN-yA-p0u">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Find" id="1b7-l0-nxx">
-                                                <items>
-                                                    <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
-                                                        <connections>
-                                                            <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
-                                                        <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                                        <connections>
-                                                            <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
-                                                        <connections>
-                                                            <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
-                                                        <connections>
-                                                            <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
-                                                        <connections>
-                                                            <action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
-                                                        <connections>
-                                                            <action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
-                                                <items>
-                                                    <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
-                                                        <connections>
-                                                            <action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
-                                                        <connections>
-                                                            <action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
-                                                    <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Substitutions" id="9ic-FL-obx">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
-                                                <items>
-                                                    <menuItem title="Show Substitutions" id="z6F-FW-3nz">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
-                                                    <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Smart Quotes" id="hQb-2v-fYv">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Smart Dashes" id="rgM-f4-ycn">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Smart Links" id="cwL-P1-jid">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Data Detectors" id="tRr-pd-1PS">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Text Replacement" id="HFQ-gK-NFA">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Transformations" id="2oI-Rn-ZJC">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
-                                                <items>
-                                                    <menuItem title="Make Upper Case" id="vmV-6d-7jI">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Make Lower Case" id="d9M-CD-aMd">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Capitalize" id="UEZ-Bs-lqG">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Speech" id="xrE-MZ-jX0">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
-                                                <items>
-                                                    <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Format" id="jxT-CU-nIS">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Format" id="GEO-Iw-cKr">
-                                    <items>
-                                        <menuItem title="Font" id="Gi5-1S-RQB">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
-                                                <items>
-                                                    <menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
-                                                        <connections>
-                                                            <action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
-                                                        <connections>
-                                                            <action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
-                                                        <connections>
-                                                            <action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
-                                                        <connections>
-                                                            <action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
-                                                    <menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
-                                                        <connections>
-                                                            <action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
-                                                        <connections>
-                                                            <action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
-                                                    <menuItem title="Kern" id="jBQ-r6-VK2">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <menu key="submenu" title="Kern" id="tlD-Oa-oAM">
-                                                            <items>
-                                                                <menuItem title="Use Default" id="GUa-eO-cwY">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Use None" id="cDB-IK-hbR">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Tighten" id="46P-cB-AYj">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Loosen" id="ogc-rX-tC1">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                            </items>
-                                                        </menu>
-                                                    </menuItem>
-                                                    <menuItem title="Ligatures" id="o6e-r0-MWq">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
-                                                            <items>
-                                                                <menuItem title="Use Default" id="agt-UL-0e3">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Use None" id="J7y-lM-qPV">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Use All" id="xQD-1f-W4t">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                            </items>
-                                                        </menu>
-                                                    </menuItem>
-                                                    <menuItem title="Baseline" id="OaQ-X3-Vso">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <menu key="submenu" title="Baseline" id="ijk-EB-dga">
-                                                            <items>
-                                                                <menuItem title="Use Default" id="3Om-Ey-2VK">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Superscript" id="Rqc-34-cIF">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Subscript" id="I0S-gh-46l">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Raise" id="2h7-ER-AoG">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem title="Lower" id="1tx-W0-xDw">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                            </items>
-                                                        </menu>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
-                                                    <menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
-                                                        <connections>
-                                                            <action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
-                                                    <menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
-                                                        <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                                        <connections>
-                                                            <action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
-                                                        <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                                        <connections>
-                                                            <action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Text" id="Fal-I4-PZk">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Text" id="d9c-me-L2H">
-                                                <items>
-                                                    <menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
-                                                        <connections>
-                                                            <action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
-                                                        <connections>
-                                                            <action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Justify" id="J5U-5w-g23">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
-                                                        <connections>
-                                                            <action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
-                                                    <menuItem title="Writing Direction" id="H1b-Si-o9J">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
-                                                            <items>
-                                                                <menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                </menuItem>
-                                                                <menuItem id="YGs-j5-SAR">
-                                                                    <string key="title">	Default</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem id="Lbh-J2-qVU">
-                                                                    <string key="title">	Left to Right</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem id="jFq-tB-4Kx">
-                                                                    <string key="title">	Right to Left</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
-                                                                <menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                </menuItem>
-                                                                <menuItem id="Nop-cj-93Q">
-                                                                    <string key="title">	Default</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem id="BgM-ve-c93">
-                                                                    <string key="title">	Left to Right</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                                <menuItem id="RB4-Sm-HuC">
-                                                                    <string key="title">	Right to Left</string>
-                                                                    <modifierMask key="keyEquivalentModifierMask"/>
-                                                                    <connections>
-                                                                        <action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
-                                                                    </connections>
-                                                                </menuItem>
-                                                            </items>
-                                                        </menu>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
-                                                    <menuItem title="Show Ruler" id="vLm-3I-IUL">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
-                                                        <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                                        <connections>
-                                                            <action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
-                                                        <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                                        <connections>
-                                                            <action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="View" id="H8h-7b-M4v">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="View" id="HyV-fh-RgO">
-                                    <items>
-                                        <menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
-                                        <menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Window" id="aUF-d1-5bR">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
-                                    <items>
-                                        <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
-                                            <connections>
-                                                <action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Zoom" id="R4o-n2-Eq4">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
-                                        <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Help" id="wpr-3q-Mcd">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
-                                    <items>
-                                        <menuItem title="deleteme Help" keyEquivalent="?" id="FKE-Sm-Kum">
-                                            <connections>
-                                                <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                        </items>
-                    </menu>
-                    <connections>
-                        <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
-                    </connections>
-                </application>
-                <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="GoogleDataTransportCCTSupport_macOS_TestApp" customModuleProvider="target"/>
-                <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
-                <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="75" y="0.0"/>
-        </scene>
-        <!--Window Controller-->
-        <scene sceneID="R2V-B0-nI4">
-            <objects>
-                <windowController id="B8D-0N-5wS" sceneMemberID="viewController">
-                    <window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
-                        <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
-                        <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-                        <rect key="contentRect" x="196" y="240" width="480" height="270"/>
-                        <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
-                        <value key="minSize" type="size" width="480" height="270"/>
-                        <value key="maxSize" type="size" width="480" height="270"/>
-                        <connections>
-                            <outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
-                        </connections>
-                    </window>
-                    <connections>
-                        <segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
-                    </connections>
-                </windowController>
-                <customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="75" y="250"/>
-        </scene>
-        <!--View Controller-->
-        <scene sceneID="hIz-AP-VOD">
-            <objects>
-                <viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="GoogleDataTransportCCTSupport_macOS_TestApp" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" id="m2S-Jp-Qdl">
-                        <rect key="frame" x="0.0" y="0.0" width="480" height="218"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                        <subviews>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CDv-jq-Itb">
-                                <rect key="frame" x="18" y="183" width="238" height="15"/>
-                                <textFieldCell key="cell" lineBreakMode="clipping" title="GoogleDataTransport macOS Test App" id="Hu8-K4-MQw">
-                                    <font key="font" usesAppearanceFont="YES"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aiw-VS-cNk">
-                                <rect key="frame" x="14" y="147" width="452" height="32"/>
-                                <buttonCell key="cell" type="push" title="Generate Data Event" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="F9H-fz-yUb">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="generateDataEventWithSender:" target="XfG-lQ-9wD" id="GiU-Fx-U6I"/>
-                                </connections>
-                            </button>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2ft-D0-CMq">
-                                <rect key="frame" x="14" y="114" width="452" height="32"/>
-                                <buttonCell key="cell" type="push" title="Generate Telemetry Event" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="oOQ-oZ-XbU">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="generateTelemetryEventWithSender:" target="XfG-lQ-9wD" id="xXE-fF-K2U"/>
-                                </connections>
-                            </button>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aSo-QZ-e6X">
-                                <rect key="frame" x="14" y="81" width="452" height="32"/>
-                                <buttonCell key="cell" type="push" title="Generate High Priority Event" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="huI-gQ-MWJ">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="generateHighPriorityEventWithSender:" target="XfG-lQ-9wD" id="0nI-ih-z4T"/>
-                                </connections>
-                            </button>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IlF-o2-Jac">
-                                <rect key="frame" x="14" y="48" width="452" height="32"/>
-                                <buttonCell key="cell" type="push" title="Generate Wifi Only Event" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fP1-dl-OVW">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="generateWifiOnlyEventWithSender:" target="XfG-lQ-9wD" id="14I-XS-q5k"/>
-                                </connections>
-                            </button>
-                            <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uh8-3g-UwR">
-                                <rect key="frame" x="14" y="15" width="452" height="32"/>
-                                <buttonCell key="cell" type="push" title="Generate Daily Event" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="56D-3G-JeK">
-                                    <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                    <font key="font" metaFont="system"/>
-                                </buttonCell>
-                                <connections>
-                                    <action selector="generateDailyEventWithSender:" target="XfG-lQ-9wD" id="nLB-7y-yWa"/>
-                                </connections>
-                            </button>
-                            <segmentedControl verticalHuggingPriority="750" springLoaded="YES" translatesAutoresizingMaskIntoConstraints="NO" id="k6I-AV-bFw">
-                                <rect key="frame" x="317" y="177" width="145" height="24"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="21" id="Rhk-Q2-W55"/>
-                                </constraints>
-                                <segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="GAi-6B-km3">
-                                    <font key="font" metaFont="system"/>
-                                    <segments>
-                                        <segment label="CCT" selected="YES"/>
-                                        <segment label="FLL" tag="1"/>
-                                        <segment label="CSH"/>
-                                    </segments>
-                                </segmentedCell>
-                            </segmentedControl>
-                        </subviews>
-                        <constraints>
-                            <constraint firstItem="aiw-VS-cNk" firstAttribute="top" secondItem="k6I-AV-bFw" secondAttribute="bottom" constant="4" id="4bB-Fp-all"/>
-                            <constraint firstItem="2ft-D0-CMq" firstAttribute="top" secondItem="aiw-VS-cNk" secondAttribute="bottom" constant="12" symbolic="YES" id="5of-K7-QY4"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="20" symbolic="YES" id="IzD-5w-Bq1"/>
-                            <constraint firstItem="2ft-D0-CMq" firstAttribute="trailing" secondItem="IlF-o2-Jac" secondAttribute="trailing" id="MZ4-Vp-Bk3"/>
-                            <constraint firstItem="2ft-D0-CMq" firstAttribute="trailing" secondItem="Uh8-3g-UwR" secondAttribute="trailing" id="N94-GB-w24"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="aiw-VS-cNk" secondAttribute="leading" id="OBj-sJ-eFn"/>
-                            <constraint firstItem="IlF-o2-Jac" firstAttribute="top" secondItem="aSo-QZ-e6X" secondAttribute="bottom" constant="12" symbolic="YES" id="PK3-yK-9bq"/>
-                            <constraint firstItem="k6I-AV-bFw" firstAttribute="centerY" secondItem="CDv-jq-Itb" secondAttribute="centerY" constant="1" id="VcQ-7S-yQB"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="2ft-D0-CMq" secondAttribute="leading" id="WS1-Ar-msV"/>
-                            <constraint firstAttribute="trailing" secondItem="2ft-D0-CMq" secondAttribute="trailing" constant="20" symbolic="YES" id="X3u-Lt-dG9"/>
-                            <constraint firstItem="2ft-D0-CMq" firstAttribute="trailing" secondItem="aiw-VS-cNk" secondAttribute="trailing" id="bWR-0E-3HY"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="IlF-o2-Jac" secondAttribute="leading" id="cJl-th-geX"/>
-                            <constraint firstItem="2ft-D0-CMq" firstAttribute="trailing" secondItem="aSo-QZ-e6X" secondAttribute="trailing" id="cec-r7-mYE"/>
-                            <constraint firstItem="aiw-VS-cNk" firstAttribute="top" secondItem="CDv-jq-Itb" secondAttribute="bottom" constant="8" symbolic="YES" id="cww-nk-Ab1"/>
-                            <constraint firstItem="Uh8-3g-UwR" firstAttribute="top" secondItem="IlF-o2-Jac" secondAttribute="bottom" constant="12" symbolic="YES" id="gWI-wl-3mV"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="aSo-QZ-e6X" secondAttribute="leading" id="pkX-4b-WpH"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" constant="20" symbolic="YES" id="pzz-9a-rjK"/>
-                            <constraint firstItem="aSo-QZ-e6X" firstAttribute="top" secondItem="2ft-D0-CMq" secondAttribute="bottom" constant="12" symbolic="YES" id="rrL-uJ-PzE"/>
-                            <constraint firstItem="k6I-AV-bFw" firstAttribute="trailing" secondItem="aiw-VS-cNk" secondAttribute="trailing" id="zJV-wR-szJ"/>
-                            <constraint firstItem="CDv-jq-Itb" firstAttribute="leading" secondItem="Uh8-3g-UwR" secondAttribute="leading" id="zhK-8u-sck"/>
-                        </constraints>
-                    </view>
-                    <connections>
-                        <outlet property="backendSwitch" destination="k6I-AV-bFw" id="qnk-IA-Pr9"/>
-                    </connections>
-                </viewController>
-                <customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="75" y="629"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 262
GoogleDataTransport/GDTCCTTestApp/proto/flltest.pb.swift

@@ -1,262 +0,0 @@
-// DO NOT EDIT.
-//
-// Generated by the Swift generator plugin for the protocol buffer compiler.
-// Source: GoogleDataTransportCCTSupport/GDTCCTTestApp/proto/flltest.proto
-//
-// For information on using the generated types, please see the documenation:
-//   https://github.com/apple/swift-protobuf/
-
-//
-// Copyright 2019 Google
-//
-// 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 proto should rarely, if ever, need to be updated. If the need for a
-// regenerate is needed, do the following:
-// brew install protobuf swift-protobuf
-// cd <root of this repo>
-// protoc --swift_out=. GoogleDataTransportCCTSupport/GDTCCTTestApp/proto/flltest.proto
-
-import Foundation
-import SwiftProtobuf
-
-// If the compiler emits an error on this type, it is because this file
-// was generated by a version of the `protoc` Swift plug-in that is
-// incompatible with the version of SwiftProtobuf to which you are linking.
-// Please ensure that your are building against the same version of the API
-// that was used to generate this file.
-fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
-  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
-  typealias Version = _2
-}
-
-struct FirelogTestMessage {
-  // SwiftProtobuf.Message conformance is added in an extension below. See the
-  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
-  // methods supported on all messages.
-
-  var identifier: String {
-    get {return _storage._identifier}
-    set {_uniqueStorage()._identifier = newValue}
-  }
-
-  var subMessage: SubMessageOne {
-    get {return _storage._subMessage ?? SubMessageOne()}
-    set {_uniqueStorage()._subMessage = newValue}
-  }
-  /// Returns true if `subMessage` has been explicitly set.
-  var hasSubMessage: Bool {return _storage._subMessage != nil}
-  /// Clears the value of `subMessage`. Subsequent reads from it will return its default value.
-  mutating func clearSubMessage() {_uniqueStorage()._subMessage = nil}
-
-  var repeatedID: [String] {
-    get {return _storage._repeatedID}
-    set {_uniqueStorage()._repeatedID = newValue}
-  }
-
-  var warriorChampionships: Int32 {
-    get {return _storage._warriorChampionships}
-    set {_uniqueStorage()._warriorChampionships = newValue}
-  }
-
-  var unknownFields = SwiftProtobuf.UnknownStorage()
-
-  init() {}
-
-  fileprivate var _storage = _StorageClass.defaultInstance
-}
-
-struct SubMessageOne {
-  // SwiftProtobuf.Message conformance is added in an extension below. See the
-  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
-  // methods supported on all messages.
-
-  var repeatedSubMessage: [SubMessageTwo] = []
-
-  var ignoreThisMessage: Bool = false
-
-  var starTrekData: Data = SwiftProtobuf.Internal.emptyData
-
-  var unknownFields = SwiftProtobuf.UnknownStorage()
-
-  init() {}
-}
-
-struct SubMessageTwo {
-  // SwiftProtobuf.Message conformance is added in an extension below. See the
-  // `Message` and `Message+*Additions` files in the SwiftProtobuf library for
-  // methods supported on all messages.
-
-  var samplingPercentage: Double = 0
-
-  var unknownFields = SwiftProtobuf.UnknownStorage()
-
-  init() {}
-}
-
-// MARK: - Code below here is support for the SwiftProtobuf runtime.
-
-extension FirelogTestMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
-  static let protoMessageName: String = "FirelogTestMessage"
-  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
-    1: .same(proto: "identifier"),
-    14: .standard(proto: "sub_message"),
-    15: .standard(proto: "repeated_id"),
-    16: .standard(proto: "warrior_championships"),
-  ]
-
-  fileprivate class _StorageClass {
-    var _identifier: String = String()
-    var _subMessage: SubMessageOne? = nil
-    var _repeatedID: [String] = []
-    var _warriorChampionships: Int32 = 0
-
-    static let defaultInstance = _StorageClass()
-
-    private init() {}
-
-    init(copying source: _StorageClass) {
-      _identifier = source._identifier
-      _subMessage = source._subMessage
-      _repeatedID = source._repeatedID
-      _warriorChampionships = source._warriorChampionships
-    }
-  }
-
-  fileprivate mutating func _uniqueStorage() -> _StorageClass {
-    if !isKnownUniquelyReferenced(&_storage) {
-      _storage = _StorageClass(copying: _storage)
-    }
-    return _storage
-  }
-
-  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
-    _ = _uniqueStorage()
-    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
-      while let fieldNumber = try decoder.nextFieldNumber() {
-        switch fieldNumber {
-        case 1: try decoder.decodeSingularStringField(value: &_storage._identifier)
-        case 14: try decoder.decodeSingularMessageField(value: &_storage._subMessage)
-        case 15: try decoder.decodeRepeatedStringField(value: &_storage._repeatedID)
-        case 16: try decoder.decodeSingularInt32Field(value: &_storage._warriorChampionships)
-        default: break
-        }
-      }
-    }
-  }
-
-  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
-    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
-      if !_storage._identifier.isEmpty {
-        try visitor.visitSingularStringField(value: _storage._identifier, fieldNumber: 1)
-      }
-      if let v = _storage._subMessage {
-        try visitor.visitSingularMessageField(value: v, fieldNumber: 14)
-      }
-      if !_storage._repeatedID.isEmpty {
-        try visitor.visitRepeatedStringField(value: _storage._repeatedID, fieldNumber: 15)
-      }
-      if _storage._warriorChampionships != 0 {
-        try visitor.visitSingularInt32Field(value: _storage._warriorChampionships, fieldNumber: 16)
-      }
-    }
-    try unknownFields.traverse(visitor: &visitor)
-  }
-
-  static func ==(lhs: FirelogTestMessage, rhs: FirelogTestMessage) -> Bool {
-    if lhs._storage !== rhs._storage {
-      let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in
-        let _storage = _args.0
-        let rhs_storage = _args.1
-        if _storage._identifier != rhs_storage._identifier {return false}
-        if _storage._subMessage != rhs_storage._subMessage {return false}
-        if _storage._repeatedID != rhs_storage._repeatedID {return false}
-        if _storage._warriorChampionships != rhs_storage._warriorChampionships {return false}
-        return true
-      }
-      if !storagesAreEqual {return false}
-    }
-    if lhs.unknownFields != rhs.unknownFields {return false}
-    return true
-  }
-}
-
-extension SubMessageOne: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
-  static let protoMessageName: String = "SubMessageOne"
-  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
-    5: .standard(proto: "repeated_sub_message"),
-    6: .standard(proto: "ignore_this_message"),
-    7: .standard(proto: "star_trek_data"),
-  ]
-
-  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
-    while let fieldNumber = try decoder.nextFieldNumber() {
-      switch fieldNumber {
-      case 5: try decoder.decodeRepeatedMessageField(value: &self.repeatedSubMessage)
-      case 6: try decoder.decodeSingularBoolField(value: &self.ignoreThisMessage)
-      case 7: try decoder.decodeSingularBytesField(value: &self.starTrekData)
-      default: break
-      }
-    }
-  }
-
-  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
-    if !self.repeatedSubMessage.isEmpty {
-      try visitor.visitRepeatedMessageField(value: self.repeatedSubMessage, fieldNumber: 5)
-    }
-    if self.ignoreThisMessage != false {
-      try visitor.visitSingularBoolField(value: self.ignoreThisMessage, fieldNumber: 6)
-    }
-    if !self.starTrekData.isEmpty {
-      try visitor.visitSingularBytesField(value: self.starTrekData, fieldNumber: 7)
-    }
-    try unknownFields.traverse(visitor: &visitor)
-  }
-
-  static func ==(lhs: SubMessageOne, rhs: SubMessageOne) -> Bool {
-    if lhs.repeatedSubMessage != rhs.repeatedSubMessage {return false}
-    if lhs.ignoreThisMessage != rhs.ignoreThisMessage {return false}
-    if lhs.starTrekData != rhs.starTrekData {return false}
-    if lhs.unknownFields != rhs.unknownFields {return false}
-    return true
-  }
-}
-
-extension SubMessageTwo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
-  static let protoMessageName: String = "SubMessageTwo"
-  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
-    5: .standard(proto: "sampling_percentage"),
-  ]
-
-  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
-    while let fieldNumber = try decoder.nextFieldNumber() {
-      switch fieldNumber {
-      case 5: try decoder.decodeSingularDoubleField(value: &self.samplingPercentage)
-      default: break
-      }
-    }
-  }
-
-  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
-    if self.samplingPercentage != 0 {
-      try visitor.visitSingularDoubleField(value: self.samplingPercentage, fieldNumber: 5)
-    }
-    try unknownFields.traverse(visitor: &visitor)
-  }
-
-  static func ==(lhs: SubMessageTwo, rhs: SubMessageTwo) -> Bool {
-    if lhs.samplingPercentage != rhs.samplingPercentage {return false}
-    if lhs.unknownFields != rhs.unknownFields {return false}
-    return true
-  }
-}

+ 0 - 48
GoogleDataTransport/GDTCCTTestApp/proto/flltest.proto

@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 proto should rarely, if ever, need to be updated. If the need for a
-// regenerate is needed, do the following:
-// brew install protobuf swift-protobuf
-// cd <root of this repo>
-// protoc --swift_out=. GoogleDataTransportCCTSupport/GDTCCTTestApp/proto/flltest.proto
-
-syntax = "proto3";
-
-message FirelogTestMessage {
-
-  string identifier = 1;
-
-  SubMessageOne sub_message = 14;
-
-  repeated string repeated_id = 15;
-
-  int32 warrior_championships = 16;
-}
-
-message SubMessageOne {
-
-  repeated SubMessageTwo repeated_sub_message = 5;
-
-  bool ignore_this_message = 6;
-
-  bytes star_trek_data = 7;
-}
-
-message SubMessageTwo {
-
-  double sampling_percentage = 5;
-}

+ 0 - 116
GoogleDataTransport/GDTCCTTestApp/tvos/Main.storyboard

@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder.AppleTV.Storyboard" version="3.0" toolsVersion="15702" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
-    <device id="appleTV" appearance="light"/>
-    <dependencies>
-        <deployment identifier="tvOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <scenes>
-        <!--View Controller-->
-        <scene sceneID="tne-QT-ifu">
-            <objects>
-                <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="GoogleDataTransportCCTSupport_tvOS_TestApp" customModuleProvider="target" sceneMemberID="viewController">
-                    <layoutGuides>
-                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
-                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
-                    </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GoogleDataTransport tvOS Test App" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PAv-tl-dPd">
-                                <rect key="frame" x="106" y="60" width="602" height="46"/>
-                                <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OZi-i7-uhg">
-                                <rect key="frame" x="106" y="130" width="1708" height="86"/>
-                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
-                                <state key="normal" title="Generate Data Event"/>
-                                <connections>
-                                    <action selector="generateDataEventWithSender:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="4ic-PI-54M"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ydy-iV-b3g">
-                                <rect key="frame" x="106" y="240" width="1708" height="86"/>
-                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
-                                <state key="normal" title="Generate Telemetry Event"/>
-                                <connections>
-                                    <action selector="generateTelemetryEventWithSender:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="36q-tC-v7K"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Snj-cN-92G">
-                                <rect key="frame" x="106" y="350" width="1708" height="86"/>
-                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
-                                <state key="normal" title="Generate High Priority Event"/>
-                                <connections>
-                                    <action selector="generateHighPriorityEventWithSender:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="Of6-CF-Ir6"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sbe-wM-1b4">
-                                <rect key="frame" x="106" y="460" width="1708" height="86"/>
-                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
-                                <state key="normal" title="Generate Wifi Only Event"/>
-                                <connections>
-                                    <action selector="generateWifiOnlyEventWithSender:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="I2y-Vl-2nw"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wdl-V2-pfc">
-                                <rect key="frame" x="106" y="570" width="1708" height="86"/>
-                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
-                                <state key="normal" title="Generate Daily Event"/>
-                                <connections>
-                                    <action selector="generateDailyEventWithSender:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="e3b-FX-Tp4"/>
-                                </connections>
-                            </button>
-                            <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="lrN-nC-pge">
-                                <rect key="frame" x="1442" y="48" width="372" height="70"/>
-                                <color key="backgroundColor" white="0.0" alpha="0.10000000000000001" colorSpace="calibratedWhite"/>
-                                <segments>
-                                    <segment title="CCT"/>
-                                    <segment title="FLL"/>
-                                    <segment title="CSH"/>
-                                </segments>
-                            </segmentedControl>
-                        </subviews>
-                        <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
-                        <constraints>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="trailing" secondItem="Snj-cN-92G" secondAttribute="trailing" id="3PE-yK-8z7"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="trailing" secondItem="Ydy-iV-b3g" secondAttribute="trailing" id="AbY-dJ-cIN"/>
-                            <constraint firstItem="lrN-nC-pge" firstAttribute="baseline" secondItem="PAv-tl-dPd" secondAttribute="firstBaseline" id="Cn0-eS-MzM"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="top" secondItem="PAv-tl-dPd" secondAttribute="bottom" constant="24" id="I07-Px-UEC"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="leading" secondItem="Sbe-wM-1b4" secondAttribute="leading" id="MDL-uA-RLV"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="top" secondItem="lrN-nC-pge" secondAttribute="bottom" constant="13" id="NUC-T6-mNb"/>
-                            <constraint firstItem="PAv-tl-dPd" firstAttribute="top" secondItem="wu6-TO-1qx" secondAttribute="top" id="OJK-fA-4cA"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="leading" secondItem="wdl-V2-pfc" secondAttribute="leading" id="RYL-pN-gHK"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="trailing" secondItem="wdl-V2-pfc" secondAttribute="trailing" id="RZb-0q-alZ"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="trailing" secondItem="8bC-Xf-vdC" secondAttribute="trailingMargin" id="Rvu-oZ-fca"/>
-                            <constraint firstItem="lrN-nC-pge" firstAttribute="centerY" secondItem="PAv-tl-dPd" secondAttribute="centerY" id="T6o-WW-pAY"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="leading" secondItem="PAv-tl-dPd" secondAttribute="leading" id="cUa-3v-wVe"/>
-                            <constraint firstItem="PAv-tl-dPd" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="eLV-dH-c3t"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="leading" secondItem="Ydy-iV-b3g" secondAttribute="leading" id="fwC-0d-5uC"/>
-                            <constraint firstItem="lrN-nC-pge" firstAttribute="firstBaseline" secondItem="PAv-tl-dPd" secondAttribute="baseline" id="gmi-VJ-4EM"/>
-                            <constraint firstItem="wdl-V2-pfc" firstAttribute="top" secondItem="Sbe-wM-1b4" secondAttribute="bottom" constant="24" id="h6u-6q-Lwm"/>
-                            <constraint firstItem="lrN-nC-pge" firstAttribute="baseline" secondItem="PAv-tl-dPd" secondAttribute="baseline" id="kKr-ev-yPM"/>
-                            <constraint firstItem="Snj-cN-92G" firstAttribute="top" secondItem="Ydy-iV-b3g" secondAttribute="bottom" constant="24" id="oci-tR-And"/>
-                            <constraint firstItem="Ydy-iV-b3g" firstAttribute="top" secondItem="OZi-i7-uhg" secondAttribute="bottom" constant="24" id="rMm-MB-B6X"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="leading" secondItem="Snj-cN-92G" secondAttribute="leading" id="tg4-ev-Pxz"/>
-                            <constraint firstItem="Sbe-wM-1b4" firstAttribute="top" secondItem="Snj-cN-92G" secondAttribute="bottom" constant="24" id="tjx-AZ-2zQ"/>
-                            <constraint firstItem="OZi-i7-uhg" firstAttribute="trailing" secondItem="Sbe-wM-1b4" secondAttribute="trailing" id="xsG-pP-aIM"/>
-                            <constraint firstItem="lrN-nC-pge" firstAttribute="trailing" secondItem="OZi-i7-uhg" secondAttribute="trailing" id="yx9-aT-WBn"/>
-                        </constraints>
-                        <viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
-                    </view>
-                    <connections>
-                        <outlet property="backendSwitch" destination="lrN-nC-pge" id="fAU-hi-m51"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="70" y="68"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 154
GoogleDataTransport/GDTCCTTestApp/viewcontroller.swift

@@ -1,154 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 Dispatch
-import GoogleDataTransport
-
-public extension ViewController {
-  override func viewDidLoad() {
-    super.viewDidLoad()
-    Globals.SharedViewController = self
-  }
-
-  @IBAction func generateDataEvent(sender: AnyObject?) {
-    print("Generating data event")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "ios_test_app_data_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 1_111_110
-    testMessage.root.subMessage.starTrekData = "technoBabble".data(using: String.Encoding.utf8)!
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-      SubMessageTwo(),
-    ]
-    testMessage.root.subMessage.repeatedSubMessage[0].samplingPercentage = 13.37
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateTelemetryEvent(sender: AnyObject?) {
-    print("Generating telemetry event")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "ios_test_app_telemetry_event"
-    testMessage.root.warriorChampionships = 1000
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-    ]
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendTelemetryEvent(event)
-  }
-
-  @IBAction func generateHighPriorityEvent(sender: AnyObject?) {
-    print("Generating high priority event")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "ios_test_app_high_priority_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 1337
-    event.qosTier = GDTCOREventQoS.qoSFast
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateWifiOnlyEvent(sender: AnyObject?) {
-    print("Generating wifi only event")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "ios_test_app_wifi_only_event"
-    event.qosTier = GDTCOREventQoS.qoSWifiOnly
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateDailyEvent(sender: AnyObject?) {
-    print("Generating daily event")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "ios_test_app_daily_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 9001
-    testMessage.root.subMessage.starTrekData = "engage!".data(using: String.Encoding.utf8)!
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-    ]
-    testMessage.root.subMessage.repeatedSubMessage[0].samplingPercentage = 100.0
-    event.qosTier = GDTCOREventQoS.qoSDaily
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  func beginMonkeyTest(completion: () -> Void) {
-    print("Beginning monkey test")
-    Globals.IsMonkeyTesting = true
-
-    let sema: DispatchSemaphore = DispatchSemaphore(value: 0)
-    var generateEvents = true
-    DispatchQueue.global().asyncAfter(deadline: .now() + Globals.MonkeyTestLength) {
-      generateEvents = false
-      sema.signal()
-    }
-
-    func generateEvent() {
-      DispatchQueue.global().asyncAfter(deadline: .now() + Double.random(in: 0 ..< 3.0)) {
-        let generationFunctions = [
-          self.generateDataEvent,
-          self.generateTelemetryEvent,
-          self.generateHighPriorityEvent,
-          self.generateWifiOnlyEvent,
-          self.generateDailyEvent,
-        ]
-        let randomIndex: Int = Int.random(in: 0 ..< generationFunctions.count)
-        generationFunctions[randomIndex](self)
-      }
-      RunLoop.current.run(until: Date(timeIntervalSinceNow: Double.random(in: 0 ..< 1.5)))
-      if generateEvents {
-        generateEvent()
-      }
-    }
-    generateEvent()
-    sema.wait()
-    Globals.IsMonkeyTesting = false
-    completion()
-  }
-}

+ 0 - 57
GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.h

@@ -1,57 +0,0 @@
-/*
- * 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/Foundation.h>
-#import <XCTest/XCTest.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageProtocol.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef void (^GDTCCTTestStorageBatchHandler)(GDTCORStorageEventSelector *_Nullable eventSelector,
-                                              NSDate *_Nullable expiration,
-                                              GDTCORStorageBatchBlock _Nullable completion);
-
-typedef void (^GDTCCTTestStorageHasEventsCompletion)(BOOL hasEvents);
-typedef void (^GDTCCTTestStorageHasEventsHandler)(GDTCORTarget target,
-                                                  GDTCCTTestStorageHasEventsCompletion completion);
-
-@interface GDTCCTTestStorage : NSObject <GDTCORStorageProtocol>
-
-#pragma mark - Method call expectations.
-
-@property(nonatomic, nullable) XCTestExpectation *batchWithEventSelectorExpectation;
-@property(nonatomic, nullable) XCTestExpectation *removeBatchAndDeleteEventsExpectation;
-@property(nonatomic, nullable) XCTestExpectation *removeBatchWithoutDeletingEventsExpectation;
-@property(nonatomic, nullable) XCTestExpectation *batchIDsForTargetExpectation;
-
-#pragma mark - Blocks to provide custom implementations for the methods.
-
-/// A block to override `batchWithEventSelector:batchExpiration:onComplete:` implementation.
-@property(nonatomic, copy, nullable) GDTCCTTestStorageBatchHandler batchWithEventSelectorHandler;
-/// A block to override `hasEventsForTarget:onComplete:` implementation.
-@property(nonatomic, copy, nullable) GDTCCTTestStorageHasEventsHandler hasEventsForTargetHandler;
-
-#pragma mark - Default test implementations
-
-/// Default test implementation for `batchWithEventSelector:batchExpiration:onComplete:`  method.
-- (void)defaultBatchWithEventSelector:(nonnull GDTCORStorageEventSelector *)eventSelector
-                      batchExpiration:(nonnull NSDate *)expiration
-                           onComplete:(nonnull GDTCORStorageBatchBlock)onComplete;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 144
GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.m

@@ -1,144 +0,0 @@
-/*
- * 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 "GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.h"
-
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-
-@implementation GDTCCTTestStorage {
-  /** Store the events in memory. */
-  NSMutableDictionary<NSString *, GDTCOREvent *> *_storedEvents;
-
-  /** Store the batches in memory. */
-  NSMutableDictionary<NSNumber *, NSSet<GDTCOREvent *> *> *_batches;
-}
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    _storedEvents = [[NSMutableDictionary alloc] init];
-    _batches = [[NSMutableDictionary alloc] init];
-  }
-  return self;
-}
-
-- (void)storeEvent:(GDTCOREvent *)event
-        onComplete:(void (^_Nullable)(BOOL wasWritten, NSError *_Nullable))completion {
-  _storedEvents[event.eventID] = event;
-  if (completion) {
-    completion(YES, nil);
-  }
-}
-
-- (void)removeEvents:(NSSet<NSString *> *)eventIDs {
-  [_storedEvents removeObjectsForKeys:[eventIDs allObjects]];
-}
-
-- (void)batchWithEventSelector:(nonnull GDTCORStorageEventSelector *)eventSelector
-               batchExpiration:(nonnull NSDate *)expiration
-                    onComplete:(nonnull GDTCORStorageBatchBlock)onComplete {
-  if (self.batchWithEventSelectorHandler) {
-    self.batchWithEventSelectorHandler(eventSelector, expiration, onComplete);
-  } else {
-    [self defaultBatchWithEventSelector:eventSelector
-                        batchExpiration:expiration
-                             onComplete:onComplete];
-  }
-}
-
-- (void)removeBatchWithID:(nonnull NSNumber *)batchID
-             deleteEvents:(BOOL)deleteEvents
-               onComplete:(void (^_Nullable)(void))onComplete {
-  if (deleteEvents) {
-    [_batches removeObjectForKey:batchID];
-    [self.removeBatchAndDeleteEventsExpectation fulfill];
-  } else {
-    for (GDTCOREvent *batchedEvent in _batches[batchID]) {
-      _storedEvents[batchedEvent.eventID] = batchedEvent;
-    }
-    [self.removeBatchWithoutDeletingEventsExpectation fulfill];
-  }
-
-  if (onComplete) {
-    onComplete();
-  }
-}
-
-- (void)libraryDataForKey:(nonnull NSString *)key
-          onFetchComplete:(nonnull void (^)(NSData *_Nullable, NSError *_Nullable))onFetchComplete
-              setNewValue:(NSData *_Nullable (^_Nullable)(void))setValueBlock {
-  if (onFetchComplete) {
-    onFetchComplete(nil, nil);
-  }
-}
-
-- (void)storeLibraryData:(NSData *)data
-                  forKey:(nonnull NSString *)key
-              onComplete:(nullable void (^)(NSError *_Nullable error))onComplete {
-  if (onComplete) {
-    onComplete(nil);
-  }
-}
-
-- (void)removeLibraryDataForKey:(nonnull NSString *)key
-                     onComplete:(nonnull void (^)(NSError *_Nullable))onComplete {
-  if (onComplete) {
-    onComplete(nil);
-  }
-}
-
-- (void)hasEventsForTarget:(GDTCORTarget)target onComplete:(nonnull void (^)(BOOL))onComplete {
-  if (self.hasEventsForTargetHandler) {
-    self.hasEventsForTargetHandler(target, onComplete);
-  } else if (onComplete) {
-    onComplete(NO);
-  }
-}
-
-- (void)storageSizeWithCallback:(void (^)(uint64_t storageSize))onComplete {
-}
-
-- (void)batchIDsForTarget:(GDTCORTarget)target
-               onComplete:(nonnull void (^)(NSSet<NSNumber *> *_Nullable))onComplete {
-  [self.batchIDsForTargetExpectation fulfill];
-  if (onComplete) {
-    onComplete([NSSet setWithArray:[self->_batches allKeys]]);
-  }
-}
-
-- (void)checkForExpirations {
-}
-
-#pragma mark - Default Implementations
-
-- (void)defaultBatchWithEventSelector:(nonnull GDTCORStorageEventSelector *)eventSelector
-                      batchExpiration:(nonnull NSDate *)expiration
-                           onComplete:(nonnull GDTCORStorageBatchBlock)onComplete {
-  static NSInteger count = 0;
-  NSNumber *batchID = @(count);
-  count++;
-
-  NSSet<GDTCOREvent *> *batchEvents = [NSSet setWithArray:[_storedEvents allValues]];
-  _batches[batchID] = batchEvents;
-  [_storedEvents removeAllObjects];
-
-  [self.batchWithEventSelectorExpectation fulfill];
-  if (onComplete) {
-    onComplete(batchID, batchEvents);
-  }
-}
-
-@end

BIN
GoogleDataTransport/GDTCCTTests/Data/message-32347456.dat


BIN
GoogleDataTransport/GDTCCTTests/Data/message-35458880.dat


BIN
GoogleDataTransport/GDTCCTTests/Data/message-39882816.dat


BIN
GoogleDataTransport/GDTCCTTests/Data/message-40043840.dat


BIN
GoogleDataTransport/GDTCCTTests/Data/message-40657984.dat


+ 0 - 217
GoogleDataTransport/GDTCCTTests/Integration/GDTCCTIntegrationTest.m

@@ -1,217 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 <XCTest/XCTest.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREventDataObject.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTransport.h"
-
-#import <SystemConfiguration/SCNetworkReachability.h>
-
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTUploader.h"
-
-typedef void (^GDTCCTIntegrationTestBlock)(NSURLSessionUploadTask *_Nullable);
-
-@interface GDTCCTTestDataObject : NSObject <GDTCOREventDataObject>
-
-@end
-
-@implementation GDTCCTTestDataObject
-
-- (NSData *)transportBytes {
-  // Return some random event data corresponding to mapping ID 1018.
-  NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
-  NSArray *dataFiles = @[
-    @"message-32347456.dat", @"message-35458880.dat", @"message-39882816.dat",
-    @"message-40043840.dat", @"message-40657984.dat"
-  ];
-  NSURL *fileURL = [testBundle URLForResource:dataFiles[arc4random_uniform(5)] withExtension:nil];
-  return [NSData dataWithContentsOfURL:fileURL];
-}
-
-@end
-
-@interface GDTCCTIntegrationTest : XCTestCase
-
-/** If YES, the network conditions were good enough to allow running integration tests. */
-@property(nonatomic) BOOL okToRunTest;
-
-/** If YES, allow the recursive generating of events. */
-@property(nonatomic) BOOL generateEvents;
-
-/** The total number of events generated for this test. */
-@property(nonatomic) NSInteger totalEventsGenerated;
-
-/** The transporter used by the test. */
-@property(nonatomic) GDTCORTransport *transport;
-
-/** The local notification listener, to be removed after each test. */
-@property(nonatomic, strong) id<NSObject> uploadObserver;
-
-@end
-
-@implementation GDTCCTIntegrationTest
-
-- (void)setUp {
-  // Don't recursively generate events by default.
-  self.generateEvents = NO;
-  self.totalEventsGenerated = 0;
-  dispatch_semaphore_t sema = dispatch_semaphore_create(0);
-  NSURLSession *session = [NSURLSession sharedSession];
-  NSURLSessionDataTask *task =
-      [session dataTaskWithURL:[NSURL URLWithString:@"https://google.com"]
-             completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response,
-                                 NSError *_Nullable error) {
-               if (error) {
-                 self.okToRunTest = NO;
-               } else {
-                 self.okToRunTest = YES;
-               }
-               self.transport = [[GDTCORTransport alloc] initWithMappingID:@"1018"
-                                                              transformers:nil
-                                                                    target:kGDTCORTargetCSH];
-               dispatch_semaphore_signal(sema);
-             }];
-  [task resume];
-  dispatch_semaphore_wait(sema, dispatch_time(DISPATCH_TIME_NOW, 10.0 * NSEC_PER_SEC));
-}
-
-- (void)tearDown {
-  if (self.uploadObserver) {
-    [[NSNotificationCenter defaultCenter] removeObserver:self.uploadObserver];
-    self.uploadObserver = nil;
-  }
-
-  [super tearDown];
-}
-
-/** Generates an event and sends it through the transport infrastructure. */
-- (void)generateEventWithQoSTier:(GDTCOREventQoS)qosTier {
-  GDTCOREvent *event = [self.transport eventForTransport];
-  event.dataObject = [[GDTCCTTestDataObject alloc] init];
-  event.qosTier = qosTier;
-  [self.transport sendDataEvent:event
-                     onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-                       NSLog(@"Storing a data event completed.");
-                     }];
-  dispatch_async(dispatch_get_main_queue(), ^{
-    self.totalEventsGenerated += 1;
-  });
-}
-
-/** Generates events recursively at random intervals between 0 and 5 seconds. */
-- (void)recursivelyGenerateEvent {
-  if (self.generateEvents) {
-    [self generateEventWithQoSTier:GDTCOREventQosDefault];
-    dispatch_after(
-        dispatch_time(DISPATCH_TIME_NOW, (int64_t)(arc4random_uniform(6) * NSEC_PER_SEC)),
-        dispatch_get_main_queue(), ^{
-          [self recursivelyGenerateEvent];
-        });
-  }
-}
-
-/** Tests sending data to CCT with a high priority event if network conditions are good. */
-- (void)testSendingDataToCCT {
-  if (!self.okToRunTest) {
-    NSLog(@"Skipping the integration test, as the network conditions weren't good enough.");
-    return;
-  }
-
-  // Send a number of events across multiple queues in order to ensure the threading is working as
-  // expected.
-  dispatch_queue_t queue1 = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
-  dispatch_queue_t queue2 = dispatch_queue_create("com.gdtcct.test", DISPATCH_QUEUE_SERIAL);
-  for (int i = 0; i < 12; i++) {
-    int result = i % 3;
-    if (result == 0) {
-      [self generateEventWithQoSTier:GDTCOREventQosDefault];
-    } else if (result == 1) {
-      dispatch_async(queue1, ^{
-        [self generateEventWithQoSTier:GDTCOREventQosDefault];
-      });
-    } else if (result == 2) {
-      dispatch_async(queue2, ^{
-        [self generateEventWithQoSTier:GDTCOREventQosDefault];
-      });
-    }
-  }
-
-  XCTestExpectation *eventsUploaded =
-      [self expectationWithDescription:@"Events were successfully uploaded to CCT."];
-  [eventsUploaded setAssertForOverFulfill:NO];
-  self.uploadObserver = [self uploadNotificationObserverWithExpectation:eventsUploaded];
-
-  // Send a high priority event to flush events.
-  [self generateEventWithQoSTier:GDTCOREventQoSFast];
-
-  // Validate that at least one event was uploaded.
-  [self waitForExpectations:@[ eventsUploaded ] timeout:60.0];
-}
-
-- (void)testRunsWithoutCrashing {
-  if (!self.okToRunTest) {
-    NSLog(@"Skipping the integration test, as the network conditions weren't good enough.");
-    return;
-  }
-  // Just run for a minute whilst generating events.
-  NSInteger secondsToRun = 65;
-  self.generateEvents = YES;
-
-  XCTestExpectation *eventsUploaded =
-      [self expectationWithDescription:@"Events were successfully uploaded to CCT."];
-  [eventsUploaded setAssertForOverFulfill:NO];
-
-  self.uploadObserver = [self uploadNotificationObserverWithExpectation:eventsUploaded];
-
-  [self recursivelyGenerateEvent];
-
-  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(secondsToRun * NSEC_PER_SEC)),
-                 dispatch_get_main_queue(), ^{
-                   self.generateEvents = NO;
-
-                   // Send a high priority event to flush other events.
-                   [self generateEventWithQoSTier:GDTCOREventQoSFast];
-
-                   [self waitForExpectations:@[ eventsUploaded ] timeout:60.0];
-                 });
-  [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:secondsToRun + 5]];
-}
-
-/** Registers a notification observer for when an upload occurs and returns the observer. */
-- (id<NSObject>)uploadNotificationObserverWithExpectation:(XCTestExpectation *)expectation {
-  return [[NSNotificationCenter defaultCenter]
-      addObserverForName:GDTCCTUploadCompleteNotification
-                  object:nil
-                   queue:nil
-              usingBlock:^(NSNotification *_Nonnull note) {
-                NSNumber *eventsUploadedNumber = note.object;
-                if (![eventsUploadedNumber isKindOfClass:[NSNumber class]]) {
-                  XCTFail(@"Expected notification object of events uploaded, "
-                          @"instead got a %@.",
-                          [eventsUploadedNumber class]);
-                }
-                // We don't necessarily need *all* uploads to have happened, just some (due to
-                // timing). As long as there are some events uploaded, call it a success.
-                NSInteger eventsUploaded = eventsUploadedNumber.integerValue;
-                if (eventsUploaded > 0 && eventsUploaded <= self.totalEventsGenerated) {
-                  [expectation fulfill];
-                }
-              }];
-}
-
-@end

+ 0 - 32
GoogleDataTransport/GDTCCTTests/Monkey/GDTCCTMonkeyTest.swift

@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 XCTest
-
-import GoogleDataTransport_CCTTestApp
-
-class GDTMonkeyTest: XCTestCase {
-  func testGDTCCTAndFLL() {
-    let viewController: ViewController? = Globals.SharedViewController
-    XCTAssertNotNil(viewController)
-
-    let expectation: XCTestExpectation = self.expectation(description: "Runs without crashing")
-    viewController?.beginMonkeyTest {
-      expectation.fulfill()
-    }
-    waitForExpectations(timeout: Globals.MonkeyTestLengthPlusBuffer, handler: nil)
-  }
-}

+ 0 - 193
GoogleDataTransport/GDTCCTTests/Unit/GDTCCTNanopbHelpersTest.m

@@ -1,193 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 <XCTest/XCTest.h>
-
-#import <nanopb/pb_decode.h>
-
-#import "GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
-
-@interface GDTCCTNanopbHelpersTest : XCTestCase
-
-/** An event generator for testing. */
-@property(nonatomic) GDTCCTEventGenerator *generator;
-
-@end
-
-@implementation GDTCCTNanopbHelpersTest
-
-- (void)setUp {
-  self.generator = [[GDTCCTEventGenerator alloc] initWithTarget:kGDTCORTargetCCT];
-}
-
-/** Tests that the event generator is generating consistent events. */
-- (void)testGeneratingFiveConsistentEvents {
-  NSArray<GDTCOREvent *> *events1 = [self.generator generateTheFiveConsistentEvents];
-  NSArray<GDTCOREvent *> *events2 = [self.generator generateTheFiveConsistentEvents];
-  XCTAssertEqual(events1.count, events2.count);
-  XCTAssertEqual(events1.count, 5);
-  for (int i = 0; i < events1.count; i++) {
-    GDTCOREvent *storedEvent1 = events1[i];
-    GDTCOREvent *storedEvent2 = events2[i];
-    XCTAssertEqualObjects(storedEvent1.serializedDataObjectBytes,
-                          storedEvent2.serializedDataObjectBytes);
-  }
-}
-
-/** Tests constructing a batched log request. */
-- (void)testConstructBatchedLogRequest {
-  NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
-  NSArray *testData = @[
-    @"message-32347456.dat", @"message-35458880.dat", @"message-39882816.dat",
-    @"message-40043840.dat", @"message-40657984.dat"
-  ];
-  NSMutableSet *storedEvents = [[NSMutableSet alloc] init];
-  for (NSString *dataFile in testData) {
-    NSData *messageData = [NSData dataWithContentsOfURL:[testBundle URLForResource:dataFile
-                                                                     withExtension:nil]];
-    XCTAssertNotNil(messageData);
-    NSString *filePath = [NSString stringWithFormat:@"test-%lf.txt", CFAbsoluteTimeGetCurrent()];
-    [messageData writeToFile:filePath atomically:YES];
-    NSURL *fileURL = [NSURL fileURLWithPath:filePath];
-    XCTAssertNotNil(fileURL);
-    XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
-    [storedEvents addObject:[_generator generateEvent:GDTCOREventQosDefault fileURL:fileURL]];
-  }
-  gdt_cct_BatchedLogRequest batch = gdt_cct_BatchedLogRequest_init_default;
-  XCTAssertNoThrow((batch = GDTCCTConstructBatchedLogRequest(@{@"1018" : storedEvents})));
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batch);
-}
-
-/** Tests encoding a batched log request generates bytes equivalent to canonical protobuf. */
-- (void)testEncodeBatchedLogRequest {
-  NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
-  NSArray *testData = @[
-    @"message-32347456.dat", @"message-35458880.dat", @"message-39882816.dat",
-    @"message-40043840.dat", @"message-40657984.dat"
-  ];
-  NSMutableSet *storedEvents = [[NSMutableSet alloc] init];
-  for (NSString *dataFile in testData) {
-    NSData *messageData = [NSData dataWithContentsOfURL:[testBundle URLForResource:dataFile
-                                                                     withExtension:nil]];
-    XCTAssertNotNil(messageData);
-    NSString *filePath = [NSString stringWithFormat:@"test-%lf.txt", CFAbsoluteTimeGetCurrent()];
-    [messageData writeToFile:filePath atomically:YES];
-    NSURL *fileURL = [NSURL fileURLWithPath:filePath];
-    XCTAssertNotNil(fileURL);
-    XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
-    [storedEvents addObject:[_generator generateEvent:GDTCOREventQosDefault fileURL:fileURL]];
-  }
-  gdt_cct_BatchedLogRequest batch = GDTCCTConstructBatchedLogRequest(@{@"1018" : storedEvents});
-  NSData *encodedBatchLogRequest;
-  XCTAssertNoThrow((encodedBatchLogRequest = GDTCCTEncodeBatchedLogRequest(&batch)));
-  XCTAssertNotNil(encodedBatchLogRequest);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batch);
-}
-
-/** Tests that the bytes generated are decodable. */
-- (void)testBytesAreDecodable {
-  NSArray<GDTCOREvent *> *storedEventsA = [self.generator generateTheFiveConsistentEvents];
-  NSSet<GDTCOREvent *> *storedEvents = [NSSet setWithArray:storedEventsA];
-  gdt_cct_BatchedLogRequest batch = GDTCCTConstructBatchedLogRequest(@{@"1018" : storedEvents});
-  NSData *encodedBatchLogRequest = GDTCCTEncodeBatchedLogRequest(&batch);
-  gdt_cct_BatchedLogRequest decodedBatch = gdt_cct_BatchedLogRequest_init_default;
-  pb_istream_t istream =
-      pb_istream_from_buffer([encodedBatchLogRequest bytes], [encodedBatchLogRequest length]);
-  XCTAssertTrue(pb_decode(&istream, gdt_cct_BatchedLogRequest_fields, &decodedBatch));
-  XCTAssertEqual(decodedBatch.log_request_count, batch.log_request_count);
-  XCTAssertEqual(decodedBatch.log_request[0].log_event_count, batch.log_request[0].log_event_count);
-  XCTAssertEqual(decodedBatch.log_request[0].log_event[0].event_time_ms,
-                 batch.log_request[0].log_event[0].event_time_ms);
-  XCTAssertEqual(decodedBatch.log_request[0].log_event[0].event_uptime_ms,
-                 batch.log_request[0].log_event[0].event_uptime_ms);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batch);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &decodedBatch);
-}
-
-- (void)testDecodedEventTimestampMatchToBatchContent {
-  GDTCOREvent *storedEvent = [self.generator generateEvent:GDTCOREventQoSDaily];
-  NSSet<GDTCOREvent *> *storedEvents = [NSSet setWithObject:storedEvent];
-  gdt_cct_BatchedLogRequest batch = GDTCCTConstructBatchedLogRequest(@{@"1018" : storedEvents});
-  NSData *encodedBatchLogRequest = GDTCCTEncodeBatchedLogRequest(&batch);
-  gdt_cct_BatchedLogRequest decodedBatch = gdt_cct_BatchedLogRequest_init_default;
-  pb_istream_t istream =
-      pb_istream_from_buffer([encodedBatchLogRequest bytes], [encodedBatchLogRequest length]);
-  XCTAssertTrue(pb_decode(&istream, gdt_cct_BatchedLogRequest_fields, &decodedBatch));
-
-  gdt_cct_LogRequest decodedLogRequest = decodedBatch.log_request[0];
-  gdt_cct_LogEvent decodedLogEvent = decodedLogRequest.log_event[0];
-
-  XCTAssertEqual(decodedLogEvent.event_time_ms, storedEvent.clockSnapshot.timeMillis);
-  XCTAssertEqual(decodedLogEvent.event_uptime_ms, [storedEvent.clockSnapshot uptimeMilliseconds]);
-  XCTAssertEqual(decodedLogEvent.timezone_offset_seconds,
-                 storedEvent.clockSnapshot.timezoneOffsetSeconds);
-
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batch);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &decodedBatch);
-}
-
-/** Tests that creating a message above the apparent threshold of 16320 bytes works. */
-- (void)testEncodingProtoAboveDefaultOSThreshold {
-  NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
-  NSArray *testData = @[
-    @"message-32347456.dat", @"message-35458880.dat", @"message-39882816.dat",
-    @"message-40043840.dat", @"message-40657984.dat"
-  ];
-  NSMutableSet *events = [[NSMutableSet alloc] init];
-  // 250 messages results in a total size of 16337 which is > 16320, the apparent OS limit. Changing
-  // to 249 would've caused test to pass previously.
-  for (int i = 0; i < 250; i++) {
-    NSString *dataFile = testData[arc4random_uniform((uint32_t)testData.count)];
-    NSData *messageData = [NSData dataWithContentsOfURL:[testBundle URLForResource:dataFile
-                                                                     withExtension:nil]];
-    XCTAssertNotNil(messageData);
-    NSString *filePath = [NSString stringWithFormat:@"test-%lf.txt", CFAbsoluteTimeGetCurrent()];
-    [messageData writeToFile:filePath atomically:YES];
-    NSURL *fileURL = [NSURL fileURLWithPath:filePath];
-    XCTAssertNotNil(fileURL);
-    XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:filePath]);
-    [events addObject:[_generator generateEvent:GDTCOREventQosDefault fileURL:fileURL]];
-  }
-  gdt_cct_BatchedLogRequest batch = gdt_cct_BatchedLogRequest_init_default;
-  XCTAssertNoThrow((batch = GDTCCTConstructBatchedLogRequest(@{@"1018" : events})));
-  NSData *data = GDTCCTEncodeBatchedLogRequest(&batch);
-  XCTAssertNotNil(data);
-  const char *bytes = (const char *)[data bytes];
-  BOOL allZeroes = YES;
-  for (int i = 0; i < data.length; i++) {
-    char aByte = bytes[i];
-    if (aByte != '\0') {
-      allZeroes = NO;
-    }
-  }
-  XCTAssertFalse(allZeroes);
-  pb_release(gdt_cct_BatchedLogRequest_fields, &batch);
-}
-
-- (void)testSimpleByteEncodingConsistency {
-  NSData *data = [@"Simple." dataUsingEncoding:NSUTF8StringEncoding];
-  pb_bytes_array_t *bytesArray = GDTCCTEncodeData(data);
-  XCTAssertEqual(bytesArray->size, data.length);
-  XCTAssertTrue(bytesArray->bytes);
-  XCTAssertEqualObjects([[NSString alloc] initWithBytes:bytesArray->bytes
-                                                 length:bytesArray->size
-                                               encoding:NSUTF8StringEncoding],
-                        @"Simple.");
-}
-
-@end

+ 0 - 787
GoogleDataTransport/GDTCCTTests/Unit/GDTCCTUploaderTest.m

@@ -1,787 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 <XCTest/XCTest.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageProtocol.h"
-#import "GoogleDataTransport/GDTCORTests/Common/Categories/GDTCORRegistrar+Testing.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTUploader.h"
-
-#import "GoogleDataTransport/GDTCCTTests/Common/TestStorage/GDTCCTTestStorage.h"
-
-#import "GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.h"
-#import "GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.h"
-
-@interface GDTCCTUploaderTest : XCTestCase
-
-@property(nonatomic) GDTCCTUploader *uploader;
-
-/** An event generator for testing. */
-@property(nonatomic) GDTCCTEventGenerator *generator;
-
-/** The local HTTP server to use for testing. */
-@property(nonatomic) GDTCCTTestServer *testServer;
-
-@property(nonatomic) GDTCCTTestStorage *testStorage;
-
-@end
-
-@implementation GDTCCTUploaderTest
-
-- (void)setUp {
-  [super setUp];
-
-  self.testStorage = [[GDTCCTTestStorage alloc] init];
-
-  // Reset registrar to avoid real object access storage along with the tests.
-  [[GDTCORRegistrar sharedInstance] reset];
-  [[GDTCORRegistrar sharedInstance] registerStorage:self.testStorage target:kGDTCORTargetTest];
-
-  self.generator = [[GDTCCTEventGenerator alloc] initWithTarget:kGDTCORTargetTest];
-
-  self.testServer = [[GDTCCTTestServer alloc] init];
-  [self.testServer registerLogBatchPath];
-  [self.testServer start];
-  XCTAssertTrue(self.testServer.isRunning);
-
-  self.uploader = [[GDTCCTUploader alloc] init];
-  GDTCCTUploader.testServerURL =
-      [self.testServer.serverURL URLByAppendingPathComponent:@"logBatch"];
-}
-
-- (void)tearDown {
-  self.testServer.responseCompletedBlock = nil;
-  [self.testServer stop];
-  self.testStorage = nil;
-  [super tearDown];
-}
-
-#pragma mark - Upload flow tests
-
-- (void)testUploadTargetWhenThereAreEventsToUpload {
-  // 0. Generate test events.
-  id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(kGDTCORTargetTest);
-  XCTAssertNotNil(storage);
-  [[self.generator generateTheFiveConsistentEvents]
-      enumerateObjectsUsingBlock:^(GDTCOREvent *_Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) {
-        [storage storeEvent:obj onComplete:nil];
-      }];
-
-  // 1. Set up expectations.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                           result:YES];
-
-  // 1.3. Don't expect previously batched events to be removed (no batch present).
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-
-  // 1.4. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 2. Create uploader and start upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (void)testUploadTargetWhenThereIsStoredBatchThenItIsUploadedFirst {
-  // 0. Generate test events.
-  // 0.1. Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-  // 0.2. Batch the event.
-  [self batchEvents];
-
-  // 1. Set up expectations.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                           result:YES];
-
-  // 1.3. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 2. Create uploader and start upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:NO];
-
-  // 4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-/** Tests that when there is an ongoing upload no other uploads are started until the 1st finishes.
- * Once 1st finished, another one can be started. */
-- (void)testUploadTargetWhenThereIsOngoingUploadThenNoOp {
-  // 0. Set up expectations to track 1st upload progress.
-  // 0.1. Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-  // 0.2. Configure server request expectation.
-  // Block to call to finish the 1st request.
-  __block dispatch_block_t requestCompletionBlock;
-  __auto_type __weak weakSelf = self;
-  XCTestExpectation *serverRequestExpectation1 =
-      [self expectationWithDescription:@"serverRequestExpectation1"];
-  self.testServer.requestHandler =
-      ^(GCDWebServerRequest *_Nonnull request, GCDWebServerResponse *_Nullable suggestedResponse,
-        GCDWebServerCompletionBlock _Nonnull completionBlock) {
-        weakSelf.testServer.requestHandler = nil;
-        requestCompletionBlock = ^{
-          completionBlock(suggestedResponse);
-        };
-
-        [serverRequestExpectation1 fulfill];
-      };
-
-  // 0.3. Configure storage.
-  XCTestExpectation *hasEventsExpectation1 = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                            result:YES];
-
-  // 0.4. Start upload 1st upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 0.4. Wait for server request to be sent.
-  [self waitForExpectations:@[ hasEventsExpectation1, serverRequestExpectation1 ] timeout:1];
-
-  // 1. Test 2nd request.
-  // 1.0 Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-
-  // 1.1. Configure expectations for the 2nd request.
-  // 1.1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.1.2. Don't expect any storage.
-  self.testStorage.batchIDsForTargetExpectation.inverted = YES;
-  self.testStorage.batchWithEventSelectorExpectation.inverted = YES;
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-  self.testStorage.removeBatchAndDeleteEventsExpectation.inverted = YES;
-
-  XCTestExpectation *hasEventsExpectation2 = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                            result:YES];
-  hasEventsExpectation2.inverted = YES;
-
-  // 1.2. Start upload 2nd time.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 1.3. Wait for expectations.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation, hasEventsExpectation2,
-    self.testStorage.batchWithEventSelectorExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3];
-
-  // 1.4. Wait for 1st upload finish.
-  requestCompletionBlock();
-  [self waitForUploadOperationsToFinish:self.uploader];
-
-  // 3. Test another upload after the 1st finished.
-  // 3.1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 3.1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation3 = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                            result:YES];
-
-  // 3.1.3. Don't expect previously batched events to be removed (no batch present).
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-
-  // 3.1.4. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 3.3.2. Start 3rd upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 3.3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation3,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 3.4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (void)testUploadTarget_WhenThereAreBothStoredBatchAndEvents_ThenRemoveBatchAndBatchThenAllEvents {
-  // 0. Generate test events.
-  // 0.1. Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-  // 0.2. Batch the event.
-  [self batchEvents];
-  // 0.3. Generate one more event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-
-  // 1. Set up expectations.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                           result:YES];
-
-  // 1.3. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 1.2. Start upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 1.3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 1.4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (void)testUploadTarget_WhenThereAreNoEventsFirstThenEventsAdded_ThenUploadNewEvent {
-  GDTCCTUploader.testServerURL =
-      [self.testServer.serverURL URLByAppendingPathComponent:@"logBatch"];
-
-  // 1. Test stored batch upload.
-  // 1.1. Set up expectations.
-  // 1.1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                           result:NO];
-
-  // 1.1.3. Don't expect events to be batched or deleted.
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-  self.testStorage.removeBatchAndDeleteEventsExpectation.inverted = YES;
-  self.testStorage.batchWithEventSelectorExpectation.inverted = YES;
-
-  // 1.1.4. Don't expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation1 = [self expectationTestServerSuccessRequestResponse];
-  responseSentExpectation1.inverted = YES;
-
-  // 1.2. Create uploader and start upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 1.3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation1,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 1.4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-
-  // 2. Test stored events upload.
-  // 2.0. Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-
-  // 2.1. Set up expectations.
-  // 2.1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 2.1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest result:YES];
-
-  // 2.1.3. Don't expect previously batched events to be removed (no batch present).
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-
-  // 2.1.4. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 2.2. Create uploader and start upload.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionWifiData];
-
-  // 2.3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 2.4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-#pragma mark - Storage interaction tests
-
-- (void)testStorageSelectorWhenConditionsHighPriority {
-  __weak id weakSelf = self;
-  [self assertStorageSelectorWithCondition:GDTCORUploadConditionHighPriority
-                           validationBlock:^(GDTCORStorageEventSelector *_Nullable eventSelector,
-                                             NSDate *expiration) {
-                             __unused id self = weakSelf;
-                             XCTAssertLessThan([expiration timeIntervalSinceNow], 600);
-                             XCTAssertEqual(eventSelector.selectedTarget, kGDTCORTargetTest);
-                             XCTAssertNil(eventSelector.selectedEventIDs);
-                             XCTAssertNil(eventSelector.selectedMappingIDs);
-                             XCTAssertNil(eventSelector.selectedQosTiers);
-                           }];
-}
-
-- (void)testStorageSelectorWhenConditionsMobileData {
-  __weak id weakSelf = self;
-  [self
-      assertStorageSelectorWithCondition:GDTCORUploadConditionMobileData
-                         validationBlock:^(GDTCORStorageEventSelector *_Nullable eventSelector,
-                                           NSDate *expiration) {
-                           __unused id self = weakSelf;
-                           XCTAssertLessThan([expiration timeIntervalSinceNow], 600);
-                           XCTAssertEqual(eventSelector.selectedTarget, kGDTCORTargetTest);
-                           XCTAssertNil(eventSelector.selectedEventIDs);
-                           XCTAssertNil(eventSelector.selectedMappingIDs);
-
-                           NSSet *expectedQoSTiers = [NSSet
-                               setWithArray:@[ @(GDTCOREventQoSFast), @(GDTCOREventQosDefault) ]];
-                           XCTAssertEqualObjects(eventSelector.selectedQosTiers, expectedQoSTiers);
-                         }];
-}
-
-- (void)testStorageSelectorWhenConditionsWifiData {
-  __weak id weakSelf = self;
-  [self
-      assertStorageSelectorWithCondition:GDTCORUploadConditionWifiData
-                         validationBlock:^(GDTCORStorageEventSelector *_Nullable eventSelector,
-                                           NSDate *expiration) {
-                           __unused id self = weakSelf;
-                           XCTAssertLessThan([expiration timeIntervalSinceNow], 600);
-                           XCTAssertEqual(eventSelector.selectedTarget, kGDTCORTargetTest);
-                           XCTAssertNil(eventSelector.selectedEventIDs);
-                           XCTAssertNil(eventSelector.selectedMappingIDs);
-
-                           NSSet *expectedQoSTiers = [NSSet setWithArray:@[
-                             @(GDTCOREventQoSFast), @(GDTCOREventQoSWifiOnly),
-                             @(GDTCOREventQosDefault), @(GDTCOREventQoSTelemetry),
-                             @(GDTCOREventQoSUnknown)
-                           ]];
-                           XCTAssertEqualObjects(eventSelector.selectedQosTiers, expectedQoSTiers);
-                         }];
-}
-
-#pragma mark - Test ready for upload based on conditions
-
-- (void)testUploadTarget_WhenNoConnection_ThenDoNotUpload {
-  // 0. Generate and store and an event.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-
-  // 1. Configure expectations for the 2nd request.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.2. Don't expect any storage.
-  self.testStorage.batchIDsForTargetExpectation.inverted = YES;
-  self.testStorage.batchWithEventSelectorExpectation.inverted = YES;
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-  self.testStorage.removeBatchAndDeleteEventsExpectation.inverted = YES;
-
-  XCTestExpectation *hasEventsExpectation2 = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                            result:YES];
-  hasEventsExpectation2.inverted = YES;
-
-  // 2. Start upload 2nd time.
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:GDTCORUploadConditionNoNetwork];
-
-  // 3. Wait for expectations.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation, hasEventsExpectation2,
-    self.testStorage.batchWithEventSelectorExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3];
-
-  // 4. Wait for 1st upload finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (void)testUploadTarget_WhenBeforeServerNextUploadTimeForCCTAndFLLTargets_ThenDoNotUpload {
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetCCT
-                                                  QoS:GDTCOREventQoSFast
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:NO];
-
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetFLL
-                                                  QoS:GDTCOREventQosDefault
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:NO];
-}
-
-- (void)
-    testUploadTarget_WhenBeforeServerNextUploadTimeForCCTAndFLLTargetsAndHighPriority_ThenUpload {
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetCCT
-                                                  QoS:GDTCOREventQoSFast
-                                           conditions:GDTCORUploadConditionHighPriority
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:YES];
-
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetFLL
-                                                  QoS:GDTCOREventQosDefault
-                                           conditions:GDTCORUploadConditionHighPriority
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:YES];
-}
-
-- (void)testUploadTarget_WhenBeforeServerNextUploadTimeForOtherTargets_ThenUpload {
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetTest
-                                                  QoS:GDTCOREventQoSFast
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:YES];
-
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetCSH
-                                                  QoS:GDTCOREventQosDefault
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:YES];
-
-  [self assertUploadTargetRespectsNextRequestWaitTime:60
-                                            forTarget:kGDTCORTargetINT
-                                                  QoS:GDTCOREventQosDefault
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:NO
-                                        expectRequest:YES];
-}
-
-- (void)testUploadTarget_WhenAfterServerNextUploadTimeForCCTAndFLLTargets_ThenUpload {
-  [self assertUploadTargetRespectsNextRequestWaitTime:1
-                                            forTarget:kGDTCORTargetCCT
-                                                  QoS:GDTCOREventQoSFast
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:YES
-                                        expectRequest:YES];
-
-  [self assertUploadTargetRespectsNextRequestWaitTime:1
-                                            forTarget:kGDTCORTargetFLL
-                                                  QoS:GDTCOREventQosDefault
-                                           conditions:GDTCORUploadConditionWifiData
-                         shouldWaitForNextRequestTime:YES
-                                        expectRequest:YES];
-}
-
-//// TODO: Tests for uploading several empty targets and then non-empty target.
-
-#pragma mark - Helpers
-
-- (NSNumber *)batchEvents {
-  XCTestExpectation *eventsBatched = [self expectationWithDescription:@"eventsBatched"];
-  __block NSNumber *batchID;
-  [self.testStorage
-      batchWithEventSelector:[GDTCORStorageEventSelector eventSelectorForTarget:kGDTCORTargetTest]
-             batchExpiration:[NSDate distantFuture]
-                  onComplete:^(NSNumber *_Nullable newBatchID,
-                               NSSet<GDTCOREvent *> *_Nullable batchEvents) {
-                    [eventsBatched fulfill];
-                    batchID = newBatchID;
-                  }];
-  [self waitForExpectations:@[ eventsBatched ] timeout:0.5];
-
-  XCTAssertNotNil(batchID);
-  return batchID;
-}
-
-- (XCTestExpectation *)expectationTestServerSuccessRequestResponse {
-  __weak id weakSelf = self;
-  XCTestExpectation *responseSentExpectation = [self expectationWithDescription:@"response sent"];
-
-  self.testServer.responseCompletedBlock =
-      ^(GCDWebServerRequest *_Nonnull request, GCDWebServerResponse *_Nonnull response) {
-        // Redefining the self var addresses strong self capturing in the XCTAssert macros.
-        id self = weakSelf;
-        XCTAssertNotNil(self);
-        [responseSentExpectation fulfill];
-        XCTAssertEqual(response.statusCode, 200);
-        XCTAssertTrue(response.hasBody);
-      };
-  return responseSentExpectation;
-}
-
-- (void)setUpStorageExpectations {
-  self.testStorage.batchIDsForTargetExpectation =
-      [self expectationWithDescription:@"batchIDsForTargetExpectation"];
-  self.testStorage.batchWithEventSelectorExpectation =
-      [self expectationWithDescription:@"batchWithEventSelectorExpectation"];
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation =
-      [self expectationWithDescription:@"removeBatchWithoutDeletingEventsExpectation"];
-  self.testStorage.removeBatchAndDeleteEventsExpectation =
-      [self expectationWithDescription:@"removeBatchAndDeleteEventsExpectation"];
-}
-
-- (void)waitForUploadOperationsToFinish:(GDTCCTUploader *)uploader {
-  XCTestExpectation *uploadFinishedExpectation =
-      [self expectationWithDescription:@"uploadFinishedExpectation"];
-  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)),
-                 uploader.uploaderQueue, ^{
-                   [uploadFinishedExpectation fulfill];
-                   XCTAssertNil(uploader.currentTask);
-                 });
-  [self waitForExpectations:@[ uploadFinishedExpectation ] timeout:1];
-}
-
-- (XCTestExpectation *)expectStorageHasEventsForTarget:(GDTCORTarget)expectedTarget
-                                                result:(BOOL)hasEvents {
-  XCTestExpectation *expectation = [self expectationWithDescription:NSStringFromSelector(_cmd)];
-
-  __weak __auto_type weakSelf = self;
-  self.testStorage.hasEventsForTargetHandler =
-      ^(GDTCORTarget target, GDTCCTTestStorageHasEventsCompletion _Nonnull completion) {
-        __unused __auto_type self = weakSelf;
-        [expectation fulfill];
-        XCTAssertEqual(target, expectedTarget);
-        completion(hasEvents);
-      };
-
-  return expectation;
-}
-
-- (void)assertStorageSelectorWithCondition:(GDTCORUploadConditions)conditions
-                           validationBlock:(void (^)(GDTCORStorageEventSelector *_Nullable selector,
-                                                     NSDate *expirationDate))validationBlock {
-  XCTestExpectation *hasEventsExpectation = [self expectStorageHasEventsForTarget:kGDTCORTargetTest
-                                                                           result:YES];
-
-  XCTestExpectation *storageBatchExpectation =
-      [self expectationWithDescription:@"storageBatchExpectation"];
-
-  self.testStorage.batchWithEventSelectorHandler =
-      ^(GDTCORStorageEventSelector *_Nullable eventSelector, NSDate *_Nullable expiration,
-        GDTCORStorageBatchBlock _Nullable completion) {
-        // Redefining the self var addresses strong self capturing in the XCTAssert macros.
-        [storageBatchExpectation fulfill];
-
-        validationBlock(eventSelector, expiration);
-        completion(nil, nil);
-      };
-
-  [self.uploader uploadTarget:kGDTCORTargetTest withConditions:conditions];
-
-  [self waitForExpectations:@[ hasEventsExpectation, storageBatchExpectation ] timeout:1];
-}
-
-- (void)sendEventSuccessfully {
-  // 0. Generate test events.
-  [self.generator generateEvent:GDTCOREventQoSFast];
-
-  // 1. Set up expectations.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-
-  // 1.2. Expect `hasEventsForTarget:onComplete:` to be called.
-  XCTestExpectation *hasEventsExpectation =
-      [self expectStorageHasEventsForTarget:self.generator.target result:YES];
-
-  // 1.3. Don't expect previously batched events to be removed (no batch present).
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-
-  // 1.4. Expect a batch to be uploaded.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 2. Create uploader and start upload.
-  [self.uploader uploadTarget:self.generator.target withConditions:GDTCORUploadConditionWifiData];
-
-  // 3. Wait for operations to complete in the specified order.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation, hasEventsExpectation,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3
-               enforceOrder:YES];
-
-  // 4. Wait for upload operation to finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (void)assertUploadTargetRespectsNextRequestWaitTime:(NSTimeInterval)nextRequestWaitTime
-                                            forTarget:(GDTCORTarget)target
-                                                  QoS:(GDTCOREventQoS)eventQoS
-                                           conditions:(GDTCORUploadConditions)conditions
-                         shouldWaitForNextRequestTime:(BOOL)shouldWaitForNextRequestTime
-                                        expectRequest:(BOOL)expectRequest {
-  // 0.1. Set response next request wait time.
-  self.testServer.responseNextRequestWaitTime = nextRequestWaitTime;
-  // 0.2. Use a target that should respect next upload time.
-  self.generator = [[GDTCCTEventGenerator alloc] initWithTarget:target];
-  // 0.3. Register storage for the target.
-  [[GDTCORRegistrar sharedInstance] reset];
-  [[GDTCORRegistrar sharedInstance] registerStorage:self.testStorage target:self.generator.target];
-  // 0.4. Send an event and receive response.
-  [self sendEventSuccessfully];
-  // 0.5. Generate another event to be sent.
-  [self.generator generateEvent:eventQoS];
-
-  // 0.6. Wait for the next request time.
-  if (shouldWaitForNextRequestTime) {
-    [[NSRunLoop currentRunLoop]
-        runUntilDate:[NSDate dateWithTimeIntervalSinceNow:nextRequestWaitTime + 0.5]];
-  }
-
-  // 1. Configure expectations for the 2nd request.
-  // 1.1. Set up all relevant storage expectations.
-  [self setUpStorageExpectations];
-  XCTestExpectation *hasEventsExpectation2 =
-      [self expectStorageHasEventsForTarget:self.generator.target result:YES];
-
-  // 1.2. Upload response expectation.
-  XCTestExpectation *responseSentExpectation = [self expectationTestServerSuccessRequestResponse];
-
-  // 1.3. Invert expectations if no actions expected.
-  if (!expectRequest) {
-    self.testStorage.batchIDsForTargetExpectation.inverted = YES;
-    self.testStorage.batchWithEventSelectorExpectation.inverted = YES;
-    self.testStorage.removeBatchAndDeleteEventsExpectation.inverted = YES;
-    hasEventsExpectation2.inverted = YES;
-    responseSentExpectation.inverted = YES;
-  }
-
-  self.testStorage.removeBatchWithoutDeletingEventsExpectation.inverted = YES;
-
-  // 2. Start upload 2nd time.
-  [self.uploader uploadTarget:self.generator.target withConditions:conditions];
-
-  // 3. Wait for expectations.
-  [self waitForExpectations:@[
-    self.testStorage.batchIDsForTargetExpectation, hasEventsExpectation2,
-    self.testStorage.batchWithEventSelectorExpectation, responseSentExpectation,
-    self.testStorage.removeBatchWithoutDeletingEventsExpectation,
-    self.testStorage.removeBatchAndDeleteEventsExpectation
-  ]
-                    timeout:3];
-
-  // 4. Wait for 1st upload finish.
-  [self waitForUploadOperationsToFinish:self.uploader];
-}
-
-- (nullable NSURL *)serverURLForTarget:(GDTCORTarget)target {
-  // These strings should be interleaved to construct the real URL. This is just to (hopefully)
-  // fool github URL scanning bots.
-  static NSURL *CCTServerURL;
-  static NSString *const kINTServerURL =
-      @"https://dummyapiverylong-dummy.dummy.com/dummy/api/very/long";
-  static dispatch_once_t CCTOnceToken;
-  dispatch_once(&CCTOnceToken, ^{
-    const char *p1 = "hts/frbslgiggolai.o/0clgbth";
-    const char *p2 = "tp:/ieaeogn.ogepscmvc/o/ac";
-    const char URL[54] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
-                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
-                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
-                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
-                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
-                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], '\0'};
-    CCTServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
-  });
-
-  static NSURL *FLLServerURL;
-  static dispatch_once_t FLLOnceToken;
-  dispatch_once(&FLLOnceToken, ^{
-    const char *p1 = "hts/frbslgigp.ogepscmv/ieo/eaybtho";
-    const char *p2 = "tp:/ieaeogn-agolai.o/1frlglgc/aclg";
-    const char URL[69] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
-                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
-                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
-                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
-                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
-                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], p2[26],
-                          p1[27], p2[27], p1[28], p2[28], p1[29], p2[29], p1[30], p2[30], p1[31],
-                          p2[31], p1[32], p2[32], p1[33], p2[33], '\0'};
-    FLLServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
-  });
-
-  static NSURL *CSHServerURL;
-  static dispatch_once_t CSHOnceToken;
-  dispatch_once(&CSHOnceToken, ^{
-    // These strings should be interleaved to construct the real URL. This is just to (hopefully)
-    // fool github URL scanning bots.
-    const char *p1 = "hts/cahyiseot-agolai.o/1frlglgc/aclg";
-    const char *p2 = "tp:/rsltcrprsp.ogepscmv/ieo/eaybtho";
-    const char URL[72] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
-                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
-                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
-                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
-                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
-                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], p2[26],
-                          p1[27], p2[27], p1[28], p2[28], p1[29], p2[29], p1[30], p2[30], p1[31],
-                          p2[31], p1[32], p2[32], p1[33], p2[33], p1[34], p2[34], p1[35], '\0'};
-    CSHServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
-  });
-
-  switch (target) {
-    case kGDTCORTargetCCT:
-      return CCTServerURL;
-
-    case kGDTCORTargetFLL:
-      return FLLServerURL;
-
-    case kGDTCORTargetCSH:
-      return CSHServerURL;
-
-    case kGDTCORTargetINT:
-      return [NSURL URLWithString:kINTServerURL];
-
-    default:
-      return nil;
-      break;
-  }
-}
-
-@end

+ 0 - 64
GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.h

@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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/Foundation.h>
-
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORClock.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREvent.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTargets.h"
-
-/** Generates fake stored events. Beware, this is not threadsafe and methods shouldn't be called
- * concurrently.
- */
-@interface GDTCCTEventGenerator : NSObject
-
-/** All events generated by this instance. */
-@property(nonatomic, readonly) NSMutableSet<GDTCOREvent *> *allGeneratedEvents;
-
-/** The target events will be sent to. */
-@property(nonatomic, readonly) GDTCORTarget target;
-
-- (instancetype)init NS_UNAVAILABLE;
-
-/** Instantiates an instance with the given target.
- *
- * @param target The GDT target to send events to.
- * @return An instance that generates events for the given target.
- */
-- (instancetype)initWithTarget:(GDTCORTarget)target NS_DESIGNATED_INITIALIZER;
-
-/** Generates a GDTCOREvent, complete with a file specified in the eventFileURL property.
- *
- * @param qosTier The QoS tier the event should have.
- * @return A newly allocated fake stored event.
- */
-- (GDTCOREvent *)generateEvent:(GDTCOREventQoS)qosTier;
-
-/** Generates a GDTCOREvent, complete with a file specified in the eventFileURL property.
- *
- * @param qosTier The QoS tier the event should have.
- * @param fileURL The file URL containing bytes of some event.
- * @return A newly allocated fake stored event.
- */
-- (GDTCOREvent *)generateEvent:(GDTCOREventQoS)qosTier fileURL:(NSURL *)fileURL;
-
-/** Generates five consistent stored events.
- *
- * @return An array of five newly allocated but consistent GDTCOREvents.
- */
-- (NSArray<GDTCOREvent *> *)generateTheFiveConsistentEvents;
-
-@end

+ 0 - 248
GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.m

@@ -1,248 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 "GoogleDataTransport/GDTCCTTests/Unit/Helpers/GDTCCTEventGenerator.h"
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORAssert.h"
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORPlatform.h"
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORStorageProtocol.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREventDataObject.h"
-#import "GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORTargets.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Public/GDTCOREvent+GDTCCTSupport.h"
-
-@interface GDTCCTEventGeneratorDataObject : NSObject <GDTCOREventDataObject>
-
-@property(nullable, nonatomic) NSURL *dataFile;
-
-@end
-
-@implementation GDTCCTEventGeneratorDataObject
-
-- (NSData *)transportBytes {
-  return [NSData dataWithContentsOfURL:self.dataFile];
-}
-
-@end
-
-@implementation GDTCCTEventGenerator
-
-- (instancetype)initWithTarget:(GDTCORTarget)target {
-  self = [super init];
-  if (self) {
-    _target = target;
-    _allGeneratedEvents = [[NSMutableSet alloc] init];
-  }
-  return self;
-}
-
-- (GDTCOREvent *)generateEvent:(GDTCOREventQoS)qosTier {
-  CFAbsoluteTime currentTime = CFAbsoluteTimeGetCurrent();
-  NSURL *testDataFile = [GDTCORRootDirectory()
-      URLByAppendingPathComponent:[NSString stringWithFormat:@"test-data-%lf.txt", currentTime]];
-  [[NSFileManager defaultManager] createFileAtPath:testDataFile.path
-                                          contents:[@"test" dataUsingEncoding:NSUTF8StringEncoding]
-                                        attributes:nil];
-
-  GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-  event.clockSnapshot = [GDTCORClock snapshot];
-  event.qosTier = qosTier;
-  GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-  dataObject.dataFile = testDataFile;
-  event.dataObject = dataObject;
-  event.eventCode = @(1405);
-  NSError *error;
-  id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-  [storage storeEvent:event
-           onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-             GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-           }];
-  GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-  [self.allGeneratedEvents addObject:event];
-  return event;
-}
-
-- (GDTCOREvent *)generateEvent:(GDTCOREventQoS)qosTier fileURL:(NSURL *)fileURL {
-  GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-  event.clockSnapshot = [GDTCORClock snapshot];
-  event.qosTier = qosTier;
-  GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-  dataObject.dataFile = fileURL;
-  event.dataObject = dataObject;
-  event.eventCode = @(1405);
-  NSError *error;
-  id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-  [storage storeEvent:event
-           onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-             GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-           }];
-  GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-  [self.allGeneratedEvents addObject:event];
-  return event;
-}
-
-/** Generates a file URL that has the message resource data copied into it.
- *
- * @param messageResource The message resource name to copy.
- * @return A new file containing the data of the message resource.
- */
-- (NSURL *)writeConsistentMessageToDisk:(NSString *)messageResource {
-  NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
-  NSString *filePath = [NSString stringWithFormat:@"test-data-%lf.txt", CFAbsoluteTimeGetCurrent()];
-  NSAssert([[NSFileManager defaultManager] fileExistsAtPath:filePath] == NO,
-           @"There should be no duplicate files generated.");
-  NSData *messageData = [NSData dataWithContentsOfURL:[testBundle URLForResource:messageResource
-                                                                   withExtension:nil]];
-  [messageData writeToFile:filePath atomically:YES];
-  return [NSURL fileURLWithPath:filePath];
-}
-
-- (NSArray<GDTCOREvent *> *)generateTheFiveConsistentEvents {
-  NSMutableArray<GDTCOREvent *> *events = [[NSMutableArray alloc] init];
-  {
-    GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-    event.clockSnapshot = [GDTCORClock snapshot];
-    [event.clockSnapshot setValue:@(1111111111111) forKeyPath:@"timeMillis"];
-    [event.clockSnapshot setValue:@(-25200) forKeyPath:@"timezoneOffsetSeconds"];
-    [event.clockSnapshot setValue:@(1111111111111222) forKeyPath:@"kernelBootTimeNanoseconds"];
-    [event.clockSnapshot setValue:@(1235567890) forKeyPath:@"uptimeNanoseconds"];
-    event.qosTier = GDTCOREventQosDefault;
-    event.eventCode = @1986;
-    NSError *error;
-    event.customBytes = [NSJSONSerialization dataWithJSONObject:@{
-      @"customParam" : @1337
-    }
-                                                        options:0
-                                                          error:&error];
-    GDTCORAssert(error == nil, @"There shouldn't be an issue turning into JSON");
-    NSURL *messageDataURL = [self writeConsistentMessageToDisk:@"message-32347456.dat"];
-    GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-    dataObject.dataFile = messageDataURL;
-    event.dataObject = dataObject;
-    error = nil;
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-    [storage storeEvent:event
-             onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-               GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-             }];
-    GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-    [events addObject:event];
-  }
-
-  {
-    GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-    event.clockSnapshot = [GDTCORClock snapshot];
-    [event.clockSnapshot setValue:@(1111111111111) forKeyPath:@"timeMillis"];
-    [event.clockSnapshot setValue:@(-25200) forKeyPath:@"timezoneOffsetSeconds"];
-    [event.clockSnapshot setValue:@(1111111111111333) forKeyPath:@"kernelBootTimeNanoseconds"];
-    [event.clockSnapshot setValue:@(1236567890) forKeyPath:@"uptimeNanoseconds"];
-    event.qosTier = GDTCOREventQoSWifiOnly;
-    NSURL *messageDataURL = [self writeConsistentMessageToDisk:@"message-35458880.dat"];
-    GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-    dataObject.dataFile = messageDataURL;
-    event.dataObject = dataObject;
-    event.needsNetworkConnectionInfoPopulated = YES;
-    NSError *error;
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-    [storage storeEvent:event
-             onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-               GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-             }];
-    GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-    [events addObject:event];
-  }
-
-  {
-    GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-    event.clockSnapshot = [GDTCORClock snapshot];
-    [event.clockSnapshot setValue:@(1111111111111) forKeyPath:@"timeMillis"];
-    [event.clockSnapshot setValue:@(-25200) forKeyPath:@"timezoneOffsetSeconds"];
-    [event.clockSnapshot setValue:@(1111111111111444) forKeyPath:@"kernelBootTimeNanoseconds"];
-    [event.clockSnapshot setValue:@(1237567890) forKeyPath:@"uptimeNanoseconds"];
-    event.qosTier = GDTCOREventQosDefault;
-    NSURL *messageDataURL = [self writeConsistentMessageToDisk:@"message-39882816.dat"];
-    GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-    dataObject.dataFile = messageDataURL;
-    event.dataObject = dataObject;
-    NSError *error;
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-    [storage storeEvent:event
-             onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-               GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-             }];
-    GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-    [events addObject:event];
-  }
-
-  {
-    GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-    event.clockSnapshot = [GDTCORClock snapshot];
-    [event.clockSnapshot setValue:@(1111111111111) forKeyPath:@"timeMillis"];
-    [event.clockSnapshot setValue:@(-25200) forKeyPath:@"timezoneOffsetSeconds"];
-    [event.clockSnapshot setValue:@(1111111111111555) forKeyPath:@"kernelBootTimeNanoseconds"];
-    [event.clockSnapshot setValue:@(1238567890) forKeyPath:@"uptimeNanoseconds"];
-    event.qosTier = GDTCOREventQosDefault;
-    NSError *error;
-    event.customBytes = [NSJSONSerialization dataWithJSONObject:@{@"customParam1" : @"aValue1"}
-                                                        options:0
-                                                          error:&error];
-    GDTCORAssert(error == nil, @"There shouldn't be an issue turning into JSON");
-    NSURL *messageDataURL = [self writeConsistentMessageToDisk:@"message-40043840.dat"];
-    GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-    dataObject.dataFile = messageDataURL;
-    event.dataObject = dataObject;
-    error = nil;
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-    [storage storeEvent:event
-             onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-               GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-             }];
-    GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-    [events addObject:event];
-  }
-
-  {
-    GDTCOREvent *event = [[GDTCOREvent alloc] initWithMappingID:@"1018" target:_target];
-    event.clockSnapshot = [GDTCORClock snapshot];
-    [event.clockSnapshot setValue:@(1111111111111) forKeyPath:@"timeMillis"];
-    [event.clockSnapshot setValue:@(-25200) forKeyPath:@"timezoneOffsetSeconds"];
-    [event.clockSnapshot setValue:@(1111111111111666) forKeyPath:@"kernelBootTimeNanoseconds"];
-    [event.clockSnapshot setValue:@(1239567890) forKeyPath:@"uptimeNanoseconds"];
-    event.qosTier = GDTCOREventQoSTelemetry;
-    NSError *error;
-    event.customBytes = [NSJSONSerialization dataWithJSONObject:@{
-      @"customParam2" : @(34)
-    }
-                                                        options:0
-                                                          error:&error];
-    GDTCORAssert(error == nil, @"There shouldn't be an issue turning into JSON");
-    NSURL *messageDataURL = [self writeConsistentMessageToDisk:@"message-40657984.dat"];
-    GDTCCTEventGeneratorDataObject *dataObject = [[GDTCCTEventGeneratorDataObject alloc] init];
-    dataObject.dataFile = messageDataURL;
-    event.dataObject = dataObject;
-    error = nil;
-    id<GDTCORStorageProtocol> storage = GDTCORStorageInstanceForTarget(event.target);
-    [storage storeEvent:event
-             onComplete:^(BOOL wasWritten, NSError *_Nullable error) {
-               GDTCORFatalAssert(wasWritten && error == nil, @"Writing a generated event failed.");
-             }];
-    GDTCORFatalAssert(error == nil, @"Generating an event failed: %@", error);
-    [events addObject:event];
-  }
-  return events;
-}
-
-@end

+ 0 - 65
GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.h

@@ -1,65 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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/Foundation.h>
-
-#import <GCDWebServer/GCDWebServer.h>
-#import <GCDWebServer/GCDWebServerDataResponse.h>
-#import <GCDWebServer/GCDWebServerFileResponse.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class GCDWebServerRequest;
-@class GCDWebServerResponse;
-
-typedef void (^GDTCCTTestServerRequestHandler)(GCDWebServerRequest *request,
-                                               GCDWebServerResponse *_Nullable suggestedResponse,
-                                               GCDWebServerCompletionBlock completionBlock);
-
-/** This class provides a hermetic test service that runs on the test device/simulator. */
-@interface GDTCCTTestServer : NSObject
-
-/** The URL of the server. */
-@property(nonatomic, readonly) NSURL *serverURL;
-
-/** The value will be passed to `gdt_cct_LogResponse.next_request_wait_millis`. */
-@property(nonatomic) NSTimeInterval responseNextRequestWaitTime;
-
-/** Just before responding, this block will be scheduled to run on a global queue. */
-@property(nonatomic, copy, nullable) void (^responseCompletedBlock)
-    (GCDWebServerRequest *request, GCDWebServerResponse *response);
-
-/** The provides an opportunity to overwrite or delay response to a request. */
-@property(nonatomic, copy, nullable) GDTCCTTestServerRequestHandler requestHandler;
-
-/** YES if the server is running, NO otherwise. */
-@property(nonatomic, readonly) BOOL isRunning;
-
-/** Registers the /logBatch path, which responds with some JSON. */
-- (void)registerLogBatchPath;
-
-/** Registers the /logRedirect30(1|2|7) paths, which responds with a redirect to /logBatch. */
-- (void)registerRedirectPaths;
-
-/** Starts the server. Can be called after calling `-stop`. */
-- (void)start;
-
-/** Stops the server. */
-- (void)stop;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 184
GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.m

@@ -1,184 +0,0 @@
-/*
- * Copyright 2019 Google
- *
- * 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 "GoogleDataTransport/GDTCCTTests/Unit/TestServer/GDTCCTTestServer.h"
-
-#import "GoogleDataTransport/GDTCORLibrary/Internal/GDTCORAssert.h"
-
-#import <nanopb/pb_decode.h>
-#import <nanopb/pb_encode.h>
-
-#import "GoogleDataTransport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
-
-#import "GoogleDataTransport/GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"
-
-@interface GDTCCTTestServer ()
-
-/** The server object. */
-@property(nonatomic) GCDWebServer *server;
-
-// Redeclare as readwrite and mutable.
-@property(nonatomic, readwrite) NSMutableDictionary<NSString *, NSURL *> *registeredTestPaths;
-
-@end
-
-@implementation GDTCCTTestServer
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    [GCDWebServer setLogLevel:3];
-    _server = [[GCDWebServer alloc] init];
-    _registeredTestPaths = [[NSMutableDictionary alloc] init];
-    _responseNextRequestWaitTime = 42.42;
-  }
-  return self;
-}
-
-- (void)dealloc {
-  if (_server.isRunning) {
-    [_server stop];
-  }
-}
-
-- (void)start {
-  GDTCORAssert(self.server.isRunning == NO, @"The server should not be already running.");
-  NSError *error;
-  [self.server
-      startWithOptions:@{GCDWebServerOption_Port : @0, GCDWebServerOption_BindToLocalhost : @YES}
-                 error:&error];
-  GDTCORAssert(error == nil, @"Error when starting server: %@", error);
-}
-
-- (void)stop {
-  GDTCORAssert(self.server.isRunning, @"The server should be running before stopping.");
-  [self.server stop];
-}
-
-- (BOOL)isRunning {
-  return [self.server isRunning];
-}
-
-- (NSURL *)serverURL {
-  return _server.serverURL;
-}
-
-#pragma mark - Private helper methods
-
-/** Constructs a nanopb LogResponse object, serializes it to NSData, and returns it.
- *
- * @return NSData respresenting a LogResponse with a next_request_wait_millis of 42424 milliseconds.
- */
-- (NSData *)responseData {
-  gdt_cct_LogResponse logResponse = gdt_cct_LogResponse_init_default;
-  logResponse.next_request_wait_millis = self.responseNextRequestWaitTime * 1000;
-  logResponse.has_next_request_wait_millis = 1;
-
-  pb_ostream_t sizestream = PB_OSTREAM_SIZING;
-  // Encode 1 time to determine the size.
-  if (!pb_encode(&sizestream, gdt_cct_LogResponse_fields, &logResponse)) {
-    GDTCORAssert(NO, @"Error in nanopb encoding for size: %s", PB_GET_ERROR(&sizestream));
-  }
-
-  // Encode a 2nd time to actually get the bytes from it.
-  size_t bufferSize = sizestream.bytes_written;
-  CFMutableDataRef dataRef = CFDataCreateMutable(CFAllocatorGetDefault(), bufferSize);
-  CFDataSetLength(dataRef, bufferSize);
-  pb_ostream_t ostream = pb_ostream_from_buffer((void *)CFDataGetBytePtr(dataRef), bufferSize);
-  if (!pb_encode(&ostream, gdt_cct_LogResponse_fields, &logResponse)) {
-    GDTCORAssert(NO, @"Error in nanopb encoding for bytes: %s", PB_GET_ERROR(&ostream));
-  }
-  pb_release(gdt_cct_LogResponse_fields, &logResponse);
-  return CFBridgingRelease(dataRef);
-}
-
-#pragma mark - HTTP Path handling methods
-
-- (void)registerLogBatchPath {
-  __auto_type __weak weakSelf = self;
-  [self.server addHandlerForMethod:@"POST"
-                              path:@"/logBatch"
-                      requestClass:[GCDWebServerRequest class]
-                 asyncProcessBlock:^(__kindof GCDWebServerRequest *_Nonnull request,
-                                     GCDWebServerCompletionBlock _Nonnull completionBlock) {
-                   if (!weakSelf) {
-                     return;
-                   }
-                   __auto_type self = weakSelf;
-
-                   GCDWebServerDataResponse *response =
-                       [[GCDWebServerDataResponse alloc] initWithData:[self responseData]
-                                                          contentType:@"application/text"];
-                   response.gzipContentEncodingEnabled = YES;
-
-                   GCDWebServerCompletionBlock completionWithHook =
-                       ^(GCDWebServerResponse *_Nullable response) {
-                         if (self.responseCompletedBlock) {
-                           self.responseCompletedBlock(request, response);
-                         }
-                         completionBlock(response);
-                       };
-
-                   if (self.requestHandler) {
-                     self.requestHandler(request, response, completionWithHook);
-                   } else {
-                     completionWithHook(response);
-                   }
-                 }];
-}
-
-- (void)registerRedirectPaths {
-  id processBlock301 = ^GCDWebServerResponse *(__kindof GCDWebServerRequest *request) {
-    NSURL *redirectURL = [self->_server.serverURL URLByAppendingPathComponent:@"logBatch"];
-    GCDWebServerResponse *response = [GCDWebServerResponse responseWithRedirect:redirectURL
-                                                                      permanent:NO];
-    response.statusCode = 301;
-    response.gzipContentEncodingEnabled = YES;
-    return response;
-  };
-  [self.server addHandlerForMethod:@"POST"
-                              path:@"/logRedirect301"
-                      requestClass:[GCDWebServerRequest class]
-                      processBlock:processBlock301];
-
-  id processBlock302 = ^GCDWebServerResponse *(__kindof GCDWebServerRequest *request) {
-    NSURL *redirectURL = [self->_server.serverURL URLByAppendingPathComponent:@"logBatch"];
-    GCDWebServerResponse *response = [GCDWebServerResponse responseWithRedirect:redirectURL
-                                                                      permanent:NO];
-    response.statusCode = 302;
-    response.gzipContentEncodingEnabled = YES;
-    return response;
-  };
-  [self.server addHandlerForMethod:@"POST"
-                              path:@"/logRedirect302"
-                      requestClass:[GCDWebServerRequest class]
-                      processBlock:processBlock302];
-
-  id processBlock307 = ^GCDWebServerResponse *(__kindof GCDWebServerRequest *request) {
-    NSURL *redirectURL = [self->_server.serverURL URLByAppendingPathComponent:@"logBatch"];
-    GCDWebServerResponse *response = [GCDWebServerResponse responseWithRedirect:redirectURL
-                                                                      permanent:NO];
-    response.statusCode = 307;
-    response.gzipContentEncodingEnabled = YES;
-    return response;
-  };
-  [self.server addHandlerForMethod:@"POST"
-                              path:@"/logRedirect307"
-                      requestClass:[GCDWebServerRequest class]
-                      processBlock:processBlock307];
-}
-
-@end

+ 0 - 31
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTServiceExtension/Info.plist

@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>$(DEVELOPMENT_LANGUAGE)</string>
-	<key>CFBundleDisplayName</key>
-	<string>GDTCCTServiceExtension</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>NSExtension</key>
-	<dict>
-		<key>NSExtensionPointIdentifier</key>
-		<string>com.apple.usernotifications.service</string>
-		<key>NSExtensionPrincipalClass</key>
-		<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
-	</dict>
-</dict>
-</plist>

+ 0 - 69
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTServiceExtension/NotificationService.swift

@@ -1,69 +0,0 @@
-/*
- * 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 UserNotifications
-import FirebaseMessaging
-import GoogleDataTransport
-
-class NotificationService: UNNotificationServiceExtension {
-  var contentHandler: ((UNNotificationContent) -> Void)?
-  var bestAttemptContent: UNMutableNotificationContent?
-
-  var transport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                   target: GDTCORTarget.FLL)!
-
-  override func didReceive(_ request: UNNotificationRequest,
-                           withContentHandler contentHandler: @escaping (UNNotificationContent)
-                             -> Void) {
-    self.contentHandler = contentHandler
-    bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
-
-    if let bestAttemptContent = bestAttemptContent {
-      // Modify the notification content here...
-      bestAttemptContent.title = "\(bestAttemptContent.title) [High]"
-
-      // Please generate high priority event in notification service extension
-      print("Generating high priority event on watchOS notification service extension")
-      let transportToUse = transport
-      let event: GDTCOREvent = transportToUse.eventForTransport()
-      let testMessage = FirelogTestMessageHolder()
-      testMessage.root.identifier = "watchos_test_app_service_extension_high_priority_event"
-      testMessage.root.repeatedID = ["id1", "id2", "id3"]
-      testMessage.root.warriorChampionships = 1337
-      event.qosTier = GDTCOREventQoS.qoSFast
-      event.dataObject = testMessage
-      let encoder = JSONEncoder()
-      if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-        event.customBytes = jsonData
-      }
-      transportToUse.sendDataEvent(event)
-
-      bestAttemptContent.title = "\(bestAttemptContent.title) [Priority Event]"
-
-      Messaging.serviceExtension()
-        .populateNotificationContent(bestAttemptContent, withContentHandler: self.contentHandler!)
-    }
-  }
-
-  override func serviceExtensionTimeWillExpire() {
-    // Called just before the extension will be terminated by the system.
-    // Use this as an opportunity to deliver your "best attempt" at modified content.
-    // Otherwise the original push payload will be used.
-    if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
-      contentHandler(bestAttemptContent)
-    }
-  }
-}

+ 0 - 81
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,81 +0,0 @@
-{
-  "images" : [
-    {
-      "size" : "24x24",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "notificationCenter",
-      "subtype" : "38mm"
-    },
-    {
-      "size" : "27.5x27.5",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "notificationCenter",
-      "subtype" : "42mm"
-    },
-    {
-      "size" : "29x29",
-      "idiom" : "watch",
-      "role" : "companionSettings",
-      "scale" : "2x"
-    },
-    {
-      "size" : "29x29",
-      "idiom" : "watch",
-      "role" : "companionSettings",
-      "scale" : "3x"
-    },
-    {
-      "size" : "40x40",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "appLauncher",
-      "subtype" : "38mm"
-    },
-    {
-      "size" : "44x44",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "appLauncher",
-      "subtype" : "40mm"
-    },
-    {
-      "size" : "50x50",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "appLauncher",
-      "subtype" : "44mm"
-    },
-    {
-      "size" : "86x86",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "quickLook",
-      "subtype" : "38mm"
-    },
-    {
-      "size" : "98x98",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "quickLook",
-      "subtype" : "42mm"
-    },
-    {
-      "size" : "108x108",
-      "idiom" : "watch",
-      "scale" : "2x",
-      "role" : "quickLook",
-      "subtype" : "44mm"
-    },
-    {
-      "idiom" : "watch-marketing",
-      "size" : "1024x1024",
-      "scale" : "1x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Assets.xcassets/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 78
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Base.lproj/Interface.storyboard

@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="15702" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
-    <device id="watch40"/>
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="15501"/>
-    </dependencies>
-    <scenes>
-        <!--Interface Controller-->
-        <scene sceneID="aou-V4-d1y">
-            <objects>
-                <controller id="AgC-eL-Hgc" customClass="InterfaceController" customModule="GDTCCTWatchOSCompanionTestAppExtension">
-                    <items>
-                        <label alignment="left" text="GDTCCT WatchOS" id="enM-ff-MSy"/>
-                        <label alignment="left" text="Companion App" id="OLR-hF-Agn"/>
-                        <button width="1" alignment="left" title="Generate data event" id="dEM-Z3-j9g">
-                            <connections>
-                                <action selector="generateDataEventCompanionWithSender:" destination="AgC-eL-Hgc" id="RMn-3g-t3b"/>
-                            </connections>
-                        </button>
-                        <button width="1" alignment="left" title="Generate telemetry event" id="gTg-To-hfh">
-                            <connections>
-                                <action selector="generateTelemetryEventCompanionWithSender:" destination="AgC-eL-Hgc" id="lfu-Y3-vLm"/>
-                            </connections>
-                        </button>
-                        <button width="1" alignment="left" title="Generate high priority event(force uploads)" id="5Xn-k8-nuY">
-                            <connections>
-                                <action selector="generateHighPriorityEventCompanionWithSender:" destination="AgC-eL-Hgc" id="1FC-XA-3lG"/>
-                            </connections>
-                        </button>
-                        <button width="1" alignment="left" title="Generate wifi only event" id="bLI-vr-mjx">
-                            <connections>
-                                <action selector="generateWifiOnlyEventCompanionWithSender:" destination="AgC-eL-Hgc" id="eyP-kf-ntj"/>
-                            </connections>
-                        </button>
-                        <button width="1" alignment="left" title="Generate daily event" id="CP1-1N-rkd">
-                            <connections>
-                                <action selector="generateDailyEventCompanionWithSender:" destination="AgC-eL-Hgc" id="8a4-di-RWZ"/>
-                            </connections>
-                        </button>
-                    </items>
-                </controller>
-            </objects>
-            <point key="canvasLocation" x="220" y="345"/>
-        </scene>
-        <!--Static Notification Interface Controller-->
-        <scene sceneID="AEw-b0-oYE">
-            <objects>
-                <notificationController id="YCC-NB-fut">
-                    <items>
-                        <label alignment="left" text="Alert Label" numberOfLines="0" id="IdU-wH-bcW"/>
-                    </items>
-                    <notificationCategory key="notificationCategory" identifier="myCategory" id="JfB-70-Muf"/>
-                    <connections>
-                        <outlet property="notificationAlertLabel" destination="IdU-wH-bcW" id="JKC-fr-R95"/>
-                        <segue destination="4sK-HA-Art" kind="relationship" relationship="dynamicNotificationInterface" id="kXh-Jw-8B1"/>
-                        <segue destination="eXb-UN-Cd0" kind="relationship" relationship="dynamicInteractiveNotificationInterface" id="mpB-YA-K8N"/>
-                    </connections>
-                </notificationController>
-            </objects>
-            <point key="canvasLocation" x="220" y="643"/>
-        </scene>
-        <!--Notification Controller-->
-        <scene sceneID="ZPc-GJ-vnh">
-            <objects>
-                <controller id="4sK-HA-Art" customClass="NotificationController" customModule="GDTCCTWatchOSCompanionTestApp" customModuleProvider="target"/>
-            </objects>
-            <point key="canvasLocation" x="468" y="643"/>
-        </scene>
-        <!--Notification Controller-->
-        <scene sceneID="Niz-AI-uX2">
-            <objects>
-                <controller id="eXb-UN-Cd0" customClass="NotificationController" customModule="GDTCCTWatchOSCompanionTestApp" customModuleProvider="target"/>
-            </objects>
-            <point key="canvasLocation" x="468" y="345"/>
-        </scene>
-    </scenes>
-</document>

+ 0 - 33
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestApp/Info.plist

@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>$(DEVELOPMENT_LANGUAGE)</string>
-	<key>CFBundleDisplayName</key>
-	<string>GDTCCTiOSTestAppForCompanionWatchApp</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-	</array>
-	<key>WKCompanionAppBundleIdentifier</key>
-	<string>GoogleDataTransport.GDTCCTiOSTestAppForCompanionWatchApp</string>
-	<key>WKWatchKitApp</key>
-	<true/>
-</dict>
-</plist>

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 48
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Contents.json

@@ -1,48 +0,0 @@
-{
-  "assets" : [
-    {
-      "idiom" : "watch",
-      "filename" : "Circular.imageset",
-      "role" : "circular"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Extra Large.imageset",
-      "role" : "extra-large"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Graphic Bezel.imageset",
-      "role" : "graphic-bezel"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Graphic Circular.imageset",
-      "role" : "graphic-circular"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Graphic Corner.imageset",
-      "role" : "graphic-corner"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Graphic Large Rectangular.imageset",
-      "role" : "graphic-large-rectangular"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Modular.imageset",
-      "role" : "modular"
-    },
-    {
-      "idiom" : "watch",
-      "filename" : "Utilitarian.imageset",
-      "role" : "utilitarian"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 28
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json

@@ -1,28 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : "<=145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">161"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">145"
-    },
-    {
-      "idiom" : "watch",
-      "scale" : "2x",
-      "screen-width" : ">183"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 6
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Assets.xcassets/Contents.json

@@ -1,6 +0,0 @@
-{
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

+ 0 - 19
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/ExtensionDelegate.swift

@@ -1,19 +0,0 @@
-/*
- * 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 WatchKit
-
-class ExtensionDelegate: NSObject, WKExtensionDelegate {}

+ 0 - 36
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/Info.plist

@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>$(DEVELOPMENT_LANGUAGE)</string>
-	<key>CFBundleDisplayName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundleExecutable</key>
-	<string>$(EXECUTABLE_NAME)</string>
-	<key>CFBundleIdentifier</key>
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
-	<key>CFBundlePackageType</key>
-	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>NSExtension</key>
-	<dict>
-		<key>NSExtensionAttributes</key>
-		<dict>
-			<key>WKAppBundleIdentifier</key>
-			<string>GoogleDataTransport.GDTCCTiOSTestAppForCompanionWatchApp.watchkitapp</string>
-		</dict>
-		<key>NSExtensionPointIdentifier</key>
-		<string>com.apple.watchkit</string>
-	</dict>
-	<key>WKExtensionDelegateClassName</key>
-	<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
-</dict>
-</plist>

+ 0 - 133
GoogleDataTransport/GDTCCTWatchOSTestApp/GDTCCTWatchOSCompanionTestAppExtension/InterfaceController.swift

@@ -1,133 +0,0 @@
-/*
- * 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 WatchKit
-import Foundation
-import GoogleDataTransport
-
-class InterfaceController: WKInterfaceController {
-  var transport: GDTCORTransport = GDTCORTransport(mappingID: "1018", transformers: nil,
-                                                   target: GDTCORTarget.FLL)!
-
-  override func awake(withContext context: Any?) {
-    super.awake(withContext: context)
-    // Configure interface objects here.
-  }
-
-  override func willActivate() {
-    // This method is called when watch view controller is about to be visible to user
-    super.willActivate()
-  }
-
-  override func didDeactivate() {
-    // This method is called when watch view controller is no longer visible
-    super.didDeactivate()
-  }
-
-  @IBAction func generateDataEventCompanion(sender: AnyObject?) {
-    print("Generating data event on Companion watch app")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "watchos_companion_test_app_data_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 1_111_110
-    testMessage.root.subMessage.starTrekData = "technoBabble".data(using: String.Encoding.utf8)!
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-      SubMessageTwo(),
-    ]
-    testMessage.root.subMessage.repeatedSubMessage[0].samplingPercentage = 13.37
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateTelemetryEventCompanion(sender: AnyObject?) {
-    print("Generating telemetry event on Companion watch app")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "watchos_companion_test_app_telemetry_event"
-    testMessage.root.warriorChampionships = 1000
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-    ]
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendTelemetryEvent(event)
-  }
-
-  @IBAction func generateHighPriorityEventCompanion(sender: AnyObject?) {
-    print("Generating high priority event on Companion watch app")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "watchos_companion_test_app_high_priority_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 1337
-    event.qosTier = GDTCOREventQoS.qoSFast
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateWifiOnlyEventCompanion(sender: AnyObject?) {
-    print("Generating wifi only event on Companion watch app")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "watchos_companion_test_app_wifi_only_event"
-    event.qosTier = GDTCOREventQoS.qoSWifiOnly
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-
-  @IBAction func generateDailyEventCompanion(sender: AnyObject?) {
-    print("Generating daily only event on Companion watch app")
-    let transportToUse = transport
-    let event: GDTCOREvent = transportToUse.eventForTransport()
-    let testMessage = FirelogTestMessageHolder()
-    testMessage.root.identifier = "watchos_companion_test_app_daily_event"
-    testMessage.root.repeatedID = ["id1", "id2", "id3"]
-    testMessage.root.warriorChampionships = 9001
-    testMessage.root.subMessage.starTrekData = "engage!".data(using: String.Encoding.utf8)!
-    testMessage.root.subMessage.repeatedSubMessage = [
-      SubMessageTwo(),
-    ]
-    testMessage.root.subMessage.repeatedSubMessage[0].samplingPercentage = 100.0
-    event.qosTier = GDTCOREventQoS.qoSDaily
-    event.dataObject = testMessage
-    let encoder = JSONEncoder()
-    if let jsonData = try? encoder.encode(["needs_network_connection_info": true]) {
-      event.customBytes = jsonData
-    }
-    transportToUse.sendDataEvent(event)
-  }
-}

Неке датотеке нису приказане због велике количине промена