Sfoglia il codice sorgente

Consolidate CoreDiagnostics pods into Core

Paul Beusterien 6 anni fa
parent
commit
fc1014db9f
41 ha cambiato i file con 88 aggiunte e 277 eliminazioni
  1. 0 28
      .travis.yml
  2. 0 1
      CMakeLists.txt
  3. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_6_1_frameworks/Podfile
  4. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_6_1_staticLibs/Podfile
  5. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_frameworks/Podfile
  6. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_multiprojects_frameworks/Podfile
  7. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_multiprojects_staticLibs/Podfile
  8. 0 2
      CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_staticLibs/Podfile
  9. 0 2
      CoreOnly/Tests/FirebasePodTest/Podfile
  10. 0 1
      Dangerfile
  11. 0 2
      Example/Auth/AuthSample/Podfile
  12. 1 1
      Example/Core/Tests/FIRCoreDiagnosticsDateFileStorageTests.m
  13. 5 6
      Example/Core/Tests/FIRCoreDiagnosticsTest.m
  14. 1 1
      Example/Core/Tests/FIRDiagnosticsDataTest.m
  15. 0 0
      Firebase/Core/CoreDiagnostics/CHANGELOG.md
  16. 2 5
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.h
  17. 4 6
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m
  18. 0 0
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h
  19. 1 1
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.m
  20. 0 0
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.c
  21. 0 0
      Firebase/Core/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h
  22. 0 0
      Firebase/Core/CoreDiagnostics/ProtoSupport/Protos/firebasecore.options
  23. 0 0
      Firebase/Core/CoreDiagnostics/ProtoSupport/Protos/firebasecore.proto
  24. 0 0
      Firebase/Core/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh
  25. 0 0
      Firebase/Core/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py
  26. 0 0
      Firebase/Core/CoreDiagnostics/ProtoSupport/nanopb_proto_generator.py
  27. 1 1
      Firebase/Core/CoreDiagnostics/generate_project.sh
  28. 5 21
      Firebase/Core/FIRCoreDiagnosticsConnector.m
  29. 22 12
      Firebase/Core/FIRDiagnosticsData.h
  30. 34 1
      Firebase/Core/FIRDiagnosticsData.m
  31. 0 35
      Firebase/Core/Private/FIRDiagnosticsData.h
  32. 12 5
      FirebaseCore.podspec
  33. 0 59
      FirebaseCoreDiagnostics.podspec
  34. 0 29
      FirebaseCoreDiagnosticsInterop.podspec
  35. 0 2
      Firestore/Example/Podfile
  36. 0 2
      Functions/Example/Podfile
  37. 0 1
      InAppMessaging/Example/Podfile
  38. 0 1
      InAppMessagingDisplay/Example/Podfile
  39. 0 3
      Interop/CoreDiagnostics/CHANGELOG.md
  40. 0 27
      Interop/CoreDiagnostics/CMakeLists.txt
  41. 0 12
      scripts/install_prereqs.sh

+ 0 - 28
.travis.yml

@@ -61,33 +61,6 @@ jobs:
         - travis_retry ./scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=tvos --use-modular-headers
         - travis_retry ./scripts/pod_lib_lint.rb FirebaseCore.podspec --platforms=macos --use-modular-headers
 
-    - stage: test
-      env:
-        - PROJECT=CoreDiagnostics METHOD=pod-lib-lint
-      script:
-        - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=ios
-        - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=tvos
-        - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=macos
-
-    - stage: test
-      osx_image: xcode10.2
-      env:
-        - PROJECT=CoreDiagnostics METHOD=pod-lib-lint
-      script:
-        - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=ios
-
-    - stage: test
-      if: type = cron
-      env:
-        - PROJECT=CoreDiagnosticsCron METHOD=pod-lib-lint
-      script:
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=ios --use-libraries
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=tvos --use-libraries
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=macos --use-libraries
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=ios --use-modular-headers
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=tvos --use-modular-headers
-        - travis_retry ./scripts/pod_lib_lint.rb FirebaseCoreDiagnostics.podspec --platforms=macos --use-modular-headers
-
     - stage: test
       env:
         - PROJECT=ABTesting METHOD=pod-lib-lint
