Kaynağa Gözat

[Infra] Remove CoreDiagnostics library and references (#10259)

* [Infra] Remove CoreDiagnostics library and references

* Style localize_podfile.swift

* Add GDT to SharedTestUtils

* Update GoogleUtilities.cmake config

* Run all CI

* Update GoogleUtilities.cmake config (2)

* Resolve FIRApp.m TODO

* [skip ci] Revert Gemfile
Nick Cooke 3 yıl önce
ebeveyn
işleme
43c62f0526
58 değiştirilmiş dosya ile 18 ekleme ve 2610 silme
  1. 0 85
      .github/workflows/core-diagnostics.yml
  2. 0 1
      .github/workflows/core.yml
  3. 0 1
      CMakeLists.txt
  4. 0 1
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile
  5. 0 1
      CoreOnly/NOTICES
  6. 0 4
      CoreOnly/Tests/FirebasePodTest/FirebasePodTest.xcodeproj/project.pbxproj
  7. 0 2
      CoreOnly/Tests/FirebasePodTest/Podfile
  8. 0 1
      Dangerfile
  9. 0 333
      Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m
  10. 0 1
      Example/tvOSSample/Podfile
  11. 0 1
      Example/watchOSSample/Podfile
  12. 0 33
      Firebase/CoreDiagnostics/CHANGELOG.md
  13. 0 551
      Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m
  14. 0 60
      Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.c
  15. 0 193
      Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h
  16. 0 18
      Firebase/CoreDiagnostics/FIRCDLibrary/Public/FIRCoreDiagnostics.h
  17. 0 35
      Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.options
  18. 0 89
      Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.proto
  19. 0 56
      Firebase/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh
  20. 0 323
      Firebase/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py
  21. 0 221
      Firebase/CoreDiagnostics/ProtoSupport/nanopb_proto_generator.py
  22. 0 25
      Firebase/CoreDiagnostics/generate_project.sh
  23. 0 1
      FirebaseAppCheck/Apps/FIRAppCheckTestApp/Podfile
  24. 0 1
      FirebaseAuth/Tests/Sample/Podfile
  25. 1 3
      FirebaseCore.podspec
  26. 0 1
      FirebaseCore/CMakeLists.txt
  27. 0 35
      FirebaseCore/Extension/FIRCoreDiagnosticsConnector.h
  28. 0 1
      FirebaseCore/Extension/FirebaseCoreInternal.h
  29. 0 29
      FirebaseCore/Sources/FIRApp.m
  30. 0 61
      FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m
  31. 0 35
      FirebaseCore/Sources/FIRDiagnosticsData.h
  32. 0 66
      FirebaseCore/Sources/FIRDiagnosticsData.m
  33. 1 38
      FirebaseCore/Tests/Unit/FIRAppTest.m
  34. 0 48
      FirebaseCore/Tests/Unit/FIRDiagnosticsDataTest.m
  35. 0 78
      FirebaseCoreDiagnostics.podspec
  36. 0 1
      FirebaseDynamicLinks/Tests/Sample/Podfile
  37. 0 1
      FirebaseInAppMessaging/Swift/Tests/Integration/FIAMSwiftUI/Podfile
  38. 0 1
      FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/Podfile
  39. 0 1
      FirebaseInAppMessaging/Tests/Integration/FunctionalTestApp/Podfile
  40. 0 1
      FirebaseMLModelDownloader/Apps/Sample/Podfile
  41. 0 1
      FirebaseMessaging/Apps/AdvancedSample/Podfile
  42. 0 1
      FirebaseMessaging/Apps/Sample/Podfile
  43. 0 1
      FirebaseMessaging/Apps/SwiftUISample/Podfile
  44. 0 2
      FirebasePerformance/Tests/FIRPerfE2E/Podfile
  45. 0 1
      FirebaseRemoteConfig/Tests/Sample/Podfile
  46. 0 1
      FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile
  47. 0 2
      Firestore/Example/Podfile
  48. 0 3
      Interop/CoreDiagnostics/CHANGELOG.md
  49. 0 27
      Interop/CoreDiagnostics/CMakeLists.txt
  50. 0 61
      Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h
  51. 0 34
      Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h
  52. 2 18
      Package.swift
  53. 0 1
      SymbolCollisionTest/Podfile
  54. 10 3
      cmake/external/GoogleUtilities.cmake
  55. 0 1
      scripts/check_imports.swift
  56. 0 1
      scripts/check_whitespace.sh
  57. 1 11
      scripts/health_metrics/file_patterns.json
  58. 3 4
      scripts/localize_podfile.swift

+ 0 - 85
.github/workflows/core-diagnostics.yml

@@ -1,85 +0,0 @@
-name: core-diagnostics
-
-on:
-  pull_request:
-    paths:
-    - 'Firebase/CoreDiagnostics/**'
-    - 'Example/CoreDiagnostics/**'
-    - 'Interop/CoreDiagnostics/Public/*.h'
-    - '.github/workflows/core-diagnostics.yml'
-    - 'Gemfile*'
-  schedule:
-    # Run every day at 12am (PST) - cron uses UTC times
-    - cron:  '0 8 * * *'
-
-concurrency:
-    group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
-    cancel-in-progress: true
-
-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-12
-
-    strategy:
-      matrix:
-        target: [ios, tvos, macos]
-    steps:
-    - uses: actions/checkout@v2
-    - uses: ruby/setup-ruby@v1
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: Build and test
-      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }}
-
-  spm:
-    # 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-12
-    steps:
-    - uses: actions/checkout@v2
-    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
-      with:
-        cache_key: ${{ matrix.os }}
-    - name: Initialize xcodebuild
-      run: scripts/setup_spm_tests.sh
-    - name: iOS Unit Tests
-      run: scripts/third_party/travis/retry.sh ./scripts/build.sh CoreUnit iOS spm
-
-  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-12
-    steps:
-    - uses: actions/checkout@v2
-    - uses: mikehardy/buildcache-action@50738c6c77de7f34e66b870e4f8ede333b69d077
-      with:
-        cache_key: ${{ matrix.os }}
-    - uses: ruby/setup-ruby@v1
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: Setup project and Build Catalyst
-      run: scripts/test_catalyst.sh FirebaseCoreDiagnostics test FirebaseCoreDiagnostics-Unit-unit
-
-  corediagnostics-cron-only:
-    # Don't run on private repo.
-    if: github.event_name == 'schedule' && github.repository == 'Firebase/firebase-ios-sdk'
-
-    runs-on: macos-12
-    strategy:
-      matrix:
-        target: [ios, tvos, macos]
-        flags: [
-          '--use-static-frameworks'
-        ]
-    needs: pod-lib-lint
-    steps:
-    - uses: actions/checkout@v2
-    - uses: ruby/setup-ruby@v1
-    - name: Setup Bundler
-      run: scripts/setup_bundler.sh
-    - name: PodLibLint CoreDiagnostics Cron
-      run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}

+ 0 - 1
.github/workflows/core.yml

@@ -4,7 +4,6 @@ on:
   pull_request:
     paths:
     - 'FirebaseCore**'
-    - 'Interop/CoreDiagnostics/Public/*.h'
     - '.github/workflows/core.yml'
     - 'Gemfile*'
   schedule:

+ 0 - 1
CMakeLists.txt

@@ -293,4 +293,3 @@ add_subdirectory(FirebaseAppCheck/Interop)
 add_subdirectory(FirebaseCore)
 add_subdirectory(Firestore)
 add_subdirectory(FirebaseAuth/Interop)
-add_subdirectory(Interop/CoreDiagnostics)

+ 0 - 1
CocoapodsIntegrationTest/TestEnvironments/Cocoapods_multiprojects_frameworks/Podfile

@@ -12,7 +12,6 @@ target 'CocoapodsIntegrationTest' do
   pod 'FirebaseAppDistribution', :path => '../'
   pod 'FirebaseAppCheckInterop', :path => '../'
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
   pod 'FirebaseCoreExtension', :path => '../'
   pod 'FirebaseCoreInternal', :path => '../'
   pod 'FirebaseCrashlytics', :path => '../'

+ 0 - 1
CoreOnly/NOTICES

@@ -261,7 +261,6 @@ FirebaseAppDistribution
 FirebaseAuth
 FirebaseAuthInterop
 FirebaseCore
-FirebaseCoreDiagnostics
 FirebaseCoreExtension
 FirebaseCoreInternal
 FirebaseDatabaseSwift

+ 0 - 4
CoreOnly/Tests/FirebasePodTest/FirebasePodTest.xcodeproj/project.pbxproj

@@ -297,14 +297,12 @@
 					"$(inherited)",
 					../../../CoreOnly/Sources,
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstanceID/FirebaseInstanceID.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
 					"\"${PODS_ROOT}/Headers/Public\"",
 					"\"${PODS_ROOT}/Headers/Public/Firebase\"",
-					"\"${PODS_ROOT}/Headers/Public/FirebaseCoreDiagnosticsInterop\"",
 				);
 				INFOPLIST_FILE = FirebasePodTest/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -327,14 +325,12 @@
 					"$(inherited)",
 					../../../CoreOnly/Sources,
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstanceID/FirebaseInstanceID.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities.framework/Headers\"",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
 					"\"${PODS_ROOT}/Headers/Public\"",
 					"\"${PODS_ROOT}/Headers/Public/Firebase\"",