@@ -420,7 +393,6 @@ jobs:
       script:
         - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAnalyticsInterop.podspec
         - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseAuthInterop.podspec
-        - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseCoreDiagnosticsInterop.podspec
         - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInAppMessaging.podspec
         - travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.rb FirebaseInAppMessagingDisplay.podspec
 

+ 0 - 1
CMakeLists.txt

@@ -217,4 +217,3 @@ add_subdirectory(Firebase/Core)
 add_subdirectory(Firestore)
 add_subdirectory(GoogleUtilities)
 add_subdirectory(Interop/Auth)
-add_subdirectory(Interop/CoreDiagnostics)

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_6_1_frameworks/Podfile

@@ -5,8 +5,6 @@ target 'CocoapodsIntegrationTest' do
   use_frameworks!
 
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_6_1_staticLibs/Podfile

@@ -3,8 +3,6 @@ platform :ios, '9.0'
 
 target 'CocoapodsIntegrationTest' do
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_frameworks/Podfile

@@ -5,8 +5,6 @@ target 'CocoapodsIntegrationTest' do
   use_frameworks!
 
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_multiprojects_frameworks/Podfile

@@ -6,8 +6,6 @@ target 'CocoapodsIntegrationTest' do
   use_frameworks!
 
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_multiprojects_staticLibs/Podfile

@@ -3,8 +3,6 @@ platform :ios, '9.0'
 
 target 'CocoapodsIntegrationTest' do
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CocoapodsIntegrationTest/TestEnvironments/Cocoapods1_7_0_staticLibs/Podfile

@@ -3,8 +3,6 @@ platform :ios, '9.0'
 
 target 'CocoapodsIntegrationTest' do
   pod 'FirebaseCore', :path => '../'
-  pod 'FirebaseCoreDiagnostics', :path => '../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../'
   pod 'FirebaseAuth', :path => '../'
   pod 'FirebaseDatabase', :path => '../'
   pod 'FirebaseDynamicLinks', :path => '../'

+ 0 - 2
CoreOnly/Tests/FirebasePodTest/Podfile

@@ -10,8 +10,6 @@ target 'FirebasePodTest' do
   pod 'FirebaseAnalyticsInterop', :path => '../../../'
   pod 'FirebaseAuth', :path => '../../../'
   pod 'FirebaseAuthInterop', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../../../'
   pod 'FirebaseDatabase', :path => '../../../'
   pod 'FirebaseDynamicLinks', :path => '../../../'
   pod 'FirebaseFirestore', :path => '../../../'

+ 0 - 1
Dangerfile

@@ -72,7 +72,6 @@ has_license_changes = didModify(["LICENSE"])
 @has_auth_changes = hasChangesIn("Firebase/Auth")
 @has_core_changes = hasChangesIn([
   "Firebase/Core/",
-  "Firebase/CoreDiagnostics/",
   "CoreOnly/"])
 @has_database_changes = hasChangesIn("Firebase/Database/")
 @has_dynamiclinks_changes = hasChangesIn("Firebase/DynamicLinks/")

+ 0 - 2
Example/Auth/AuthSample/Podfile

@@ -9,8 +9,6 @@ use_frameworks!
 target 'AuthSample' do
   platform :ios, '8.0'
   pod 'FirebaseCore', :path => '../../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../../../'
   pod 'GoogleDataTransport', :path => '../../../'
   pod 'GoogleDataTransportCCTSupport', :path => '../../../'
   pod 'GoogleUtilities', :path => '../../../'

+ 1 - 1
Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsDateFileStorageTests.m → Example/Core/Tests/FIRCoreDiagnosticsDateFileStorageTests.m

@@ -15,7 +15,7 @@
  */
 
 #import <XCTest/XCTest.h>
-#import "FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
+#import "Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
 
 @interface FIRCoreDiagnosticsDateFileStorageTests : XCTestCase
 @property(nonatomic) NSURL *fileURL;

+ 5 - 6
Example/CoreDiagnostics/Tests/FIRCoreDiagnosticsTest.m → Example/Core/Tests/FIRCoreDiagnosticsTest.m

@@ -19,8 +19,6 @@
 #import <UIKit/UIKit.h>
 #endif  // TARGET_OS_IOS || TARGET_OS_TV
 
-#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsData.h>
-#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h>
 #import <GoogleDataTransport/GDTCOREvent.h>
 #import <GoogleDataTransport/GDTCOREventDataObject.h>
 #import <GoogleDataTransport/GDTCORTransport.h>
@@ -31,9 +29,10 @@
 #import <nanopb/pb_decode.h>
 #import <nanopb/pb_encode.h>
 
-#import "FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h"
-
-#import "FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
+#import "Firebase/Core/FIRDiagnosticsData.h"
+#import "Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.h"
+#import "Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
+#import "Firebase/Core/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h"
 
 extern NSString *const kFIRAppDiagnosticsNotification;
 extern NSString *const kFIRLastCheckinDateKey;
@@ -44,7 +43,7 @@ static NSString *const kLibraryVersionID = @"1.2.3";
 
 #pragma mark - Testing interfaces
 
-@interface FIRCoreDiagnostics : NSObject
+@interface FIRCoreDiagnostics (Test)
 // Initialization.
 + (instancetype)sharedInstance;
 - (instancetype)initWithTransport:(GDTCORTransport *)transport

+ 1 - 1
Example/Core/Tests/FIRDiagnosticsDataTest.m

@@ -16,7 +16,7 @@
 
 #import <XCTest/XCTest.h>
 
-#import <FirebaseCore/FIRDiagnosticsData.h>
+#import "Firebase/Core/FIRDiagnosticsData.h"
 
 @interface FIRDiagnosticsDataTest : XCTestCase
 

+ 0 - 0
Firebase/CoreDiagnostics/CHANGELOG.md → Firebase/Core/CoreDiagnostics/CHANGELOG.md


+ 2 - 5
Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h → Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.h

@@ -16,18 +16,15 @@
 
 #import <Foundation/Foundation.h>
 
-#import "FIRCoreDiagnosticsData.h"
-
 NS_ASSUME_NONNULL_BEGIN
 
-/** Allows the interoperation of FirebaseCore and FirebaseCoreDiagnostics. */
-@protocol FIRCoreDiagnosticsInterop <NSObject>
+@interface FIRCoreDiagnostics : NSObject
 
 /** Sends the given diagnostics data.
  *
  * @param diagnosticsData The diagnostics data object to send.
  */
-+ (void)sendDiagnosticsData:(id<FIRCoreDiagnosticsData>)diagnosticsData;
++ (void)sendDiagnosticsData:(nonnull id<FIRCoreDiagnosticsData>)diagnosticsData;
 
 @end
 

+ 4 - 6
Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m → Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m

@@ -25,16 +25,14 @@
 #import <GoogleUtilities/GULAppEnvironmentUtil.h>
 #import <GoogleUtilities/GULLogger.h>
 
-#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsData.h>
-#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h>
-
 #import <nanopb/pb.h>
 #import <nanopb/pb_decode.h>
 #import <nanopb/pb_encode.h>
 
-#import "FIRCDLibrary/Protogen/nanopb/firebasecore.nanopb.h"
+#import "Protogen/nanopb/firebasecore.nanopb.h"
+#import "FIRCoreDiagnosticsDateFileStorage.h"
+#import "Firebase/Core/FIRDiagnosticsData.h"
 
-#import "FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
 
 /** The logger service string to use when printing to the console. */
 static GULLoggerService kFIRCoreDiagnostics = @"[FirebaseCoreDiagnostics/FIRCoreDiagnostics]";
@@ -144,7 +142,7 @@ NSString *const kFIRCoreDiagnosticsHeartbeatDateFileName = @"FIREBASE_DIAGNOSTIC
 NS_ASSUME_NONNULL_BEGIN
 
 /** This class produces a protobuf containing diagnostics and usage data to be logged. */
-@interface FIRCoreDiagnostics : NSObject <FIRCoreDiagnosticsInterop>
+@interface FIRCoreDiagnostics : NSObject
 
 /** The queue on which all diagnostics collection will occur. */
 @property(nonatomic, readonly) dispatch_queue_t diagnosticsQueue;

+ 0 - 0
Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h → Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h