-					"\"${PODS_ROOT}/Headers/Public/FirebaseCoreDiagnosticsInterop\"",
 				);
 				INFOPLIST_FILE = FirebasePodTest/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (

+ 0 - 2
CoreOnly/Tests/FirebasePodTest/Podfile

@@ -15,7 +15,6 @@ target 'FirebasePodTest' do
   pod 'FirebaseAppDistribution', :path => '../../../'
   pod 'FirebaseAuth', :path => '../../../'
   pod 'FirebaseCore', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseCrashlytics', :path => '../../../'
   pod 'FirebaseDatabase', :path => '../../../'
   pod 'FirebaseDynamicLinks', :path => '../../../'
@@ -34,7 +33,6 @@ target 'FirebasePodTest' do
   pod 'FirebaseAppCheckInterop', :path => '../../../'
   pod 'FirebaseAuthInterop', :path => '../../../'
   pod 'FirebaseMessagingInterop', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
   pod 'FirebaseCoreExtension', :path => '../../../'
   pod 'FirebaseSharedSwift', :path => '../../../'

+ 0 - 1
Dangerfile

@@ -93,7 +93,6 @@ has_license_changes = didModify(["LICENSE"])
 @has_auth_api_changes = hasChangesIn("FirebaseAuth/Sources/Public/")
 @has_core_changes = hasChangesIn([
   "FirebaseCore",
-  "Firebase/CoreDiagnostics/",
   "CoreOnly/"])
 @has_core_api_changes = hasChangesIn("FirebaseCore/Sources/Public/")
 @has_crashlytics_changes = hasChangesIn("Crashlytics")

+ 0 - 333
Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m

@@ -1,333 +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>
-#if TARGET_OS_IOS || TARGET_OS_TV
-#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 "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
-#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"
-
-#import "Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h"
-
-extern NSString *const kFIRLastCheckinDateKey;
-
-static NSString *const kGoogleAppID = @"1:123:ios:123abc";
-static NSString *const kBundleID = @"com.google.FirebaseSDKTests";
-static NSString *const kLibraryVersionID = @"1.2.3";
-static NSString *const kFIRCoreDiagnosticsHeartbeatTag = @"FIRCoreDiagnostics";
-
-#pragma mark - Testing interfaces
-
-@interface FIRCoreDiagnostics : NSObject
-// Initialization.
-+ (instancetype)sharedInstance;
-- (instancetype)initWithTransport:(GDTCORTransport *)transport
-             heartbeatDateStorage:(GULHeartbeatDateStorage *)heartbeatDateStorage;
-
-// Properties.
-@property(nonatomic, readonly) dispatch_queue_t diagnosticsQueue;
-@property(nonatomic, readonly) GDTCORTransport *transport;
-@property(nonatomic, readonly) GULHeartbeatDateStorage *heartbeatDateStorage;
-
-// Install string helpers.
-+ (NSString *)installString;
-+ (BOOL)writeString:(NSString *)string toURL:(NSURL *)filePathURL;
-+ (NSString *)stringAtURL:(NSURL *)filePathURL;
-
-// Metadata helpers.
-+ (NSString *)deviceModel;
-
-// nanopb helper functions.
-extern pb_bytes_array_t *FIREncodeString(NSString *string);
-extern pb_bytes_array_t *FIREncodeData(NSData *data);
-extern logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType FIRMapFromServiceStringToTypeEnum(
-    NSString *serviceString);
-
-// Proto population functions.
-extern void FIRPopulateProtoWithInfoFromUserInfoParams(
-    logs_proto_mobilesdk_ios_ICoreConfiguration *config,
-    NSDictionary<NSString *, id> *diagnosticObjects);
-extern void FIRPopulateProtoWithCommonInfoFromApp(
-    logs_proto_mobilesdk_ios_ICoreConfiguration *config,
-    NSDictionary<NSString *, id> *diagnosticObjects);
-extern void FIRPopulateProtoWithInstalledServices(
-    logs_proto_mobilesdk_ios_ICoreConfiguration *config);
-extern void FIRPopulateProtoWithNumberOfLinkedFrameworks(
-    logs_proto_mobilesdk_ios_ICoreConfiguration *config);
-extern void FIRPopulateProtoWithInfoPlistValues(
-    logs_proto_mobilesdk_ios_ICoreConfiguration *config);
-
-// FIRCoreDiagnosticsInterop.
-+ (void)sendDiagnosticsData:(nonnull id<FIRCoreDiagnosticsData>)diagnosticsData;
-- (void)sendDiagnosticsData:(nonnull id<FIRCoreDiagnosticsData>)diagnosticsData;
-
-@end
-
-#pragma mark - Testing classes
-
-@interface FIRCoreDiagnosticsTestData : NSObject <FIRCoreDiagnosticsData>
-
-@end
-
-@implementation FIRCoreDiagnosticsTestData
-
-@synthesize diagnosticObjects = _diagnosticObjects;
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    _diagnosticObjects =
-        @{kFIRCDGoogleAppIDKey : kGoogleAppID, @"BUNDLE_ID" : kBundleID, kFIRCDllAppsCountKey : @1};
-  }
-  return self;
-}
-
-@end
-
-@interface FIRCoreDiagnosticsLog : NSObject <GDTCOREventDataObject>
-
-@property(nonatomic) logs_proto_mobilesdk_ios_ICoreConfiguration config;
-
-- (instancetype)initWithConfig:(logs_proto_mobilesdk_ios_ICoreConfiguration)config;
-
-@end
-
-#pragma mark - Tests
-
-@interface FIRCoreDiagnosticsTest : XCTestCase
-
-@property(nonatomic) id optionsInstanceMock;
-@property(nonatomic) NSDictionary<NSString *, id> *expectedUserInfo;
-@property(nonatomic) FIRCoreDiagnostics *diagnostics;
-@property(nonatomic) id mockDateStorage;
-@property(nonatomic) id mockTransport;
-
-@end
-
-@implementation FIRCoreDiagnosticsTest
-
-- (void)setUp {
-  [super setUp];
-
-  self.mockTransport = OCMClassMock([GDTCORTransport class]);
-  OCMStub([self.mockTransport eventForTransport])
-      .andReturn([[GDTCOREvent alloc] initWithMappingID:@"111" target:2]);
-
-  self.mockDateStorage = OCMClassMock([GULHeartbeatDateStorage class]);
-  self.diagnostics = [[FIRCoreDiagnostics alloc] initWithTransport:self.mockTransport
-                                              heartbeatDateStorage:self.mockDateStorage];
-}
-
-- (void)tearDown {
-  self.diagnostics = nil;
-  self.mockTransport = nil;
-  self.mockDateStorage = nil;
-  [super tearDown];
-}
-
-/** Tests populating the proto correctly. */
-- (void)testProtoPopulation {
-  logs_proto_mobilesdk_ios_ICoreConfiguration icoreConfiguration =
-      logs_proto_mobilesdk_ios_ICoreConfiguration_init_default;
-  FIRPopulateProtoWithCommonInfoFromApp(&icoreConfiguration, @{
-    kFIRCDllAppsCountKey : @1,
-    kFIRCDGoogleAppIDKey : kGoogleAppID,
-    kFIRCDBundleIDKey : kBundleID,
-    kFIRCDLibraryVersionIDKey : kLibraryVersionID,
-    kFIRCDUsingOptionsFromDefaultPlistKey : @YES
-  });
-  icoreConfiguration.using_gdt = 1;
-  icoreConfiguration.has_using_gdt = 1;
-  FIRPopulateProtoWithInfoPlistValues(&icoreConfiguration);
-  icoreConfiguration.configuration_type =
-      logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_CORE;
-
-  logs_proto_mobilesdk_ios_ICoreConfiguration icoreExpectedConfiguration =
-      logs_proto_mobilesdk_ios_ICoreConfiguration_init_default;
-  [self populateProto:&icoreExpectedConfiguration];
-
-  FIRCoreDiagnosticsLog *log = [[FIRCoreDiagnosticsLog alloc] initWithConfig:icoreConfiguration];
-  FIRCoreDiagnosticsLog *expectedLog =
-      [[FIRCoreDiagnosticsLog alloc] initWithConfig:icoreExpectedConfiguration];
-
-  XCTAssert([[log transportBytes] isEqualToData:[expectedLog transportBytes]]);
-  // A pb_release here should not be necessary here, as FIRCoreDiagnosticsLog should do it.
-}
-
-// Populates the ICoreConfiguration proto.
-- (void)populateProto:(logs_proto_mobilesdk_ios_ICoreConfiguration *)config {
-  NSDictionary<NSString *, id> *info = [[NSBundle mainBundle] infoDictionary];
-  NSString *xcodeVersion = info[@"DTXcodeBuild"] ?: @"";
-  NSString *sdkVersion = info[@"DTSDKBuild"] ?: @"";
-  NSString *combinedVersions = [NSString stringWithFormat:@"%@-%@", xcodeVersion, sdkVersion];
-
-  config->using_gdt = 1;
-  config->has_using_gdt = 1;
-  config->configuration_type = logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_CORE;
-  config->icore_version = FIREncodeString(kLibraryVersionID);
-  config->pod_name = logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_FIREBASE;
-  config->has_pod_name = 1;
-  config->app_id = FIREncodeString(kGoogleAppID);
-  config->bundle_id = FIREncodeString(kBundleID);
-  config->device_model = FIREncodeString([GULAppEnvironmentUtil deviceModel]);
-  config->os_version = FIREncodeString([GULAppEnvironmentUtil systemVersion]);
-  config->app_count = 1;
-  config->has_app_count = 1;
-  config->use_default_app = 1;
-  config->has_use_default_app = 1;
-  config->has_dynamic_framework_count = 0;  // Removed from payload.
-  config->apple_framework_version = FIREncodeString(combinedVersions);
-  NSString *minVersion = [[NSBundle mainBundle] infoDictionary][@"MinimumOSVersion"];
-  if (minVersion) {
-    config->min_supported_ios_version = FIREncodeString(minVersion);
-  }
-  config->using_zip_file = 0;
-  config->has_using_zip_file = 1;
-  config->deployment_type = logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_COCOAPODS;
-  config->has_deployment_type = 1;
-  config->deployed_in_app_store = 0;
-  config->has_deployed_in_app_store = 1;
-  config->swizzling_enabled = 1;
-  config->has_swizzling_enabled = 1;
-}
-
-#pragma mark - Heartbeats
-
-- (void)testHeartbeatNotSentTheSameDay {
-  NSCalendar *calendar = [NSCalendar currentCalendar];
-
-  NSCalendarUnit unitFlags = NSCalendarUnitDay | NSCalendarUnitYear | NSCalendarUnitMonth;
-  NSDateComponents *dateComponents = [calendar components:unitFlags fromDate:[NSDate date]];
-
-  // Verify start of the day
-  NSDate *startOfTheDay = [calendar dateFromComponents:dateComponents];
-  OCMExpect([self.mockDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag])
-      .andReturn(startOfTheDay);
-  OCMReject([self.mockDateStorage setHearbeatDate:[self OCMArgToCheckDateEqualTo:[OCMArg any]]
-                                           forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-
-  [self assertEventSentWithHeartbeat:NO];
-
-  // Verify middle of the day
-  dateComponents.hour = 12;
-  NSDate *middleOfTheDay = [calendar dateFromComponents:dateComponents];
-  OCMExpect([self.mockDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag])
-      .andReturn(middleOfTheDay);
-  OCMReject([self.mockDateStorage setHearbeatDate:[self OCMArgToCheckDateEqualTo:[OCMArg any]]
-                                           forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-
-  [self assertEventSentWithHeartbeat:NO];
-
-  // Verify end of the day
-  dateComponents.hour = 0;
-  dateComponents.day += 1;
-  NSDate *startOfNextDay = [calendar dateFromComponents:dateComponents];
-  NSDate *endOfTheDay = [startOfNextDay dateByAddingTimeInterval:-1];
-  OCMExpect([self.mockDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag])
-      .andReturn(endOfTheDay);
-  OCMReject([self.mockDateStorage setHearbeatDate:[self OCMArgToCheckDateEqualTo:[OCMArg any]]
-                                           forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-  [self assertEventSentWithHeartbeat:NO];
-}
-
-- (void)testHeartbeatSentNoPreviousCheckin {
-  OCMExpect([self.mockDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag])
-      .andReturn(nil);
-  OCMExpect([self.mockDateStorage setHearbeatDate:[self OCMArgToCheckDateEqualTo:[NSDate date]]
-                                           forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-
-  [self assertEventSentWithHeartbeat:YES];
-}
-
-- (void)testHeartbeatSentNextDayDefaultApp {
-  NSDate *startOfToday = [[NSCalendar currentCalendar] startOfDayForDate:[NSDate date]];
-  NSDate *endOfYesterday = [startOfToday dateByAddingTimeInterval:-1];
-
-  OCMExpect([self.mockDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag])
-      .andReturn(endOfYesterday);
-  OCMExpect([self.mockDateStorage setHearbeatDate:[self OCMArgToCheckDateEqualTo:[NSDate date]]
-                                           forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-
-  [self assertEventSentWithHeartbeat:YES];
-}
-
-#pragma mark - Singleton
-
-- (void)testSharedInstanceDateStorageProperlyInitialized {
-  FIRCoreDiagnostics *sharedInstance = [FIRCoreDiagnostics sharedInstance];
-  XCTAssertNotNil(sharedInstance.heartbeatDateStorage);
-  XCTAssert([sharedInstance.heartbeatDateStorage isKindOfClass:[GULHeartbeatDateStorage class]]);
-
-  NSDate *date = [NSDate date];
-
-  XCTAssertTrue([sharedInstance.heartbeatDateStorage
-      setHearbeatDate:date
-               forTag:kFIRCoreDiagnosticsHeartbeatTag]);
-  XCTAssertEqualObjects(
-      [sharedInstance.heartbeatDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag],
-      date);
-}
-
-#pragma mark - Helpers
-
-- (void)assertEventSentWithHeartbeat:(BOOL)isHeartbeat {
-  [self expectEventToBeSentToTransportWithHeartbeat:isHeartbeat];
-
-  [self.diagnostics sendDiagnosticsData:[[FIRCoreDiagnosticsTestData alloc] init]];
-
-  OCMVerifyAllWithDelay(self.mockTransport, 0.5);
-  OCMVerifyAllWithDelay(self.mockDateStorage, 0.5);
-}
-
-- (void)expectEventToBeSentToTransportWithHeartbeat:(BOOL)isHeartbeat {
-  id eventValidation = [OCMArg checkWithBlock:^BOOL(GDTCOREvent *obj) {
-    XCTAssert([obj isKindOfClass:[GDTCOREvent class]]);
-    FIRCoreDiagnosticsLog *dataObject = obj.dataObject;
-    XCTAssert([dataObject isKindOfClass:[FIRCoreDiagnosticsLog class]]);
-
-    BOOL isSentEventHeartbeat =
-        dataObject.config.sdk_name == logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ICORE;
-    isSentEventHeartbeat = isSentEventHeartbeat && dataObject.config.has_sdk_name;
-    XCTAssertEqual(isSentEventHeartbeat, isHeartbeat);
-
-    return YES;
-  }];
-  OCMExpect([self.mockTransport sendTelemetryEvent:eventValidation]);
-}
-
-- (BOOL)isDate:(NSDate *)date1 approximatelyEqual:(NSDate *)date2 {
-  NSTimeInterval precision = 10;
-  NSTimeInterval diff = ABS([date1 timeIntervalSinceDate:date2]);
-  return diff <= precision;
-}
-
-- (id)OCMArgToCheckDateEqualTo:(NSDate *)date {
-  return [OCMArg checkWithBlock:^BOOL(id obj) {
-    XCTAssert([obj isKindOfClass:[NSDate class]], "%@", self.name);
-    return [self isDate:obj approximatelyEqual:date];
-  }];
-}
-
-@end

+ 0 - 1
Example/tvOSSample/Podfile

@@ -6,7 +6,6 @@ target 'tvOSSample' do
 
   # Pods for tvOSSample
   pod 'FirebaseCore', :path => '../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../'
   pod 'FirebaseAuth', :path => '../../'
   pod 'FirebaseDatabase', :path => '../../'
   pod 'FirebaseStorage', :path => '../../'

+ 0 - 1
Example/watchOSSample/Podfile

@@ -12,7 +12,6 @@ target 'SampleWatchAppWatchKitExtension' do
   pod 'FirebaseMessaging', :path => '../../'
   pod 'FirebaseCoreExtension', :path => '../../'
   pod 'FirebaseCoreInternal', :path => '../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../'
   pod 'FirebaseInstallations', :path => '../../'
   pod 'FirebaseStorage', :path => '../../'
   pod 'FirebaseRemoteConfig', :path => '../../'

+ 0 - 33
Firebase/CoreDiagnostics/CHANGELOG.md

@@ -1,33 +0,0 @@
-# 1.7.0
-- Internal headers removed from public headers. (#6442)
-
-# 1.6.0
-- Add logging for Swift Package Manager.
-
-# 1.2.3
-- Remove usage of memcpy and convert calls from malloc to calloc.
-
-# 1.2.2
-- Fixed a bug that would manifest if a proto ended up being > 16,320 bytes.
-- Now checks the result of malloc. (#4872)
-
-# 1.2.0
-- Added basic watchOS support.
-
-# 1.1.2
-- Switch the backend for diagnostics to FLL from CCT.
-
-# 1.1.1
-- Updated nanopb from 0.3.9.2 to 0.3.9.3.
-
-# 1.1.0
-- Updates GDT dependency to GDTCOR prefixed version.
-
-# 1.0.0
-Initial Release--for Google use only. This library collects diagnostics and
-usage data for internal use by Firebase. Data gathered by this library will
-only be uploaded at most once every 24 hours whilst on mobile data, and more
-frequently on wifi if it's available. This library has been integrated as a
-weak dependency and can be safely removed by using a non-Cocoapods distribution
-method. You can also use the Firebase global data collection flag to opt-out of
-collecting this usage data.

+ 0 - 551
Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m

@@ -1,551 +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 <objc/runtime.h>
-#include <sys/utsname.h>
-
-#import <GoogleDataTransport/GoogleDataTransport.h>
-
-#import <GoogleUtilities/GULAppEnvironmentUtil.h>
-#import <GoogleUtilities/GULHeartbeatDateStorage.h>
-#import <GoogleUtilities/GULLogger.h>
-
-#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
-#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"
-
-#import <nanopb/pb.h>
-#import <nanopb/pb_decode.h>
-#import <nanopb/pb_encode.h>
-
-#import "Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h"
-
-/** The logger service string to use when printing to the console. */
-static GULLoggerService kFIRCoreDiagnostics = @"[FirebaseCoreDiagnostics/FIRCoreDiagnostics]";
-
-#ifdef FIREBASE_BUILD_ZIP_FILE
-static BOOL kUsingZipFile = YES;
-#else   // FIREBASE_BUILD_ZIP_FILE
-static BOOL kUsingZipFile = NO;
-#endif  // FIREBASE_BUILD_ZIP_FILE
-
-#if SWIFT_PACKAGE
-#define kDeploymentType logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_SPM
-#elif FIREBASE_BUILD_CARTHAGE
-#define kDeploymentType logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_CARTHAGE
-#elif FIREBASE_BUILD_ZIP_FILE
-#define kDeploymentType logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_ZIP_FILE
-#else
-#define kDeploymentType logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_COCOAPODS
-#endif
-
-static NSString *const kFIRServiceMLModelInterpreter = @"MLModelInterpreter";
-
-static NSString *const kFIRServiceAdMob = @"AdMob";
-static NSString *const kFIRServiceAuth = @"Auth";
-static NSString *const kFIRServiceAuthUI = @"AuthUI";
-static NSString *const kFIRServiceCrash = @"Crash";
-static NSString *const kFIRServiceDatabase = @"Database";
-static NSString *const kFIRServiceDynamicLinks = @"DynamicLinks";
-static NSString *const kFIRServiceFirestore = @"Firestore";
-static NSString *const kFIRServiceFunctions = @"Functions";
-static NSString *const kFIRServiceIAM = @"InAppMessaging";
-static NSString *const kFIRServiceInstanceID = @"InstanceID";
-static NSString *const kFIRServiceInvites = @"Invites";
-static NSString *const kFIRServiceMessaging = @"Messaging";
-static NSString *const kFIRServiceMeasurement = @"Measurement";
-static NSString *const kFIRServicePerformance = @"Performance";
-static NSString *const kFIRServiceRemoteConfig = @"RemoteConfig";
-static NSString *const kFIRServiceStorage = @"Storage";
-static NSString *const kGGLServiceAnalytics = @"Analytics";
-static NSString *const kGGLServiceSignIn = @"SignIn";
-static NSString *const kFIRAppDiagnosticsConfigurationTypeKey =
-    @"FIRAppDiagnosticsConfigurationTypeKey";
-static NSString *const kFIRAppDiagnosticsFIRAppKey = @"FIRAppDiagnosticsFIRAppKey";
-static NSString *const kFIRAppDiagnosticsSDKNameKey = @"FIRAppDiagnosticsSDKNameKey";
-static NSString *const kFIRAppDiagnosticsSDKVersionKey = @"FIRAppDiagnosticsSDKVersionKey";
-static NSString *const kFIRCoreDiagnosticsHeartbeatTag = @"FIRCoreDiagnostics";
-
-/**
- * The file name to the recent heartbeat date.
- */
-NSString *const kFIRCoreDiagnosticsHeartbeatDateFileName = @"FIREBASE_DIAGNOSTICS_HEARTBEAT_DATE";
-
-/**
- * @note This should implement the GDTCOREventDataObject protocol, but can't because of
- * weak-linking.
- */
-@interface FIRCoreDiagnosticsLog : NSObject
-
-/** The config that will be converted to proto bytes. */
-@property(nonatomic) logs_proto_mobilesdk_ios_ICoreConfiguration config;
-
-@end
-
-@implementation FIRCoreDiagnosticsLog
-
-- (instancetype)initWithConfig:(logs_proto_mobilesdk_ios_ICoreConfiguration)config {
-  self = [super init];
-  if (self) {
-    _config = config;
-  }
-  return self;
-}
-
-// Provided and required by the GDTCOREventDataObject protocol.
-- (NSData *)transportBytes {
-  pb_ostream_t sizestream = PB_OSTREAM_SIZING;
-
-  // Encode 1 time to determine the size.
-  if (!pb_encode(&sizestream, logs_proto_mobilesdk_ios_ICoreConfiguration_fields, &_config)) {
-    GDTCORLogError(GDTCORMCETransportBytesError, @"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, logs_proto_mobilesdk_ios_ICoreConfiguration_fields, &_config)) {
-    GDTCORLogError(GDTCORMCETransportBytesError, @"Error in nanopb encoding for bytes: %s",
-                   PB_GET_ERROR(&ostream));
-  }
-  CFDataSetLength(dataRef, ostream.bytes_written);
-
-  return CFBridgingRelease(dataRef);
-}
-
-- (void)dealloc {
-  pb_release(logs_proto_mobilesdk_ios_ICoreConfiguration_fields, &_config);
-}
-
-@end
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** This class produces a protobuf containing diagnostics and usage data to be logged. */
-@interface FIRCoreDiagnostics : NSObject <FIRCoreDiagnosticsInterop>
-
-/** The queue on which all diagnostics collection will occur. */
-@property(nonatomic, readonly) dispatch_queue_t diagnosticsQueue;
-
-/** The transport object used to send data. */
-@property(nonatomic, readonly) GDTCORTransport *transport;
-
-/** The storage to store the date of the last sent heartbeat. */
-@property(nonatomic, readonly) GULHeartbeatDateStorage *heartbeatDateStorage;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-@implementation FIRCoreDiagnostics
-
-+ (instancetype)sharedInstance {
-  static FIRCoreDiagnostics *sharedInstance;
-  static dispatch_once_t onceToken;
-  dispatch_once(&onceToken, ^{
-    sharedInstance = [[FIRCoreDiagnostics alloc] init];
-  });
-  return sharedInstance;
-}
-
-- (instancetype)init {
-  GDTCORTransport *transport = [[GDTCORTransport alloc] initWithMappingID:@"137"
-                                                             transformers:nil
-                                                                   target:kGDTCORTargetFLL];
-
-  GULHeartbeatDateStorage *dateStorage =
-      [[GULHeartbeatDateStorage alloc] initWithFileName:kFIRCoreDiagnosticsHeartbeatDateFileName];
-
-  return [self initWithTransport:transport heartbeatDateStorage:dateStorage];
-}
-
-/** Initializer for unit tests.
- *
- * @param transport A `GDTCORTransport` instance which that be used to send event.
- * @param heartbeatDateStorage An instanse of date storage to track heartbeat sending.
- * @return Returns the initialized `FIRCoreDiagnostics` instance.
- */
-- (instancetype)initWithTransport:(GDTCORTransport *)transport
-             heartbeatDateStorage:(GULHeartbeatDateStorage *)heartbeatDateStorage {
-  self = [super init];
-  if (self) {
-    _diagnosticsQueue =
-        dispatch_queue_create("com.google.FIRCoreDiagnostics", DISPATCH_QUEUE_SERIAL);
-    _transport = transport;
-    _heartbeatDateStorage = heartbeatDateStorage;
-  }
-  return self;
-}
-
-#pragma mark - nanopb helper functions
-
-/** Callocs a pb_bytes_array and copies the given NSString's bytes into the bytes array.
- *
- * @note Memory needs to be free manually, through pb_free or pb_release.
- * @param string The string to encode as pb_bytes.
- */
-pb_bytes_array_t *FIREncodeString(NSString *string) {
-  NSData *stringBytes = [string dataUsingEncoding:NSUTF8StringEncoding];
-  return FIREncodeData(stringBytes);
-}
-
-/** Callocs a pb_bytes_array and copies the given NSData bytes into the bytes array.
- *
- * @note Memory needs to be free manually, through pb_free or pb_release.
- * @param data The data to copy into the new bytes array.
- */
-pb_bytes_array_t *FIREncodeData(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;
-}
-
-/** Maps a service string to the representative nanopb enum.
- *
- * @param serviceString The SDK service string to convert.
- * @return The representative nanopb enum.
- */
-logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType FIRMapFromServiceStringToTypeEnum(
-    NSString *serviceString) {
-  static NSDictionary<NSString *, NSNumber *> *serviceStringToTypeEnum;
-  if (serviceStringToTypeEnum == nil) {
-    serviceStringToTypeEnum = @{
-      kFIRServiceAdMob : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ADMOB),
-      kFIRServiceMessaging : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MESSAGING),
-      kFIRServiceMeasurement :
-          @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MEASUREMENT),
-      kFIRServiceRemoteConfig :
-          @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_REMOTE_CONFIG),
-      kFIRServiceDatabase : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_DATABASE),
-      kFIRServiceDynamicLinks :
-          @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_DYNAMIC_LINKS),
-      kFIRServiceAuth : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_AUTH),
-      kFIRServiceAuthUI : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_AUTH_UI),
-      kFIRServiceFirestore : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_FIRESTORE),
-      kFIRServiceFunctions : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_FUNCTIONS),
-      kFIRServicePerformance :
-          @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_PERFORMANCE),
-      kFIRServiceStorage : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_STORAGE),
-      kFIRServiceMLModelInterpreter :
-          @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_MODEL_INTERPRETER),
-      kGGLServiceAnalytics : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ANALYTICS),
-      kGGLServiceSignIn : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_SIGN_IN),
-      kFIRServiceIAM : @(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_IN_APP_MESSAGING),
-    };
-  }
-  if (serviceStringToTypeEnum[serviceString] != nil) {
-    return (int32_t)serviceStringToTypeEnum[serviceString].longLongValue;
-  }
-  return logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_UNKNOWN_SDK_SERVICE;
-}
-
-#pragma mark - Proto population functions
-
-/** Populates the given proto with data related to an SDK logDiagnostics call from the
- * diagnosticObjects dictionary.
- *
- * @param config The proto to populate
- * @param diagnosticObjects The dictionary of diagnostics objects.
- */
-void FIRPopulateProtoWithInfoFromUserInfoParams(logs_proto_mobilesdk_ios_ICoreConfiguration *config,
-                                                NSDictionary<NSString *, id> *diagnosticObjects) {
-  NSNumber *configurationType = diagnosticObjects[kFIRCDConfigurationTypeKey];
-  if (configurationType != nil) {
-    switch (configurationType.integerValue) {
-      case logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_CORE:
-        config->configuration_type =
-            logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_CORE;
-        config->has_configuration_type = 1;
-        break;
-      case logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_SDK:
-        config->configuration_type =
-            logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_SDK;
-        config->has_configuration_type = 1;
-        break;
-      default:
-        break;
-    }
-  }
-
-  NSString *sdkName = diagnosticObjects[kFIRCDSdkNameKey];
-  if (sdkName) {
-    config->sdk_name = FIRMapFromServiceStringToTypeEnum(sdkName);
-    config->has_sdk_name = 1;
-  }
-
-  NSString *version = diagnosticObjects[kFIRCDSdkVersionKey];
-  if (version) {
-    config->sdk_version = FIREncodeString(version);
-  }
-}
-
-/** Populates the given proto with data from the calling FIRApp using the given
- * diagnosticObjects dictionary.
- *
- * @param config The proto to populate
- * @param diagnosticObjects The dictionary of diagnostics objects.
- */
-void FIRPopulateProtoWithCommonInfoFromApp(logs_proto_mobilesdk_ios_ICoreConfiguration *config,
-                                           NSDictionary<NSString *, id> *diagnosticObjects) {
-  config->pod_name = logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_FIREBASE;
-  config->has_pod_name = 1;
-
-  if (!diagnosticObjects[kFIRCDllAppsCountKey]) {
-    GDTCORLogError(GDTCORMCEGeneralError, @"%@",
-                   @"App count is a required value in the data dict.");
-  }
-  config->app_count = (int32_t)[diagnosticObjects[kFIRCDllAppsCountKey] integerValue];
-  config->has_app_count = 1;
-
-  NSString *googleAppID = diagnosticObjects[kFIRCDGoogleAppIDKey];
-  if (googleAppID.length) {
-    config->app_id = FIREncodeString(googleAppID);
-  }
-
-  NSString *bundleID = diagnosticObjects[kFIRCDBundleIDKey];
-  if (bundleID.length) {
-    config->bundle_id = FIREncodeString(bundleID);
-  }
-
-  NSString *firebaseUserAgent = diagnosticObjects[kFIRCDFirebaseUserAgentKey];
-  if (firebaseUserAgent.length) {
-    config->platform_info = FIREncodeString(firebaseUserAgent);
-  }
-
-  NSNumber *usingOptionsFromDefaultPlist = diagnosticObjects[kFIRCDUsingOptionsFromDefaultPlistKey];
-  if (usingOptionsFromDefaultPlist != nil) {
-    config->use_default_app = [usingOptionsFromDefaultPlist boolValue];
-    config->has_use_default_app = 1;
-  }
-
-  NSString *libraryVersionID = diagnosticObjects[kFIRCDLibraryVersionIDKey];
-  if (libraryVersionID) {
-    config->icore_version = FIREncodeString(libraryVersionID);
-  }
-
-  NSString *deviceModel = [GULAppEnvironmentUtil deviceModel];
-  if (deviceModel.length) {
-    config->device_model = FIREncodeString(deviceModel);
-  }
-
-  NSString *osVersion = [GULAppEnvironmentUtil systemVersion];
-  if (osVersion.length) {
-    config->os_version = FIREncodeString(osVersion);
-  }
-
-  config->using_zip_file = kUsingZipFile;
-  config->has_using_zip_file = 1;
-  config->deployment_type = kDeploymentType;
-  config->has_deployment_type = 1;
-  config->deployed_in_app_store = [GULAppEnvironmentUtil isFromAppStore];
-  config->has_deployed_in_app_store = 1;
-}
-
-/** Populates the given proto with installed services data.
- *
- * @param config The proto to populate
- */
-void FIRPopulateProtoWithInstalledServices(logs_proto_mobilesdk_ios_ICoreConfiguration *config) {
-  NSMutableArray<NSNumber *> *sdkServiceInstalledArray = [NSMutableArray array];
-
-  // AdMob
-  if (NSClassFromString(@"GADBannerView") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceAdMob))];
-  }
-  // CloudMessaging
-  if (NSClassFromString(@"FIRMessaging") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceMessaging))];
-  }
-  // RemoteConfig
-  if (NSClassFromString(@"FIRRemoteConfig") != nil) {
-    [sdkServiceInstalledArray
-        addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceRemoteConfig))];
-  }
-  // Measurement/Analtyics
-  if (NSClassFromString(@"FIRAnalytics") != nil) {
-    [sdkServiceInstalledArray
-        addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceMeasurement))];
-  }
-  // ML Model Interpreter
-  if (NSClassFromString(@"FIRCustomModelInterpreter") != nil) {
-    [sdkServiceInstalledArray
-        addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceMLModelInterpreter))];
-  }
-  // Database
-  if (NSClassFromString(@"FIRDatabase") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceDatabase))];
-  }
-  // DynamicDeepLink
-  if (NSClassFromString(@"FIRDynamicLinks") != nil) {
-    [sdkServiceInstalledArray
-        addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceDynamicLinks))];
-  }
-  // Auth
-  if (NSClassFromString(@"FIRAuth") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceAuth))];
-  }
-  // AuthUI
-  if (NSClassFromString(@"FUIAuth") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceAuthUI))];
-  }
-  // Firestore
-  if (NSClassFromString(@"FIRFirestore") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceFirestore))];
-  }
-  // Functions
-  if (NSClassFromString(@"FIRFunctions") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceFunctions))];
-  }
-  // Performance
-  if (NSClassFromString(@"FIRPerformance") != nil) {
-    [sdkServiceInstalledArray
-        addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServicePerformance))];
-  }
-  // Storage
-  if (NSClassFromString(@"FIRStorage") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceStorage))];
-  }
-  // SignIn via Google pod
-  if (NSClassFromString(@"GIDSignIn") != nil && NSClassFromString(@"GGLContext") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kGGLServiceSignIn))];
-  }
-  // Analytics via Google pod
-  if (NSClassFromString(@"GAI") != nil && NSClassFromString(@"GGLContext") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kGGLServiceAnalytics))];
-  }
-
-  // In-App Messaging
-  if (NSClassFromString(@"FIRInAppMessaging") != nil) {
-    [sdkServiceInstalledArray addObject:@(FIRMapFromServiceStringToTypeEnum(kFIRServiceIAM))];
-  }
-
-  logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType *servicesInstalled =
-      calloc(sdkServiceInstalledArray.count,
-             sizeof(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType));
-  if (servicesInstalled == NULL) {
-    return;
-  }
-  for (NSUInteger i = 0; i < sdkServiceInstalledArray.count; i++) {
-    NSNumber *typeEnum = sdkServiceInstalledArray[i];
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType serviceType =
-        (int32_t)typeEnum.integerValue;
-    servicesInstalled[i] = serviceType;
-  }
-
-  config->sdk_service_installed = servicesInstalled;
-  config->sdk_service_installed_count = (int32_t)sdkServiceInstalledArray.count;
-}
-
-/** Populates the proto with Info.plist values.
- *
- * @param config The proto to populate.
- */
-void FIRPopulateProtoWithInfoPlistValues(logs_proto_mobilesdk_ios_ICoreConfiguration *config) {
-  NSDictionary<NSString *, id> *info = [[NSBundle mainBundle] infoDictionary];
-
-  NSString *xcodeVersion = info[@"DTXcodeBuild"] ?: @"";
-  NSString *sdkVersion = info[@"DTSDKBuild"] ?: @"";
-  NSString *combinedVersions = [NSString stringWithFormat:@"%@-%@", xcodeVersion, sdkVersion];
-  config->apple_framework_version = FIREncodeString(combinedVersions);
-
-  NSString *minVersion = info[@"MinimumOSVersion"];
-  if (minVersion) {
-    config->min_supported_ios_version = FIREncodeString(minVersion);
-  }
-
-  // Apps can turn off swizzling in the Info.plist, check if they've explicitly set the value and
-  // report it. It's enabled by default.
-  NSNumber *appDelegateSwizzledNum = info[@"FirebaseAppDelegateProxyEnabled"];
-  BOOL appDelegateSwizzled = YES;
-  if ([appDelegateSwizzledNum isKindOfClass:[NSNumber class]]) {
-    appDelegateSwizzled = [appDelegateSwizzledNum boolValue];
-  }
-  config->swizzling_enabled = appDelegateSwizzled;
-  config->has_swizzling_enabled = 1;
-}
-
-#pragma mark - FIRCoreDiagnosticsInterop
-
-+ (void)sendDiagnosticsData:(nonnull id<FIRCoreDiagnosticsData>)diagnosticsData {
-  FIRCoreDiagnostics *diagnostics = [FIRCoreDiagnostics sharedInstance];
-  [diagnostics sendDiagnosticsData:diagnosticsData];
-}
-
-- (void)sendDiagnosticsData:(nonnull id<FIRCoreDiagnosticsData>)diagnosticsData {
-  dispatch_async(self.diagnosticsQueue, ^{
-    NSDictionary<NSString *, id> *diagnosticObjects = diagnosticsData.diagnosticObjects;
-    NSNumber *isDataCollectionDefaultEnabled =
-        diagnosticObjects[kFIRCDIsDataCollectionDefaultEnabledKey];
-    if (isDataCollectionDefaultEnabled && ![isDataCollectionDefaultEnabled boolValue]) {
-      return;
-    }
-
-    // Create the proto.
-    logs_proto_mobilesdk_ios_ICoreConfiguration icore_config =
-        logs_proto_mobilesdk_ios_ICoreConfiguration_init_default;
-
-    icore_config.using_gdt = 1;
-    icore_config.has_using_gdt = 1;
-
-    // Populate the proto with information.
-    FIRPopulateProtoWithInfoFromUserInfoParams(&icore_config, diagnosticObjects);
-    FIRPopulateProtoWithCommonInfoFromApp(&icore_config, diagnosticObjects);
-    FIRPopulateProtoWithInstalledServices(&icore_config);
-    FIRPopulateProtoWithInfoPlistValues(&icore_config);
-    [self setHeartbeatFlagIfNeededToConfig:&icore_config];
-
-    // This log object is capable of converting the proto to bytes.
-    FIRCoreDiagnosticsLog *log = [[FIRCoreDiagnosticsLog alloc] initWithConfig:icore_config];
-
-    // Send the log as a telemetry event.
-    GDTCOREvent *event = [self.transport eventForTransport];
-    event.dataObject = (id<GDTCOREventDataObject>)log;
-    [self.transport sendTelemetryEvent:event];
-  });
-}
-
-#pragma mark - Heartbeat
-
-- (void)setHeartbeatFlagIfNeededToConfig:(logs_proto_mobilesdk_ios_ICoreConfiguration *)config {
-  // Check if need to send a heartbeat.
-  NSDate *currentDate = [NSDate date];
-  NSDate *lastCheckin =
-      [self.heartbeatDateStorage heartbeatDateForTag:kFIRCoreDiagnosticsHeartbeatTag];
-  if (lastCheckin) {
-    // Ensure the previous checkin was on a different date in the past.
-    if ([self isDate:currentDate inSameDayOrBeforeThan:lastCheckin]) {
-      return;
-    }
-  }
-
-  // Update heartbeat sent date.
-  [self.heartbeatDateStorage setHearbeatDate:currentDate forTag:kFIRCoreDiagnosticsHeartbeatTag];
-  // Set the flag.
-  config->sdk_name = logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ICORE;
-  config->has_sdk_name = 1;
-}
-
-- (BOOL)isDate:(NSDate *)date1 inSameDayOrBeforeThan:(NSDate *)date2 {
-  return [[NSCalendar currentCalendar] isDate:date1 inSameDayAsDate:date2] ||
-         [date1 compare:date2] == NSOrderedAscending;
-}
-
-@end

+ 0 - 60
Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.c

@@ -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.
- */
-
-/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.9.7 */
-
-#include "firebasecore.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 pb_field_t logs_proto_mobilesdk_ios_ICoreConfiguration_fields[22] = {
-    PB_FIELD(  1, UENUM   , OPTIONAL, STATIC  , FIRST, logs_proto_mobilesdk_ios_ICoreConfiguration, configuration_type, configuration_type, 0),
-    PB_FIELD(  7, UENUM   , REPEATED, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, sdk_service_installed, configuration_type, 0),
-    PB_FIELD(  9, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, device_model, sdk_service_installed, 0),
-    PB_FIELD( 10, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, app_id, device_model, 0),
-    PB_FIELD( 12, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, bundle_id, app_id, 0),
-    PB_FIELD( 16, UENUM   , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, pod_name, bundle_id, 0),
-    PB_FIELD( 18, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, icore_version, pod_name, 0),
-    PB_FIELD( 19, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, sdk_version, icore_version, 0),
-    PB_FIELD( 20, UENUM   , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, sdk_name, sdk_version, 0),
-    PB_FIELD( 21, INT32   , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, app_count, sdk_name, 0),
-    PB_FIELD( 22, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, os_version, app_count, 0),
-    PB_FIELD( 24, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, min_supported_ios_version, os_version, 0),
-    PB_FIELD( 25, BOOL    , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, use_default_app, min_supported_ios_version, 0),
-    PB_FIELD( 26, BOOL    , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, deployed_in_app_store, use_default_app, 0),
-    PB_FIELD( 27, INT32   , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, dynamic_framework_count, deployed_in_app_store, 0),
-    PB_FIELD( 28, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, apple_framework_version, dynamic_framework_count, 0),
-    PB_FIELD( 29, BOOL    , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, using_zip_file, apple_framework_version, 0),
-    PB_FIELD( 30, UENUM   , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, deployment_type, using_zip_file, 0),
-    PB_FIELD( 31, BYTES   , OPTIONAL, POINTER , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, platform_info, deployment_type, 0),
-    PB_FIELD( 33, BOOL    , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, swizzling_enabled, platform_info, 0),
-    PB_FIELD( 36, BOOL    , OPTIONAL, STATIC  , OTHER, logs_proto_mobilesdk_ios_ICoreConfiguration, using_gdt, swizzling_enabled, 0),
-    PB_LAST_FIELD
-};
-
-
-
-
-
-
-
-/* @@protoc_insertion_point(eof) */