+ 1 - 1
Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.m → Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.m

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#import "FIRCDLibrary/FIRCoreDiagnosticsDateFileStorage.h"
+#import "FIRCoreDiagnosticsDateFileStorage.h"
 
 @interface FIRCoreDiagnosticsDateFileStorage ()
 @property(nonatomic, readonly) NSURL *fileURL;

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


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


+ 0 - 0
Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.options → Firebase/Core/CoreDiagnostics/ProtoSupport/Protos/firebasecore.options


+ 0 - 0
Firebase/CoreDiagnostics/ProtoSupport/Protos/firebasecore.proto → Firebase/Core/CoreDiagnostics/ProtoSupport/Protos/firebasecore.proto


+ 0 - 0
Firebase/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh → Firebase/Core/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh


+ 0 - 0
Firebase/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py → Firebase/Core/CoreDiagnostics/ProtoSupport/nanopb_build_protos.py


+ 0 - 0
Firebase/CoreDiagnostics/ProtoSupport/nanopb_proto_generator.py → Firebase/Core/CoreDiagnostics/ProtoSupport/nanopb_proto_generator.py


+ 1 - 1
Firebase/CoreDiagnostics/generate_project.sh → Firebase/Core/CoreDiagnostics/generate_project.sh

@@ -17,7 +17,7 @@
 
 readonly REPO_DIR="$( git rev-parse --show-toplevel )"
 