+ 0 - 193
Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h

@@ -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.
- */
-
-/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.9.7 */
-
-#ifndef PB_LOGS_PROTO_MOBILESDK_IOS_FIREBASECORE_NANOPB_H_INCLUDED
-#define PB_LOGS_PROTO_MOBILESDK_IOS_FIREBASECORE_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 _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType {
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_UNKNOWN_CONFIGURATION_TYPE = 0,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_CORE = 1,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_SDK = 2
-} logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType;
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_MIN logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_UNKNOWN_CONFIGURATION_TYPE
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_MAX logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_SDK
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_ARRAYSIZE ((logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType)(logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_SDK+1))
-
-typedef enum _logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType {
-    logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_UNKNOWN_BUILD_TYPE = 0,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_INTERNAL = 1,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_EAP = 2,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_PROD = 3
-} logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType;
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_MIN logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_UNKNOWN_BUILD_TYPE
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_MAX logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_PROD
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_ARRAYSIZE ((logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType)(logs_proto_mobilesdk_ios_ICoreConfiguration_BuildType_PROD+1))
-
-typedef enum _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType {
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_UNKNOWN_SDK_SERVICE = 0,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ICORE = 1,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ADMOB = 2,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_APP_INVITE = 3,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_SIGN_IN = 5,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_GCM = 6,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MAPS = 7,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_SCION = 8,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ANALYTICS = 9,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_APP_INDEXING = 10,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_CONFIG = 11,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_DURABLE_DEEP_LINKS = 12,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_CRASH = 13,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_AUTH = 14,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_DATABASE = 15,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_STORAGE = 16,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MESSAGING = 17,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MEASUREMENT = 18,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_REMOTE_CONFIG = 19,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_DYNAMIC_LINKS = 20,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_INVITES = 21,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_AUTH_UI = 22,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_FIRESTORE = 23,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_PERFORMANCE = 24,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_FACE = 26,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_BARCODE = 27,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_TEXT = 28,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_LABEL = 29,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_MODEL_INTERPRETER = 30,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_IN_APP_MESSAGING = 31,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_FUNCTIONS = 32,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_NATURAL_LANGUAGE = 33,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_AUTOML = 34,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_OBJECT_DETECTION = 35
-} logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType;
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MIN logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_UNKNOWN_SDK_SERVICE
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MAX logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_OBJECT_DETECTION
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ARRAYSIZE ((logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType)(logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_ML_VISION_ON_DEVICE_OBJECT_DETECTION+1))
-
-typedef enum _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName {
-    logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_UNKNOWN_POD_NAME = 0,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_GOOGLE = 1,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_FIREBASE = 2
-} logs_proto_mobilesdk_ios_ICoreConfiguration_PodName;
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_MIN logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_UNKNOWN_POD_NAME
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_MAX logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_FIREBASE
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_ARRAYSIZE ((logs_proto_mobilesdk_ios_ICoreConfiguration_PodName)(logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_FIREBASE+1))
-
-typedef enum _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType {
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_UNKNOWN = 0,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_COCOAPODS = 1,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_ZIP_FILE = 2,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_CARTHAGE = 3,
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_SPM = 4
-} logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType;
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_MIN logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_UNKNOWN
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_MAX logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_SPM
-#define _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_ARRAYSIZE ((logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType)(logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_SPM+1))
-
-/* Struct definitions */
-typedef struct _logs_proto_mobilesdk_ios_ICoreConfiguration {
-    bool has_configuration_type;
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType configuration_type;
-    pb_size_t sdk_service_installed_count;
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType *sdk_service_installed;
-    pb_bytes_array_t *device_model;
-    pb_bytes_array_t *app_id;
-    pb_bytes_array_t *bundle_id;
-    bool has_pod_name;
-    logs_proto_mobilesdk_ios_ICoreConfiguration_PodName pod_name;
-    pb_bytes_array_t *icore_version;
-    pb_bytes_array_t *sdk_version;
-    bool has_sdk_name;
-    logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType sdk_name;
-    bool has_app_count;
-    int32_t app_count;
-    pb_bytes_array_t *os_version;
-    pb_bytes_array_t *min_supported_ios_version;
-    bool has_use_default_app;
-    bool use_default_app;
-    bool has_deployed_in_app_store;
-    bool deployed_in_app_store;
-    bool has_dynamic_framework_count;
-    int32_t dynamic_framework_count;
-    pb_bytes_array_t *apple_framework_version;
-    bool has_using_zip_file;
-    bool using_zip_file;
-    bool has_deployment_type;
-    logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType deployment_type;
-    pb_bytes_array_t *platform_info;
-    bool has_swizzling_enabled;
-    bool swizzling_enabled;
-    bool has_using_gdt;
-    bool using_gdt;
-/* @@protoc_insertion_point(struct:logs_proto_mobilesdk_ios_ICoreConfiguration) */
-} logs_proto_mobilesdk_ios_ICoreConfiguration;
-
-/* Default values for struct fields */
-
-/* Initializer values for message structs */
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_init_default {false, _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_MIN, 0, NULL, NULL, NULL, NULL, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_MIN, NULL, NULL, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MIN, false, 0, NULL, NULL, false, 0, false, 0, false, 0, NULL, false, 0, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_MIN, NULL, false, 0, false, 0}
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_init_zero {false, _logs_proto_mobilesdk_ios_ICoreConfiguration_ConfigurationType_MIN, 0, NULL, NULL, NULL, NULL, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_PodName_MIN, NULL, NULL, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_ServiceType_MIN, false, 0, NULL, NULL, false, 0, false, 0, false, 0, NULL, false, 0, false, _logs_proto_mobilesdk_ios_ICoreConfiguration_DeploymentType_MIN, NULL, false, 0, false, 0}
-
-/* Field tags (for use in manual encoding/decoding) */
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_pod_name_tag 16
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_configuration_type_tag 1
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_icore_version_tag 18
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_sdk_version_tag 19
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_sdk_service_installed_tag 7
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_sdk_name_tag 20
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_device_model_tag 9
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_os_version_tag 22
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_app_id_tag 10
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_bundle_id_tag 12
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_min_supported_ios_version_tag 24
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_use_default_app_tag 25
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_app_count_tag 21
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_deployed_in_app_store_tag 26
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_dynamic_framework_count_tag 27
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_apple_framework_version_tag 28
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_using_zip_file_tag 29
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_deployment_type_tag 30
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_platform_info_tag 31
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_swizzling_enabled_tag 33
-#define logs_proto_mobilesdk_ios_ICoreConfiguration_using_gdt_tag 36
-
-/* Struct field encoding specification for nanopb */
-extern const pb_field_t logs_proto_mobilesdk_ios_ICoreConfiguration_fields[22];
-
-/* Maximum encoded size of messages (where known) */
-/* logs_proto_mobilesdk_ios_ICoreConfiguration_size depends on runtime parameters */
-
-/* Message IDs (where set with "msgid" option) */
-#ifdef PB_MSGID
-
-#define FIREBASECORE_MESSAGES \
-
-
-#endif
-
-/* @@protoc_insertion_point(eof) */
-
-#endif

+ 0 - 18
Firebase/CoreDiagnostics/FIRCDLibrary/Public/FIRCoreDiagnostics.h

@@ -1,18 +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.
- */
-
-// There are no actual public headers in the lib. This is a dummy public header to prevent Cocoapods
-// from adding all internal headers as public.

+ 0 - 35
Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.options

@@ -1,35 +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.
-# 
-
-# Options for firebasecore.proto
-
-logs.proto.mobilesdk.ios.ICoreConfiguration.version_name type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.plist_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.sdk_service_enabled type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.sdk_service_installed type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.device_model type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.app_id type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.bundle_id type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.client_id type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.install type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.icore_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.sdk_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.os_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.itunes_id type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.min_supported_ios_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.apple_framework_version type:FT_POINTER
-logs.proto.mobilesdk.ios.ICoreConfiguration.platform_info type:FT_POINTER
-
-

+ 0 - 89
Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.proto

@@ -1,89 +0,0 @@
-syntax = "proto2";
-
-package logs.proto.mobilesdk.ios;
-
-message ICoreConfiguration {
-  enum ConfigurationType {
-    UNKNOWN_CONFIGURATION_TYPE = 0;
-    CORE = 1;
-    SDK = 2;
-  }
-  enum BuildType {
-    UNKNOWN_BUILD_TYPE = 0;
-    INTERNAL = 1;
-    EAP = 2;
-    PROD = 3;
-  }
-  enum ServiceType {
-    UNKNOWN_SDK_SERVICE = 0;
-    ICORE = 1;
-    ADMOB = 2;
-    APP_INVITE = 3;
-    SIGN_IN = 5;
-    GCM = 6 [deprecated = true];
-    MAPS = 7;
-    SCION = 8 [deprecated = true];
-    ANALYTICS = 9;
-    APP_INDEXING = 10;
-    CONFIG = 11 [deprecated = true];
-    DURABLE_DEEP_LINKS = 12 [deprecated = true];
-    CRASH = 13;
-    AUTH = 14;
-    DATABASE = 15;
-    STORAGE = 16;
-    MESSAGING = 17;
-    MEASUREMENT = 18;
-    REMOTE_CONFIG = 19;
-    DYNAMIC_LINKS = 20;
-    INVITES = 21;
-    AUTH_UI = 22;
-    FIRESTORE = 23;
-    PERFORMANCE = 24;
-    ML_VISION_ON_DEVICE_FACE = 26;
-    ML_VISION_ON_DEVICE_BARCODE = 27;
-    ML_VISION_ON_DEVICE_TEXT = 28;
-    ML_VISION_ON_DEVICE_LABEL = 29;
-    ML_MODEL_INTERPRETER = 30;
-    IN_APP_MESSAGING = 31;
-    FUNCTIONS = 32;
-    ML_NATURAL_LANGUAGE = 33;
-    ML_VISION_ON_DEVICE_AUTOML = 34;
-    ML_VISION_ON_DEVICE_OBJECT_DETECTION = 35;
-  }
-  enum PodName {
-    UNKNOWN_POD_NAME = 0;
-    GOOGLE = 1;
-    FIREBASE = 2;
-  }
-  enum DeploymentType {
-    UNKNOWN = 0;
-    COCOAPODS = 1;
-    ZIP_FILE = 2;
-    CARTHAGE = 3;
-    SPM = 4;
-  }
-  optional .logs.proto.mobilesdk.ios.ICoreConfiguration.PodName pod_name = 16;
-  optional .logs.proto.mobilesdk.ios.ICoreConfiguration.ConfigurationType
-      configuration_type = 1;
-  optional string icore_version = 18;
-  optional string sdk_version = 19;
-  repeated .logs.proto.mobilesdk.ios.ICoreConfiguration.ServiceType
-      sdk_service_installed = 7;
-  optional .logs.proto.mobilesdk.ios.ICoreConfiguration.ServiceType sdk_name =
-      20;
-  optional string device_model = 9;
-  optional string os_version = 22;
-  optional string app_id = 10;
-  optional string bundle_id = 12;
-  optional string min_supported_ios_version = 24;
-  optional bool use_default_app = 25;
-  optional int32 app_count = 21;
-  optional bool deployed_in_app_store = 26;
-  optional int32 dynamic_framework_count = 27;
-  optional string apple_framework_version = 28;
-  optional bool using_zip_file = 29;
-  optional DeploymentType deployment_type = 30;
-  optional string platform_info = 31;
-  optional bool swizzling_enabled = 33;
-  optional bool using_gdt = 36;
-}

+ 0 - 56
Firebase/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh

@@ -1,56 +0,0 @@
-#!/bin/bash
-
-# 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.
-#
-
-# Example usage:
-# ./build_protos <path to nanopb>
-
-# Dependencies: git, protobuf, python-protobuf, pyinstaller
-
-readonly REPO_DIR="$( git rev-parse --show-toplevel )"
-
-# Current release of nanopb being used  to build the CCT protos
-readonly NANOPB_VERSION="0.3.9.8"
-readonly NANOPB_TEMPDIR="$(mktemp -d)"
-
-readonly LIBRARY_DIR="${REPO_DIR}/Firebase/CoreDiagnostics/FIRCDLibrary"
-readonly PROTO_DIR="${REPO_DIR}/Firebase/CoreDiagnostics/ProtoSupport/Protos/"
-readonly PROTOGEN_DIR="${REPO_DIR}/Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/"
-
-rm -rf "${NANOPB_TEMPDIR}"
-
-echo "Downloading nanopb..."
-git clone --branch "${NANOPB_VERSION}" https://github.com/nanopb/nanopb.git "${NANOPB_TEMPDIR}"
-
-echo "Building nanopb..."
-pushd "${NANOPB_TEMPDIR}"
-./tools/make_mac_package.sh
-GIT_DESCRIPTION=`git describe --always`-macosx-x86
-NANOPB_BIN_DIR="dist/${GIT_DESCRIPTION}"
-popd
-
-echo "Removing existing generated protos..."
-rm -rf "${PROTOGEN_DIR}/*"
-
-echo "Generating nanopb protos..."
-python "${REPO_DIR}/Firebase/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py" \
-  --nanopb \
-  --protos_dir="${PROTO_DIR}" \
-  --pythonpath="${NANOPB_TEMPDIR}/${NANOPB_BIN_DIR}/generator" \
-  --output_dir="${PROTOGEN_DIR}" \
-  --include="${PROTO_DIR}"
-
-rm -rf "${NANOPB_TEMPDIR}"

+ 0 - 323
Firebase/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py

@@ -1,323 +0,0 @@
-#! /usr/bin/env python
-
-# 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.
-
-"""Builds nanopb protos by calling a proto generator wrapper.
-
-Example usage:
-
-python Firebase/Core/nanopb_build_protos.py \
-  --nanopb \
-  --protos_dir=Firebase/Core/Protos/ \
-  --pythonpath=Firebase/Core/nanopb_temp/generator/ \
-  --output_dir=Firebase/Core/Protos/
-"""
-
-from __future__ import print_function
-
-import sys
-
-import argparse
-import os
-import os.path
-import re
-import subprocess
-
-OBJC_GENERATOR='nanopb_proto_generator.py'
-
-COPYRIGHT_NOTICE = '''
-/*
- * 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.
- */
-'''.lstrip()
-
-
-def main():
-  parser = argparse.ArgumentParser(
-      description='Generates proto messages.')
-  parser.add_argument(
-      '--nanopb', action='store_true',
-      help='Generates nanopb messages.')
-  parser.add_argument(
-      '--objc', action='store_true',
-      help='Generates Objective-C messages.')
-  parser.add_argument(
-      '--protos_dir',
-      help='Source directory containing .proto files.')
-  parser.add_argument(
-      '--output_dir', '-d',
-      help='Directory to write files; subdirectories will be created.')
-  parser.add_argument(
-      '--protoc', default='protoc',
-      help='Location of the protoc executable')
-  parser.add_argument(
-      '--pythonpath',
-      help='Location of the protoc python library.')
-  parser.add_argument(
-      '--include', '-I', action='append', default=[],
-      help='Adds INCLUDE to the proto path.')
-
-
-  args = parser.parse_args()
-  if args.nanopb is None and args.objc is None:
-    parser.print_help()
-    sys.exit(1)
-
-  if args.protos_dir is None:
-    root_dir = os.path.abspath(os.path.dirname(__file__))
-    args.protos_dir = os.path.join(root_dir, 'protos')
-
-  if args.output_dir is None:
-    root_dir = os.path.abspath(os.path.dirname(__file__))
-    args.output_dir = os.path.join(root_dir, 'protogen-please-supply-an-outputdir')
-
-  all_proto_files = collect_files(args.protos_dir, '.proto')
-  if args.nanopb:
-    NanopbGenerator(args, all_proto_files).run()
-
-  proto_files = remove_well_known_protos(all_proto_files)
-
-  if args.objc:
-    ObjcProtobufGenerator(args, proto_files).run()
-
-
-class NanopbGenerator(object):
-  """Builds and runs the nanopb plugin to protoc."""
-
-  def __init__(self, args, proto_files):
-    self.args = args
-    self.proto_files = proto_files
-
-  def run(self):
-    """Performs the action of the generator."""
-
-    nanopb_out = os.path.join(self.args.output_dir, 'nanopb')
-    mkdir(nanopb_out)
-
-    self.__run_generator(nanopb_out)
-
-    sources = collect_files(nanopb_out, '.nanopb.h', '.nanopb.c')
-    post_process_files(
-        sources,
-        add_copyright,
-        nanopb_remove_extern_c,
-        nanopb_rename_delete,
-        nanopb_use_module_import
-    )
-
-  def __run_generator(self, out_dir):
-    """Invokes protoc using the nanopb plugin."""
-    cmd = protoc_command(self.args)
-
-    gen = os.path.join(os.path.dirname(__file__), OBJC_GENERATOR)
-    cmd.append('--plugin=protoc-gen-nanopb=%s' % gen)
-
-    nanopb_flags = [
-        '--extension=.nanopb',
-        '--source-extension=.c',
-        '--no-timestamp'
-    ]
-    nanopb_flags.extend(['-I%s' % path for path in self.args.include])
-    cmd.append('--nanopb_out=%s:%s' % (' '.join(nanopb_flags), out_dir))
-
-    cmd.extend(self.proto_files)
-    run_protoc(self.args, cmd)
-
-
-def protoc_command(args):
-  """Composes the initial protoc command-line including its include path."""
-  cmd = [args.protoc]
-  if args.include is not None:
-    cmd.extend(['-I=%s' % path for path in args.include])
-  return cmd
-
-
-def run_protoc(args, cmd):
-  """Actually runs the given protoc command.
-
-  Args:
-    args: The command-line args (including pythonpath)
-    cmd: The command to run expressed as a list of strings
-  """
-
-  kwargs = {}
-  if args.pythonpath:
-    env = os.environ.copy()
-    old_path = env.get('PYTHONPATH')
-    env['PYTHONPATH'] = os.path.expanduser(args.pythonpath)
-    if old_path is not None:
-      env['PYTHONPATH'] += os.pathsep + old_path
-    kwargs['env'] = env
-
-  try:
-    print(subprocess.check_output(cmd, stderr=subprocess.STDOUT, **kwargs))
-  except subprocess.CalledProcessError as error:
-    print('command failed: ', ' '.join(cmd), '\nerror: ', error.output)
-
-
-def remove_well_known_protos(filenames):
-  """Remove "well-known" protos for objc.
-
-  On those platforms we get these for free as a part of the protobuf runtime.
-  We only need them for nanopb.
-
-  Args:
-    filenames: A list of filenames, each naming a .proto file.
-
-  Returns:
-    The filenames with members of google/protobuf removed.
-  """
-
-  return [f for f in filenames if 'protos/google/protobuf/' not in f]
-
-
-def post_process_files(filenames, *processors):
-  for filename in filenames:
-    lines = []
-    with open(filename, 'r') as fd:
-      lines = fd.readlines()
-
-    for processor in processors:
-      lines = processor(lines)
-
-    write_file(filename, lines)
-
-
-def write_file(filename, lines):
-  mkdir(os.path.dirname(filename))
-  with open(filename, 'w') as fd:
-    fd.write(''.join(lines))
-
-
-def add_copyright(lines):
-  """Adds a copyright notice to the lines."""
-  result = [COPYRIGHT_NOTICE, '\n']
-  result.extend(lines)
-  return result
-
-
-def nanopb_remove_extern_c(lines):
-  """Removes extern "C" directives from nanopb code.
-
-  Args:
-    lines: A nanobp-generated source file, split into lines.
-  Returns:
-    A list of strings, similar to the input but modified to remove extern "C".
-  """
-  result = []
-  state = 'initial'
-  for line in lines:
-    if state == 'initial':
-      if '#ifdef __cplusplus' in line:
-        state = 'in-ifdef'
-        continue
-
-      result.append(line)
-
-    elif state == 'in-ifdef':
-      if '#endif' in line:
-        state = 'initial'
-
-  return result
-
-
-def nanopb_rename_delete(lines):
-  """Renames a delete symbol to delete_.
-
-  If a proto uses a field named 'delete', nanopb happily uses that in the
-  message definition. Works fine for C; not so much for C++.
-
-  Args:
-    lines: The lines to fix.
-
-  Returns:
-    The lines, fixed.
-  """
-  delete_keyword = re.compile(r'\bdelete\b')
-  return [delete_keyword.sub('delete_', line) for line in lines]
-
-
-def nanopb_use_module_import(lines):
-  """Changes #include <pb.h> to include <nanopb/pb.h>""" # Don't let Copybara alter these lines.
-  return [line.replace('#include <pb.h>', '{}include <nanopb/pb.h>'.format("#")) for line in lines]
-
-
-def strip_trailing_whitespace(lines):
-  """Removes trailing whitespace from the given lines."""
-  return [line.rstrip() + '\n' for line in lines]
-
-
-def objc_flatten_imports(lines):
-  """Flattens the import statements for compatibility with CocoaPods."""
-
-  long_import = re.compile(r'#import ".*/')
-  return [long_import.sub('#import "', line) for line in lines]
-
-
-def objc_strip_extension_registry(lines):
-  """Removes extensionRegistry methods from the classes."""
-  skip = False
-  result = []
-  for line in lines:
-    if '+ (GPBExtensionRegistry*)extensionRegistry {' in line:
-      skip = True
-    if not skip:
-      result.append(line)
-    elif line == '}\n':
-      skip = False
-
-  return result
-
-
-def collect_files(root_dir, *extensions):
-  """Finds files with the given extensions in the root_dir.
-
-  Args:
-    root_dir: The directory from which to start traversing.
-    *extensions: Filename extensions (including the leading dot) to find.
-
-  Returns:
-    A list of filenames, all starting with root_dir, that have one of the given
-    extensions.
-  """
-  result = []
-  for root, _, files in os.walk(root_dir):
-    for basename in files:
-      for ext in extensions:
-        if basename.endswith(ext):
-          filename = os.path.join(root, basename)
-          result.append(filename)
-  return result
-
-
-def mkdir(dirname):
-  if not os.path.isdir(dirname):
-    os.makedirs(dirname)
-
-
-if __name__ == '__main__':
-  main()