-"$REPO_DIR/Firebase/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh" || {
+"$REPO_DIR/Firebase/Core/CoreDiagnostics/ProtoSupport/generate_nanopb_protos.sh" || {
   echo "Something went wrong generating protos."
   exit 1
 }

+ 5 - 21
Firebase/Core/FIRCoreDiagnosticsConnector.m

@@ -16,35 +16,19 @@
 
 #import "Private/FIRCoreDiagnosticsConnector.h"
 
-#import <FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h>
-
 #import <FirebaseCore/FIROptions.h>
 
 #import "Private/FIRAppInternal.h"
-#import "Private/FIRDiagnosticsData.h"
 #import "Private/FIROptionsInternal.h"
 
-// Define the interop class symbol declared as an extern in FIRCoreDiagnosticsInterop.
-Class<FIRCoreDiagnosticsInterop> FIRCoreDiagnosticsImplementation;
+#import "Firebase/Core/FIRDiagnosticsData.h"
+#import "Firebase/Core/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.h"
 
-@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.");
-    }
-  }
-}
+@implementation FIRCoreDiagnosticsConnector
 
 + (void)logCoreTelemetryWithOptions:(FIROptions *)options {
-  if (FIRCoreDiagnosticsImplementation) {
+  if (YES) {  // Check plist here
     FIRDiagnosticsData *diagnosticsData = [[FIRDiagnosticsData alloc] init];
     [diagnosticsData insertValue:@(YES) forKey:kFIRCDIsDataCollectionDefaultEnabledKey];
     [diagnosticsData insertValue:[FIRApp firebaseUserAgent] forKey:kFIRCDFirebaseUserAgentKey];
@@ -54,7 +38,7 @@ Class<FIRCoreDiagnosticsInterop> FIRCoreDiagnosticsImplementation;
     [diagnosticsData insertValue:@(options.usingOptionsFromDefaultPlist)
                           forKey:kFIRCDUsingOptionsFromDefaultPlistKey];
     [diagnosticsData insertValue:options.libraryVersionID forKey:kFIRCDLibraryVersionIDKey];
-    [FIRCoreDiagnosticsImplementation sendDiagnosticsData:diagnosticsData];
+    [FIRCoreDiagnostics sendDiagnosticsData:diagnosticsData];
   }
 }
 

+ 22 - 12
Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h → Firebase/Core/FIRDiagnosticsData.h

@@ -19,36 +19,34 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /** If present, is a BOOL wrapped in an NSNumber. */
-static NSString *const kFIRCDIsDataCollectionDefaultEnabledKey =
-    @"FIRCDIsDataCollectionDefaultEnabledKey";
+extern NSString *const kFIRCDIsDataCollectionDefaultEnabledKey;
 
 /** If present, is an int32_t wrapped in an NSNumber. */
-static NSString *const kFIRCDConfigurationTypeKey = @"FIRCDConfigurationTypeKey";
+extern NSString *const kFIRCDConfigurationTypeKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDSdkNameKey = @"FIRCDSdkNameKey";
+extern NSString *const kFIRCDSdkNameKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDSdkVersionKey = @"FIRCDSdkVersionKey";
+extern NSString *const kFIRCDSdkVersionKey;
 
 /** If present, is an int32_t wrapped in an NSNumber. */
-static NSString *const kFIRCDllAppsCountKey = @"FIRCDllAppsCountKey";
+extern NSString *const kFIRCDllAppsCountKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDGoogleAppIDKey = @"FIRCDGoogleAppIDKey";
+extern NSString *const kFIRCDGoogleAppIDKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDBundleIDKey = @"FIRCDBundleID";
+extern NSString *const kFIRCDBundleIDKey;
 
 /** If present, is a BOOL wrapped in an NSNumber. */
-static NSString *const kFIRCDUsingOptionsFromDefaultPlistKey =
-    @"FIRCDUsingOptionsFromDefaultPlistKey";
+extern NSString *const kFIRCDUsingOptionsFromDefaultPlistKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDLibraryVersionIDKey = @"FIRCDLibraryVersionIDKey";
+extern NSString *const kFIRCDLibraryVersionIDKey;
 
 /** If present, is an NSString. */
-static NSString *const kFIRCDFirebaseUserAgentKey = @"FIRCDFirebaseUserAgentKey";
+extern NSString *const kFIRCDFirebaseUserAgentKey;
 
 /** Defines the interface of a data object needed to log diagnostics data. */
 @protocol FIRCoreDiagnosticsData <NSObject>
@@ -60,4 +58,16 @@ static NSString *const kFIRCDFirebaseUserAgentKey = @"FIRCDFirebaseUserAgentKey"
 
 @end
 
+/** 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

+ 34 - 1
Firebase/Core/FIRDiagnosticsData.m

@@ -14,13 +14,46 @@
  * limitations under the License.
  */
 
-#import "Private/FIRDiagnosticsData.h"
+#import "Firebase/Core/FIRDiagnosticsData.h"
 
 #import <FirebaseCore/FIRApp.h>
 
 #import "Private/FIRAppInternal.h"
 #import "Private/FIROptionsInternal.h"
 
+/** If present, is a BOOL wrapped in an NSNumber. */
+NSString *const kFIRCDIsDataCollectionDefaultEnabledKey =
+    @"FIRCDIsDataCollectionDefaultEnabledKey";
+
+/** If present, is an int32_t wrapped in an NSNumber. */
+NSString *const kFIRCDConfigurationTypeKey = @"FIRCDConfigurationTypeKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDSdkNameKey = @"FIRCDSdkNameKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDSdkVersionKey = @"FIRCDSdkVersionKey";
+
+/** If present, is an int32_t wrapped in an NSNumber. */
+NSString *const kFIRCDllAppsCountKey = @"FIRCDllAppsCountKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDGoogleAppIDKey = @"FIRCDGoogleAppIDKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDBundleIDKey = @"FIRCDBundleID";
+
+/** If present, is a BOOL wrapped in an NSNumber. */
+NSString *const kFIRCDUsingOptionsFromDefaultPlistKey =
+    @"FIRCDUsingOptionsFromDefaultPlistKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDLibraryVersionIDKey = @"FIRCDLibraryVersionIDKey";
+
+/** If present, is an NSString. */
+NSString *const kFIRCDFirebaseUserAgentKey = @"FIRCDFirebaseUserAgentKey";
+
+
 @implementation FIRDiagnosticsData {
   /** Backing ivar for the diagnosticObjects property. */
   NSMutableDictionary<NSString *, id> *_diagnosticObjects;

+ 0 - 35
Firebase/Core/Private/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 <FirebaseCoreDiagnosticsInterop/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

+ 12 - 5
FirebaseCore.podspec

@@ -24,7 +24,7 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
   s.static_framework = true
   s.prefix_header_file = false
 
-  s.source_files = 'Firebase/Core/**/*.[mh]'
+  s.source_files = 'Firebase/Core/**/*.[cmh]'
   s.public_header_files = 'Firebase/Core/Public/*.h', 'Firebase/Core/Private/*.h'
   s.private_header_files = 'Firebase/Core/Private/*.h'
   s.framework = 'Foundation'
@@ -33,17 +33,24 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
   s.tvos.framework = 'UIKit'
   s.dependency 'GoogleUtilities/Environment', '~> 6.2'
   s.dependency 'GoogleUtilities/Logger', '~> 6.2'
-  s.dependency 'FirebaseCoreDiagnosticsInterop', '~> 1.0'
-  s.dependency 'FirebaseCoreDiagnostics', '~> 1.0'
+  s.dependency 'GoogleDataTransportCCTSupport', '~> 1.0'
+  s.dependency 'nanopb', '~> 0.3.901'
 
   s.pod_target_xcconfig = {
     'GCC_C_LANGUAGE_STANDARD' => 'c99',
+    'GCC_TREAT_WARNINGS_AS_ERRORS' => 'YES',
     'GCC_PREPROCESSOR_DEFINITIONS' =>
-      'FIRCore_VERSION=' + s.version.to_s + ' Firebase_VERSION=6.11.0',
-    'OTHER_CFLAGS' => '-fno-autolink'
+      'FIRCore_VERSION=' + s.version.to_s + ' Firebase_VERSION=6.11.0 ' +
+      # 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',
+    'OTHER_CFLAGS' => '-fno-autolink',
+    'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'
   }
   s.test_spec 'unit' do |unit_tests|
     unit_tests.source_files = 'Example/Core/Tests/**/*.[mh]'
+    unit_tests.dependency 'GoogleUtilities/UserDefaults', '~> 6.2'
     unit_tests.requires_app_host = true
     unit_tests.dependency 'OCMock'
     unit_tests.resources = 'Example/Core/App/GoogleService-Info.plist'

+ 0 - 59
FirebaseCoreDiagnostics.podspec

@@ -1,59 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseCoreDiagnostics'
-  s.version          = '1.1.1'
-  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', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'CoreDiagnostics-' + s.version.to_s
-  }
-  s.social_media_url = 'https://twitter.com/Firebase'
-  s.ios.deployment_target = '8.0'
-  s.osx.deployment_target = '10.11'
-  s.tvos.deployment_target = '10.0'
-
-  s.cocoapods_version = '>= 1.4.0'
-  s.static_framework = true
-  s.prefix_header_file = false
-
-  header_search_paths = {
-    'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/Firebase/CoreDiagnostics/"'
-  }
-
-  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]'
-  s.framework = 'Foundation'
-
-  s.dependency 'FirebaseCoreDiagnosticsInterop', '~> 1.0'
-  s.dependency 'GoogleDataTransportCCTSupport', '~> 1.0'
-  s.dependency 'GoogleUtilities/Environment', '~> 6.2'
-  s.dependency 'GoogleUtilities/Logger', '~> 6.2'
-  s.dependency 'nanopb', '~> 0.3.901'
-
-  s.test_spec 'unit' do |unit_tests|
-    unit_tests.dependency 'GoogleUtilities/UserDefaults', '~> 6.2'
-    unit_tests.dependency 'OCMock'
-    unit_tests.source_files = 'Example/CoreDiagnostics/Tests/**/*.[mh]'
-    unit_tests.requires_app_host = false
-  end
-end