+ 0 - 221
Firebase/CoreDiagnostics/ProtoSupport/nanopb_proto_generator.py

@@ -1,221 +0,0 @@
-#!/usr/bin/env python
-
-# 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.
-
-"""Generates and massages protocol buffer outputs.
-"""
-
-from __future__ import print_function
-
-import sys
-
-import io
-import nanopb_generator as nanopb
-import os
-import os.path
-import shlex
-
-from google.protobuf.descriptor_pb2 import FieldDescriptorProto
-
-# The plugin_pb2 package loads descriptors on import, but doesn't defend
-# against multiple imports. Reuse the plugin package as loaded by the
-# nanopb_generator.
-plugin_pb2 = nanopb.plugin_pb2
-nanopb_pb2 = nanopb.nanopb_pb2
-
-
-def main():
-  # Parse request
-  data = io.open(sys.stdin.fileno(), 'rb').read()
-  request = plugin_pb2.CodeGeneratorRequest.FromString(data)
-
-  # Preprocess inputs, changing types and nanopb defaults
-  options = nanopb_parse_options(request)
-  use_anonymous_oneof(request)
-  use_bytes_for_strings(request)
-
-  # Generate code
-  parsed_files = nanopb_parse_files(request, options)
-  results = nanopb_generate(request, options, parsed_files)
-  response = nanopb_write(results)
-
-  # Write to stdout
-  io.open(sys.stdout.fileno(), 'wb').write(response.SerializeToString())
-
-
-def use_anonymous_oneof(request):
-  """Use anonymous unions for oneofs if they're the only one in a message.
-
-  Equivalent to setting this option on messages where it applies:
-
-    option (nanopb).anonymous_oneof = true;
-
-  Args:
-    request: A CodeGeneratorRequest from protoc. The descriptors are modified
-      in place.
-  """
-  for _, message_type in iterate_messages(request):
-    if len(message_type.oneof_decl) == 1:
-      ext = message_type.options.Extensions[nanopb_pb2.nanopb_msgopt]
-      ext.anonymous_oneof = True
-
-
-def use_bytes_for_strings(request):
-  """Always use the bytes type instead of string.
-
-  By default, nanopb renders proto strings as having the C type char* and does
-  not include a separate size field, getting the length of the string via
-  strlen(). Unfortunately this prevents using strings with embedded nulls,
-  which is something the wire format supports.
-
-  Fortunately, string and bytes proto fields are identical on the wire and
-  nanopb's bytes representation does have an explicit length, so this function
-  changes the types of all string fields to bytes. The generated code will now
-  contain pb_bytes_array_t.
-
-  There's no nanopb or proto option to control this behavior. The equivalent
-  would be to hand edit all the .proto files :-(.
-
-  Args:
-    request: A CodeGeneratorRequest from protoc. The descriptors are modified
-      in place.
-  """
-  for names, message_type in iterate_messages(request):
-    for field in message_type.field:
-      if field.type == FieldDescriptorProto.TYPE_STRING:
-        field.type = FieldDescriptorProto.TYPE_BYTES
-
-
-def iterate_messages(request):
-  """Iterates over all messages in all files in the request.
-
-  Args:
-    request: A CodeGeneratorRequest passed by protoc.
-
-  Yields:
-    names: a nanopb.Names object giving a qualified name for the message
-    message_type: a DescriptorProto for the message.
-  """
-  for fdesc in request.proto_file:
-    for names, message_type in nanopb.iterate_messages(fdesc):
-      yield names, message_type
-
-
-def nanopb_parse_options(request):
-  """Parses nanopb_generator command-line options from the given request.
-
-  Args:
-    request: A CodeGeneratorRequest passed by protoc.
-
-  Returns:
-    Nanopb's options object, obtained via optparser.
-  """
-  # Parse options the same as nanopb_generator.main_plugin() does.
-  args = shlex.split(request.parameter)
-  options, _ = nanopb.optparser.parse_args(args)
-
-  # Force certain options
-  options.extension = '.nanopb'
-  options.verbose = True
-  
-  # Replicate options setup from nanopb_generator.main_plugin.
-  nanopb.Globals.verbose_options = options.verbose
-
-  # Google's protoc does not currently indicate the full path of proto files.
-  # Instead always add the main file path to the search dirs, that works for
-  # the common case.
-  options.options_path.append(os.path.dirname(request.file_to_generate[0]))
-  return options
-
-
-def nanopb_parse_files(request, options):
-  """Parses the files in the given request into nanopb ProtoFile objects.
-
-  Args:
-    request: A CodeGeneratorRequest, as passed by protoc.
-    options: The command-line options from nanopb_parse_options.
-
-  Returns:
-    A dictionary of filename to nanopb.ProtoFile objects, each one representing
-    the parsed form of a FileDescriptor in the request.
-  """
-  # Process any include files first, in order to have them
-  # available as dependencies
-  parsed_files = {}
-  for fdesc in request.proto_file:
-    parsed_files[fdesc.name] = nanopb.parse_file(fdesc.name, fdesc, options)
-
-  return parsed_files
-
-
-def nanopb_generate(request, options, parsed_files):
-  """Generates C sources from the given parsed files.
-
-  Args:
-    request: A CodeGeneratorRequest, as passed by protoc.
-    options: The command-line options from nanopb_parse_options.
-    parsed_files: A dictionary of filename to nanopb.ProtoFile, as returned by
-      nanopb_parse_files().
-
-  Returns:
-    A list of nanopb output dictionaries, each one representing the code
-    generation result for each file to generate. The output dictionaries have
-    the following form:
-
-        {
-          'headername': Name of header file, ending in .h,
-          'headerdata': Contents of the header file,
-          'sourcename': Name of the source code file, ending in .c,
-          'sourcedata': Contents of the source code file
-        }
-  """
-  output = []
-
-  for filename in request.file_to_generate:
-    for fdesc in request.proto_file:
-      if fdesc.name == filename:
-        results = nanopb.process_file(filename, fdesc, options, parsed_files)
-        output.append(results)
-
-  return output
-
-
-def nanopb_write(results):
-  """Translates nanopb output dictionaries to a CodeGeneratorResponse.
-
-  Args:
-    results: A list of generated source dictionaries, as returned by
-      nanopb_generate().
-
-  Returns:
-    A CodeGeneratorResponse describing the result of the code generation
-    process to protoc.
-  """
-  response = plugin_pb2.CodeGeneratorResponse()
-
-  for result in results:
-    f = response.file.add()
-    f.name = result['headername']
-    f.content = result['headerdata']
-
-    f = response.file.add()
-    f.name = result['sourcename']
-    f.content = result['sourcedata']
-
-  return response
-
-
-if __name__ == '__main__':
-  main()

+ 0 - 25
Firebase/CoreDiagnostics/generate_project.sh

@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# Copyright 2018 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.
-#
-
-readonly REPO_DIR="$( git rev-parse --show-toplevel )"
-
-"$REPO_DIR/Firebase/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh" || {
-  echo "Something went wrong generating protos."
-  exit 1
-}
-
-pod gen "${REPO_DIR}/FirebaseCoreDiagnostics.podspec" --auto-open --gen-directory="${REPO_DIR}/gen" --local-sources="${REPO_DIR}/" --platforms=ios,macos,tvos --clean

+ 0 - 1
FirebaseAppCheck/Apps/FIRAppCheckTestApp/Podfile

@@ -11,5 +11,4 @@ target 'FIRAppCheckTestApp' do
   pod 'FirebaseAppCheck', :path => '../../../'
 
   pod 'FirebaseCore', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
 end

+ 0 - 1
FirebaseAuth/Tests/Sample/Podfile

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

+ 1 - 3
FirebaseCore.podspec

@@ -33,8 +33,7 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
 
   s.source_files = [
     'FirebaseCore/Sources/**/*.[mh]',
-    'FirebaseCore/Extension/*.h',
-    'Interop/CoreDiagnostics/Public/*.h'
+    'FirebaseCore/Extension/*.h'
   ]
 
   s.swift_version = '5.3'
@@ -50,7 +49,6 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
   # Remember to also update version in `cmake/external/GoogleUtilities.cmake`
   s.dependency 'GoogleUtilities/Environment', '~> 7.8'
   s.dependency 'GoogleUtilities/Logger', '~> 7.8'
-  s.dependency 'FirebaseCoreDiagnostics', '~> 10.0'
   s.dependency 'FirebaseCoreInternal', '~> 10.0'
 
   s.pod_target_xcconfig = {

+ 0 - 1
FirebaseCore/CMakeLists.txt

@@ -43,7 +43,6 @@ target_compile_definitions(
 target_link_libraries(
   FirebaseCore PRIVATE
   "-framework Foundation"
-  FirebaseCoreDiagnosticsInterop
   GoogleUtilities
 )
 

+ 0 - 35
FirebaseCore/Extension/FIRCoreDiagnosticsConnector.h

@@ -1,35 +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>
-
-@class FIRDiagnosticsData;
-@class FIROptions;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** Connects FirebaseCore with the CoreDiagnostics library. */
-@interface FIRCoreDiagnosticsConnector : NSObject
-
-/** Logs FirebaseCore related data.
- *
- * @param options The options object containing data to log.
- */
-+ (void)logCoreTelemetryWithOptions:(FIROptions *)options;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 1
FirebaseCore/Extension/FirebaseCoreInternal.h

@@ -18,7 +18,6 @@
 #import "FIRComponent.h"
 #import "FIRComponentContainer.h"
 #import "FIRComponentType.h"
-#import "FIRCoreDiagnosticsConnector.h"
 #import "FIRDependency.h"
 #import "FIRHeartbeatInfo.h"
 #import "FIRHeartbeatLogger.h"

+ 0 - 29
FirebaseCore/Sources/FIRApp.m

@@ -35,7 +35,6 @@
 #import "FirebaseCore/Sources/FIRFirebaseUserAgent.h"
 
 #import "FirebaseCore/Extension/FIRAppInternal.h"
-#import "FirebaseCore/Extension/FIRCoreDiagnosticsConnector.h"
 #import "FirebaseCore/Extension/FIRHeartbeatLogger.h"
 #import "FirebaseCore/Extension/FIRLibrary.h"
 #import "FirebaseCore/Extension/FIRLogger.h"
@@ -46,26 +45,6 @@
 
 #import <objc/runtime.h>
 
-// The kFIRService strings are only here while transitioning CoreDiagnostics from the Analytics
-// pod to a Core dependency. These symbols are not used and should be deleted after the transition.
-NSString *const kFIRServiceAdMob;
-NSString *const kFIRServiceAuth;
-NSString *const kFIRServiceAuthUI;
-NSString *const kFIRServiceCrash;
-NSString *const kFIRServiceDatabase;
-NSString *const kFIRServiceDynamicLinks;
-NSString *const kFIRServiceFirestore;
-NSString *const kFIRServiceFunctions;
-NSString *const kFIRServiceInstanceID;
-NSString *const kFIRServiceInvites;
-NSString *const kFIRServiceMessaging;
-NSString *const kFIRServiceMeasurement;
-NSString *const kFIRServicePerformance;
-NSString *const kFIRServiceRemoteConfig;
-NSString *const kFIRServiceStorage;
-NSString *const kGGLServiceAnalytics;
-NSString *const kGGLServiceSignIn;
-
 NSString *const kFIRDefaultAppName = @"__FIRAPP_DEFAULT";
 NSString *const kFIRAppReadyToConfigureSDKNotification = @"FIRAppReadyToConfigureSDKNotification";
 NSString *const kFIRAppDeleteNotification = @"FIRAppDeleteNotification";
@@ -895,16 +874,8 @@ static FIRApp *sDefaultApp;
 }
 
 - (void)appDidBecomeActive:(NSNotification *)notification {
-  [self logCoreTelemetryIfEnabled];
-}
-
-- (void)logCoreTelemetryIfEnabled {
   if ([self isDataCollectionDefaultEnabled]) {
     [self.heartbeatLogger log];
-    // TODO(ncooke3): Remove below code when CoreDiagnostics is removed.
-    dispatch_async(dispatch_get_global_queue(QOS_CLASS_UTILITY, 0), ^{
-      [FIRCoreDiagnosticsConnector logCoreTelemetryWithOptions:[self options]];
-    });
   }
 }
 

+ 0 - 61
FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m

@@ -1,61 +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 "FirebaseCore/Extension/FIRCoreDiagnosticsConnector.h"
-
-#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h"
-
-#import "FirebaseCore/Sources/Public/FirebaseCore/FIROptions.h"
-
-#import "FirebaseCore/Extension/FIRAppInternal.h"
-#import "FirebaseCore/Extension/FIROptionsInternal.h"
-#import "FirebaseCore/Sources/FIRDiagnosticsData.h"
-
-// Define the interop class symbol declared as an extern in FIRCoreDiagnosticsInterop.
-Class<FIRCoreDiagnosticsInterop> FIRCoreDiagnosticsImplementation;
-
-@implementation FIRCoreDiagnosticsConnector
-
-+ (void)initialize {
-  if (!FIRCoreDiagnosticsImplementation) {
-    FIRCoreDiagnosticsImplementation = NSClassFromString(@"FIRCoreDiagnostics");
-    if (FIRCoreDiagnosticsImplementation) {
-      NSAssert([FIRCoreDiagnosticsImplementation
-                   conformsToProtocol:@protocol(FIRCoreDiagnosticsInterop)],
-               @"If FIRCoreDiagnostics is implemented, it must conform to the interop protocol.");
-      NSAssert(
-          [FIRCoreDiagnosticsImplementation respondsToSelector:@selector(sendDiagnosticsData:)],
-          @"If FIRCoreDiagnostics is implemented, it must implement +sendDiagnosticsData.");
-    }
-  }
-}
-
-+ (void)logCoreTelemetryWithOptions:(FIROptions *)options {
-  if (FIRCoreDiagnosticsImplementation) {
-    FIRDiagnosticsData *diagnosticsData = [[FIRDiagnosticsData alloc] init];
-    [diagnosticsData insertValue:@(YES) forKey:kFIRCDIsDataCollectionDefaultEnabledKey];
-    [diagnosticsData insertValue:[FIRApp firebaseUserAgent] forKey:kFIRCDFirebaseUserAgentKey];
-    [diagnosticsData insertValue:@(FIRConfigTypeCore) forKey:kFIRCDConfigurationTypeKey];
-    [diagnosticsData insertValue:options.googleAppID forKey:kFIRCDGoogleAppIDKey];
-    [diagnosticsData insertValue:options.bundleID forKey:kFIRCDBundleIDKey];
-    [diagnosticsData insertValue:@(options.usingOptionsFromDefaultPlist)
-                          forKey:kFIRCDUsingOptionsFromDefaultPlistKey];
-    [diagnosticsData insertValue:options.libraryVersionID forKey:kFIRCDLibraryVersionIDKey];
-    [FIRCoreDiagnosticsImplementation sendDiagnosticsData:diagnosticsData];
-  }
-}
-
-@end

+ 0 - 35
FirebaseCore/Sources/FIRDiagnosticsData.h

@@ -1,35 +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 "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** Implements the FIRCoreDiagnosticsData protocol to log diagnostics data. */
-@interface FIRDiagnosticsData : NSObject <FIRCoreDiagnosticsData>
-
-/** Inserts values into the diagnosticObjects dictionary if the value isn't nil.
- *
- * @param value The value to insert if it's not nil.
- * @param key The key to associate it with.
- */
-- (void)insertValue:(nullable id)value forKey:(NSString *)key;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 66
FirebaseCore/Sources/FIRDiagnosticsData.m

@@ -1,66 +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 "FirebaseCore/Sources/FIRDiagnosticsData.h"
-
-#import "FirebaseCore/Sources/Public/FirebaseCore/FIRApp.h"
-
-#import "FirebaseCore/Extension/FIRAppInternal.h"
-#import "FirebaseCore/Extension/FIROptionsInternal.h"
-
-@implementation FIRDiagnosticsData {
-  /** Backing ivar for the diagnosticObjects property. */
-  NSMutableDictionary<NSString *, id> *_diagnosticObjects;
-}
-
-- (instancetype)init {
-  self = [super init];
-  if (self) {
-    _diagnosticObjects = [[NSMutableDictionary alloc] init];
-  }
-  return self;
-}
-
-- (void)insertValue:(nullable id)value forKey:(NSString *)key {
-  if (key) {
-    _diagnosticObjects[key] = value;
-  }
-}
-
-#pragma mark - FIRCoreDiagnosticsData
-
-- (NSDictionary<NSString *, id> *)diagnosticObjects {
-  if (!_diagnosticObjects[kFIRCDllAppsCountKey]) {
-    _diagnosticObjects[kFIRCDllAppsCountKey] = @([FIRApp allApps].count);
-  }
-  if (!_diagnosticObjects[kFIRCDIsDataCollectionDefaultEnabledKey]) {
-    _diagnosticObjects[kFIRCDIsDataCollectionDefaultEnabledKey] =
-        @([[FIRApp defaultApp] isDataCollectionDefaultEnabled]);
-  }
-  if (!_diagnosticObjects[kFIRCDFirebaseUserAgentKey]) {
-    _diagnosticObjects[kFIRCDFirebaseUserAgentKey] = [FIRApp firebaseUserAgent];
-  }
-  return _diagnosticObjects;
-}
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wunused-parameter"
-- (void)setDiagnosticObjects:(NSDictionary<NSString *, id> *)diagnosticObjects {
-  NSAssert(NO, @"Please use -insertValue:forKey:");
-}
-#pragma clang diagnostic pop
-
-@end

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

@@ -30,7 +30,6 @@
 #import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import "FirebaseCore/Extension/FIRAppInternal.h"
 #import "FirebaseCore/Extension/FIRComponentType.h"
-#import "FirebaseCore/Extension/FIRCoreDiagnosticsConnector.h"
 #import "FirebaseCore/Extension/FIRHeartbeatLogger.h"
 #import "FirebaseCore/Extension/FIROptionsInternal.h"
 #import "FirebaseCore/Sources/FIRAnalyticsConfiguration.h"
@@ -66,7 +65,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
 @interface FIRAppTest : FIRTestCase
 
 @property(nonatomic) id appClassMock;
-@property(nonatomic) id mockCoreDiagnosticsConnector;
 @property(nonatomic) NSNotificationCenter *notificationCenter;
 @property(nonatomic) id mockHeartbeatLogger;
 
@@ -83,7 +81,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   [FIRApp resetApps];
   // TODO: Don't mock the class we are testing.
   _appClassMock = OCMClassMock([FIRApp class]);
-  _mockCoreDiagnosticsConnector = OCMClassMock([FIRCoreDiagnosticsConnector class]);
 
   // Set up mocks for all instances of `FIRHeartbeatLogger`.
   _mockHeartbeatLogger = OCMClassMock([FIRHeartbeatLogger class]);
@@ -93,13 +90,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   [FIROptionsMock mockFIROptions];
 
   self.assertNoLogCoreTelemetry = NO;
-  OCMStub(ClassMethod([self.mockCoreDiagnosticsConnector logCoreTelemetryWithOptions:[OCMArg any]]))
-      .andDo(^(NSInvocation *invocation) {
-        if (self.assertNoLogCoreTelemetry) {
-          XCTFail(@"Method `-[mockCoreDiagnosticsConnector logCoreTelemetryWithOptions:]` must not "
-                  @"be called");
-        }
-      });
 
   // TODO: Remove all usages of defaultCenter in Core, then we can instantiate an instance here to
   //       inject instead of using defaultCenter.
@@ -116,7 +106,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   [_appClassMock stopMocking];
   _appClassMock = nil;
   _notificationCenter = nil;
-  _mockCoreDiagnosticsConnector = nil;
   _mockHeartbeatLogger = nil;
 
   [super tearDown];
@@ -128,7 +117,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   // Doing this in the instance `tearDown` causes test failures due to a race
   // condition between `NSNoticationCenter` and `OCMVerifyAllWithDelay`.
   // Affected tests:
-  // - testCoreDiagnosticsLoggedWhenAppDidBecomeActive
   // - testHeartbeatLogIsAttemptedWhenAppDidBecomeActive
   [OCMClassMock([FIRHeartbeatLogger class]) stopMocking];
   [super tearDown];
@@ -778,7 +766,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   [self.notificationCenter postNotificationName:[self appDidBecomeActiveNotificationName]
                                          object:nil];
   // Wait for some time because diagnostics is logged asynchronously.
-  OCMVerifyAllWithDelay(self.mockCoreDiagnosticsConnector, 1);
+  OCMVerifyAll(self.mockHeartbeatLogger);
 }
 
 #pragma mark - Analytics Flag Tests
@@ -839,16 +827,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
 
 #pragma mark - Core Telemetry
 
-- (void)testCoreDiagnosticsLoggedWhenAppDidBecomeActive {
-  FIRApp *app = [self createConfiguredAppWithName:NSStringFromSelector(_cmd)];
-  [self expectCoreDiagnosticsDataLogWithOptions:app.options];
-
-  [self.notificationCenter postNotificationName:[self appDidBecomeActiveNotificationName]
-                                         object:nil];
-
-  OCMVerifyAllWithDelay(self.mockCoreDiagnosticsConnector, 0.5);
-}
-
 - (void)testHeartbeatLogIsAttemptedWhenAppDidBecomeActive {
   [self createConfiguredAppWithName:NSStringFromSelector(_cmd)];
   OCMExpect([self.mockHeartbeatLogger log]).andDo(nil);
@@ -882,21 +860,6 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
   };
 }
 