+ 0 - 29
FirebaseCoreDiagnosticsInterop.podspec

@@ -1,29 +0,0 @@
-Pod::Spec.new do |s|
-  s.name             = 'FirebaseCoreDiagnosticsInterop'
-  s.version          = '1.0.0'
-  s.summary          = 'Interfaces that allow other Firebase SDKs to use CoreDiagnostics functionality.'
-
-  s.description      = <<-DESC
-  Not for public use.
-
-  A set of protocols that other Firebase SDKs can use to interoperate with FirebaseCoreDiagnostics
-  in a safe manner.
-                       DESC
-
-  s.homepage         = 'https://firebase.google.com'
-  s.license          = { :type => 'Apache', :file => 'LICENSE' }
-  s.authors          = 'Google, Inc.'
-
-  # NOTE that these should not be used externally, this is for Firebase pods to depend on each
-  # other.
-  s.source           = {
-    :git => 'https://github.com/firebase/firebase-ios-sdk.git',
-    :tag => 'CoreDiagnosticsInterop-' + s.version.to_s
-  }
-  s.social_media_url = 'https://twitter.com/Firebase'
-  s.ios.deployment_target = '8.0'
-  s.osx.deployment_target = '10.11'
-  s.tvos.deployment_target = '10.0'
-  s.source_files = 'Interop/CoreDiagnostics/**/*.h'
-  s.public_header_files = 'Interop/CoreDiagnostics/Public/*.h'
-end