-- (void)expectCoreDiagnosticsDataLogWithOptions:(nullable FIROptions *)expectedOptions {
-  [self.mockCoreDiagnosticsConnector stopMocking];
-  self.mockCoreDiagnosticsConnector = nil;
-  self.mockCoreDiagnosticsConnector = OCMClassMock([FIRCoreDiagnosticsConnector class]);
-
-  OCMExpect(ClassMethod([self.mockCoreDiagnosticsConnector
-      logCoreTelemetryWithOptions:[OCMArg checkWithBlock:^BOOL(FIROptions *options) {
-        if (!expectedOptions) {
-          return YES;
-        }
-        return [options.googleAppID isEqualToString:expectedOptions.googleAppID] &&
-               [options.GCMSenderID isEqualToString:expectedOptions.GCMSenderID];
-      }]]));
-}
-
 - (NSNotificationName)appDidBecomeActiveNotificationName {
 #if TARGET_OS_IOS || TARGET_OS_TV
   return UIApplicationDidBecomeActiveNotification;

+ 0 - 48
FirebaseCore/Tests/Unit/FIRDiagnosticsDataTest.m

@@ -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.
- */
-
-#import <XCTest/XCTest.h>
-
-#import "FirebaseCore/Sources/FIRDiagnosticsData.h"
-
-@interface FIRDiagnosticsDataTest : XCTestCase
-
-@end
-
-@implementation FIRDiagnosticsDataTest
-
-/** Tests initialization. */
-- (void)testInit {
-  FIRDiagnosticsData *data = [[FIRDiagnosticsData alloc] init];
-  XCTAssertNotNil(data);
-}
-
-/** Tests that -diagnosticObjects returns a valid default dictionary. */
-- (void)testFIRCoreDiagnosticsData {
-  FIRDiagnosticsData *data = [[FIRDiagnosticsData alloc] init];
-  XCTAssertNotNil(data.diagnosticObjects);
-  XCTAssertNotNil(data.diagnosticObjects[kFIRCDIsDataCollectionDefaultEnabledKey]);
-  XCTAssertNotNil(data.diagnosticObjects[kFIRCDllAppsCountKey]);
-  XCTAssertNotNil(data.diagnosticObjects[kFIRCDFirebaseUserAgentKey]);
-}
-
-/** Tests that setting diagnosticObjects throws. */
-- (void)testSettingDiagnosticObjectsThrows {
-  FIRDiagnosticsData *data = [[FIRDiagnosticsData alloc] init];
-  XCTAssertThrows(data.diagnosticObjects = @{});
-}
-
-@end

+ 0 - 78
FirebaseCoreDiagnostics.podspec

@@ -1,78 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseCoreDiagnostics'
-  s.version          = '10.0.0'
-  s.summary          = 'Firebase Core Diagnostics'
-
-  s.description      = <<-DESC
-Firebase Core Diagnostics collects diagnostic data to help improve and provide Firebase services.
-This SDK is integrated using a 'soft-link' mechanism and the bits be omitted by using a
-non-Cocoapod integration. This library also respects the Firebase global data collection flag.
-                       DESC
-
-  s.homepage         = 'https://firebase.google.com'
-  s.license          = { :type => 'Apache-2.0', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'CocoaPods-' + s.version.to_s
-  }
-
-  s.social_media_url = 'https://twitter.com/Firebase'
-
-  ios_deployment_target = '10.0'
-  osx_deployment_target = '10.13'
-  tvos_deployment_target = '12.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
-
-  s.cocoapods_version = '>= 1.4.0'
-  s.prefix_header_file = false
-
-  header_search_paths = {
-    'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
-  }
-
-  s.pod_target_xcconfig = {
-    'GCC_C_LANGUAGE_STANDARD' => 'c99',
-    'GCC_TREAT_WARNINGS_AS_ERRORS' => 'YES',
-    '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',
-  }.merge(header_search_paths)
-
-  s.source_files = [
-    'Firebase/CoreDiagnostics/FIRCDLibrary/**/*.[cmh]',
-    'Interop/CoreDiagnostics/Public/*.h',
-  ]
-  s.public_header_files = 'Firebase/CoreDiagnostics/FIRCDLibrary/Public/*.h'
-
-  s.framework = 'Foundation'
-
-  s.dependency 'GoogleDataTransport', '~> 9.2'
-  s.dependency 'GoogleUtilities/Environment', '~> 7.8'
-  s.dependency 'GoogleUtilities/Logger', '~> 7.8'
-  s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'
-
-  s.test_spec 'unit' do |unit_tests|
-    unit_tests.scheme = { :code_coverage => true }
-    unit_tests.platforms = {
-      :ios => ios_deployment_target,
-      :osx => osx_deployment_target,
-      :tvos => tvos_deployment_target
-    }
-    unit_tests.dependency 'GoogleUtilities/UserDefaults', '~> 7.8'
-    unit_tests.dependency 'OCMock'
-    unit_tests.source_files = [
-      'Example/CoreDiagnostics/Tests/**/*.[mh]',
-    ]
-    unit_tests.requires_app_host = false
-  end
-end

+ 0 - 1
FirebaseDynamicLinks/Tests/Sample/Podfile

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

+ 0 - 1
FirebaseInAppMessaging/Swift/Tests/Integration/FIAMSwiftUI/Podfile

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

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

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

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

@@ -7,7 +7,6 @@ source 'https://cdn.cocoapods.org/'
 pod 'FirebaseAnalytics'
 pod 'FirebaseCore', :path => '../../../..'
 pod 'FirebaseInstallations', :path => '../../../..'
-pod 'FirebaseCoreDiagnostics', :path => '../../../..'
 pod 'FirebaseABTesting', :path => '../../../..'
 
 target 'InAppMessaging_Example_iOS' do

+ 0 - 1
FirebaseMLModelDownloader/Apps/Sample/Podfile

@@ -6,7 +6,6 @@ source 'https://github.com/firebase/SpecsStaging.git'
 source 'https://cdn.cocoapods.org/'
 
 pod 'FirebaseMLModelDownloader', :path => '../../../'
-pod 'FirebaseCoreDiagnostics', :path => '../../../'
 pod 'TensorFlowLiteSwift'
 
 target 'MLDownloaderTestApp' do

+ 0 - 1
FirebaseMessaging/Apps/AdvancedSample/Podfile

@@ -7,7 +7,6 @@ source 'https://cdn.cocoapods.org/'
 def shared_pods
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseMessaging', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'GoogleDataTransport'
 end

+ 0 - 1
FirebaseMessaging/Apps/Sample/Podfile

@@ -10,7 +10,6 @@ target 'Sample' do
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
   pod 'FirebaseMessaging', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseAnalytics', '>= 9.0.0'
 

+ 0 - 1
FirebaseMessaging/Apps/SwiftUISample/Podfile

@@ -9,7 +9,6 @@ target 'SwiftUISample' do
 
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseMessaging', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
 

+ 0 - 2
FirebasePerformance/Tests/FIRPerfE2E/Podfile

@@ -17,7 +17,6 @@ target 'FIRPerfE2EAutopush' do
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseABTesting', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
 
   # Other dependencies
   pod 'Protobuf'
@@ -39,7 +38,6 @@ target 'FIRPerfE2EProd' do
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseABTesting', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
 
   # Other dependencies
   pod 'Protobuf'

+ 0 - 1
FirebaseRemoteConfig/Tests/Sample/Podfile

@@ -11,7 +11,6 @@ target 'RemoteConfigSampleApp' do
   pod 'FirebaseAnalytics'
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseABTesting', :path => '../../..'

+ 0 - 1
FirebaseRemoteConfigSwift/Apps/SwiftUISample/Podfile

@@ -11,7 +11,6 @@ target 'SwiftUISample' do
   pod 'FirebaseAnalytics'
   pod 'FirebaseCore', :path => '../../../'
   pod 'FirebaseCoreInternal', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
   pod 'FirebaseInstallations', :path => '../../../'
   pod 'FirebaseRemoteConfig', :path => '../../../'
   pod 'FirebaseRemoteConfigSwift', :path => '../../../'

+ 0 - 2
Firestore/Example/Podfile

@@ -62,12 +62,10 @@ def configure_local_pods()
   # to its podspec can still function. See Firestore-*-xcodebuild in
   # scripts/install_prereqs.sh for more details.
   pod 'FirebaseCore', :path => '../..'
-  pod 'FirebaseCoreDiagnostics', :path => '../..'
   pod 'FirebaseCoreInternal',:path => '../..'
 
   # Pull in local sources conditionally.
   maybe_local_pod 'FirebaseAuth'
-  maybe_local_pod 'FirebaseCoreDiagnostics'
 end
 
 # Reads the value of the PLATFORM environment variable, converts it to the

+ 0 - 3
Interop/CoreDiagnostics/CHANGELOG.md

@@ -1,3 +0,0 @@
-# 1.0.0
-- Initial Release--for Google-use only. This library defines the interface
-needed to exchange data between FirebaseCore andFirebaseCoreDiagnostics.

+ 0 - 27
Interop/CoreDiagnostics/CMakeLists.txt

@@ -1,27 +0,0 @@
-# Copyright 2019 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.
-
-if(NOT APPLE)
-  return()
-endif()
-
-file(GLOB headers Public/*.h)
-firebase_ios_generate_dummy_source(FirebaseCoreDiagnosticsInterop sources)
-
-firebase_ios_add_framework(
-  FirebaseCoreDiagnosticsInterop DISABLE_STRICT_WARNINGS EXCLUDE_FROM_ALL
-  ${headers} ${sources}
-)
-
-firebase_ios_framework_public_headers(FirebaseCoreDiagnosticsInterop ${headers})

+ 0 - 61
Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h

@@ -1,61 +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>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** If present, is a BOOL wrapped in an NSNumber. */
-#define kFIRCDIsDataCollectionDefaultEnabledKey @"FIRCDIsDataCollectionDefaultEnabledKey"
-
-/** If present, is an int32_t wrapped in an NSNumber. */
-#define kFIRCDConfigurationTypeKey @"FIRCDConfigurationTypeKey"
-
-/** If present, is an NSString. */
-#define kFIRCDSdkNameKey @"FIRCDSdkNameKey"
-
-/** If present, is an NSString. */
-#define kFIRCDSdkVersionKey @"FIRCDSdkVersionKey"
-
-/** If present, is an int32_t wrapped in an NSNumber. */
-#define kFIRCDllAppsCountKey @"FIRCDllAppsCountKey"
-
-/** If present, is an NSString. */
-#define kFIRCDGoogleAppIDKey @"FIRCDGoogleAppIDKey"
-
-/** If present, is an NSString. */
-#define kFIRCDBundleIDKey @"FIRCDBundleID"
-
-/** If present, is a BOOL wrapped in an NSNumber. */
-#define kFIRCDUsingOptionsFromDefaultPlistKey @"FIRCDUsingOptionsFromDefaultPlistKey"
-
-/** If present, is an NSString. */
-#define kFIRCDLibraryVersionIDKey @"FIRCDLibraryVersionIDKey"
-
-/** If present, is an NSString. */
-#define kFIRCDFirebaseUserAgentKey @"FIRCDFirebaseUserAgentKey"
-
-/** Defines the interface of a data object needed to log diagnostics data. */
-@protocol FIRCoreDiagnosticsData <NSObject>
-
-@required
-
-/** A dictionary containing data (non-exhaustive) to be logged in diagnostics. */
-@property(nonatomic) NSDictionary<NSString *, id> *diagnosticObjects;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 34
Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h

@@ -1,34 +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 "FIRCoreDiagnosticsData.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** Allows the interoperation of FirebaseCore and FirebaseCoreDiagnostics. */
-@protocol FIRCoreDiagnosticsInterop <NSObject>
-
-/** Sends the given diagnostics data.
- *
- * @param diagnosticsData The diagnostics data object to send.
- */
-+ (void)sendDiagnosticsData:(id<FIRCoreDiagnosticsData>)diagnosticsData;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 2 - 18
Package.swift

@@ -208,7 +208,6 @@ let package = Package(
       name: "FirebaseCore",
       dependencies: [
         "Firebase",
-        "FirebaseCoreDiagnostics",
         "FirebaseCoreInternal",
         .product(name: "GULEnvironment", package: "GoogleUtilities"),
         .product(name: "GULLogger", package: "GoogleUtilities"),
@@ -276,23 +275,6 @@ let package = Package(
       path: "FirebaseCore/Internal/Tests"
     ),
 
-    .target(
-      name: "FirebaseCoreDiagnostics",
-      dependencies: [
-        .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
-        .product(name: "GULEnvironment", package: "GoogleUtilities"),
-        .product(name: "GULLogger", package: "GoogleUtilities"),
-        .product(name: "nanopb", package: "nanopb"),
-      ],
-      path: "Firebase/CoreDiagnostics/FIRCDLibrary",
-      publicHeadersPath: ".",
-      cSettings: [
-        .headerSearchPath("../../.."),
-        .define("PB_FIELD_32BIT", to: "1"),
-        .define("PB_NO_PACKED_STRUCTS", to: "1"),
-        .define("PB_ENABLE_MALLOC", to: "1"),
-      ]
-    ),
     .target(
       name: "FirebaseABTesting",
       dependencies: ["FirebaseCore"],
@@ -869,6 +851,7 @@ let package = Package(
       dependencies: [
         "FirebaseCore",
         "FirebaseInstallations",
+        .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
         .product(name: "GULLogger", package: "GoogleUtilities"),
         "SwiftProtobuf",
       ],
@@ -993,6 +976,7 @@ let package = Package(
                      "FirebaseAppCheckInterop",
                      "FirebaseAuthInterop",
                      "FirebaseMessagingInterop",
+                     "GoogleDataTransport",
                      "OCMock"],
       path: "SharedTestUtilities",
       publicHeadersPath: "./",

+ 0 - 1
SymbolCollisionTest/Podfile

@@ -14,7 +14,6 @@ target 'SymbolCollisionTest' do
     pod 'FirebaseAnalytics'
     pod 'FirebaseAuth', :path => '../'
     pod 'FirebaseCore', :path => '../'
-    pod 'FirebaseCoreDiagnostics', :path => '../'
     pod 'FirebaseCoreExtension', :path => '../'
     pod 'FirebaseCoreInternal', :path => '../'
     pod 'FirebaseCrashlytics', :path => '../'

+ 10 - 3
cmake/external/GoogleUtilities.cmake

@@ -4,7 +4,7 @@
 # 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
+# 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,
@@ -14,7 +14,14 @@
 
 include(ExternalProject)
 
-set(version 7.4.0)
+# When updating the below version, be sure to also update the `URL_HASH` in the
+# below `ExternalProject_Add` function. Update the `URL_HASH` by:
+# 1. Downloading the version's tarball from the URL below.
+#    - https://github.com/google/GoogleUtilities/archive/${version}.tar.gz
+# 2. Running `shasum` on the downloaded tarball.
+#    - `shasum -a 256 GoogleUtilities-${version}.tar.gz`
+# 3. Copying the output of the above command into the `URL_HASH` below.
+set(version 7.8.0)
 
 ExternalProject_Add(
   GoogleUtilities
@@ -22,7 +29,7 @@ ExternalProject_Add(
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
   DOWNLOAD_NAME GoogleUtilities-${version}.tar.gz
   URL https://github.com/google/GoogleUtilities/archive/${version}.tar.gz
-  URL_HASH SHA256=7770d19727e091ade5e9ff898822b1c3fd654f43ccad4c39809826e918a20fde
+  URL_HASH SHA256=8b66f0f70887e78465bfdef01bb43bdb27389ddcfbda14072ac5e8e26b656777
 
   PREFIX ${PROJECT_BINARY_DIR}
 

+ 0 - 1
scripts/check_imports.swift

@@ -38,7 +38,6 @@ let skipDirPatterns = ["/Sample/", "/Pods/",
 
   // The following are temporary skips pending working through a first pass of the repo:
   [
-    "Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb",
     "FirebaseDatabase/Sources/third_party/Wrap-leveldb", // Pending SwiftPM for leveldb.
     "Example",
     "Firestore",

+ 0 - 1
scripts/check_whitespace.sh

@@ -30,7 +30,6 @@ git grep "${options[@]}" -- \
     ':(exclude)cmake/external/snappy.patch' \
     ':(exclude)Crashlytics/ProtoSupport' \
     ':(exclude)Crashlytics/UnitTests/Data' \
-    ':(exclude)Firebase/CoreDiagnostics/ProtoSupport' \
     ':(exclude)CoreOnly/NOTICES' \
     ':(exclude)Firebase/Firebase/NOTICES' \
     ':(exclude)Firebase/InAppMessaging/ProtoSupport' \

+ 1 - 11
scripts/health_metrics/file_patterns.json

@@ -45,17 +45,7 @@
     "podspecs": ["FirebaseCore.podspec"],
     "filePatterns": [
       "^FirebaseCore.*",
-      "FirebaseCore.podspec",
-      "Interop/CoreDiagnostics/Public/[^/]+\\.h"
-    ]
-  },
-  {
-    "sdk": "core-diagnostics",
-    "podspecs": ["FirebaseCoreDiagnostics.podspec"],
-    "filePatterns": [
-      "Firebase/CoreDiagnostics/.*",
-      "Example/CoreDiagnostics/.*",
-      "Interop/CoreDiagnostics/Public/[^/]+\\.h"
+      "FirebaseCore.podspec"
     ]
   },
   {

+ 3 - 4
scripts/localize_podfile.swift

@@ -35,10 +35,9 @@ if arg_cnts > 2 {
 let implicitPods = [
   "FirebaseCore", "FirebaseInstallations", "Firebase",
   "FirebaseAuth", "FirebaseABTesting",
-  "FirebaseCoreDiagnostics", "FirebaseRemoteConfig",
-  "FirebaseCoreExtension", "FirebaseAppCheckInterop",
-  "FirebaseAuthInterop", "FirebaseMessagingInterop",
-  "FirebaseCoreInternal",
+  "FirebaseRemoteConfig", "FirebaseCoreExtension",
+  "FirebaseAppCheckInterop", "FirebaseAuthInterop",
+  "FirebaseMessagingInterop", "FirebaseCoreInternal",
   "FirebaseSharedSwift",
 ]