+ 0 - 2
Firestore/Example/Podfile

@@ -83,8 +83,6 @@ def configure_local_pods()
     #
     # This list should include the transitive closure of all dependencies of
     # FirebaseCoreDiagnostics, except GoogleUtilities which we otherwise need.
-    maybe_local_pod 'FirebaseCoreDiagnostics'
-    maybe_local_pod 'FirebaseCoreDiagnosticsInterop'
     maybe_local_pod 'GoogleDataTransport'
     maybe_local_pod 'GoogleDataTransportCCTSupport'
   end

+ 0 - 2
Functions/Example/Podfile

@@ -5,8 +5,6 @@ target 'FirebaseFunctions_Example' do
 
   pod 'FirebaseAuthInterop', :path => '../../'
   pod 'FirebaseCore', :path => '../../'
-  pod 'FirebaseCoreDiagnostics', :path => '../../'
-  pod 'FirebaseCoreDiagnosticsInterop', :path => '../../'
   pod 'FirebaseFunctions', :path => '../../', :testspecs => ['unit']
   pod 'GoogleDataTransport', :path => '../../'
   pod 'GoogleDataTransportCCTSupport', :path => '../../'

+ 0 - 1
InAppMessaging/Example/Podfile

@@ -5,7 +5,6 @@ source 'https://cdn.cocoapods.org/'
 pod 'FirebaseAnalytics'
 pod 'FirebaseCore', :path => '../..'
 pod 'FirebaseCoreDiagnostics', :path => '../..'
-pod 'FirebaseCoreDiagnosticsInterop', :path => '../..'
 pod 'GoogleDataTransport', :path => '../..'
 pod 'GoogleDataTransportCCTSupport', :path => '../..'
 

+ 0 - 1
InAppMessagingDisplay/Example/Podfile

@@ -4,7 +4,6 @@ use_frameworks!
 
 pod 'FirebaseCore', :path => '../..'
 pod 'FirebaseCoreDiagnostics', :path => '../..'
-pod 'FirebaseCoreDiagnosticsInterop', :path => '../..'
 pod 'GoogleDataTransport', :path => '../..'
 pod 'GoogleDataTransportCCTSupport', :path => '../..'
 

+ 0 - 3
Interop/CoreDiagnostics/CHANGELOG.md

@@ -1,3 +0,0 @@
-# v1.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
-#
-# 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(APPLE)
-  file(GLOB headers Public/*.h)
-
-  podspec_version(version ${PROJECT_SOURCE_DIR}/FirebaseCoreDiagnosticsInterop.podspec)
-
-  objc_framework(
-    FirebaseCoreDiagnosticsInterop
-    HEADERS ${headers}
-    VERSION ${version}
-    INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
-    EXCLUDE_FROM_ALL
-  )
-endif()

+ 0 - 12
scripts/install_prereqs.sh

@@ -98,18 +98,6 @@ case "$PROJECT-$PLATFORM-$METHOD" in
     ;;
 
   Firestore-*-xcodebuild | Firestore-*-fuzz)
-    if [[ $XCODE_VERSION == "8."* ]]; then
-      # Firestore still compiles with Xcode 8 to help verify general
-      # conformance with C++11 by using an older compiler that doesn't have as
-      # many extensions from later versions of the language. However, Firebase
-      # as a whole does not support this environment and @available checks in
-      # GoogleDataTransport would otherwise break this build.
-      #
-      # This drops the dependency that adds GoogleDataTransport into
-      # Firestore's dependencies.
-      sed -i.bak "/s.dependency 'FirebaseCoreDiagnostics'/d" FirebaseCore.podspec
-    fi
-
     gem install xcpretty
     bundle exec pod install --project-directory=Firestore/Example --repo-update
     ;;