From 2f6bf8d6695170fe15bb95d2eca6d6b7e56add74 Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Thu, 28 Jun 2018 13:48:13 -0400 Subject: Add FirebaseCore component interoperability. (#1437) * Add FirebaseCore component interoperability. This puts in place the system that will allow SDKs to register with Core and retrieve functionalities provided by other SDKs. * Updated documentation. * Add copywrite, fix log messages. * Explicitly import headers from Private dir --- Firebase/Core/Private/FIRAppInternal.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Firebase/Core/Private/FIRAppInternal.h') diff --git a/Firebase/Core/Private/FIRAppInternal.h b/Firebase/Core/Private/FIRAppInternal.h index 66979eb..45de2ba 100644 --- a/Firebase/Core/Private/FIRAppInternal.h +++ b/Firebase/Core/Private/FIRAppInternal.h @@ -17,6 +17,9 @@ #import "FIRApp.h" #import "FIRErrors.h" +@class FIRComponentContainer; +@protocol FIRCoreConfigurable; + /** * The internal interface to FIRApp. This is meant for first-party integrators, who need to receive * FIRApp notifications, log info about the success or failure of their configuration, and access @@ -126,6 +129,11 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); @interface FIRApp () +/** + * A flag indicating if this is the default app. + */ +@property(nonatomic, readonly) BOOL isDefaultApp; + /** @property getTokenImplementation @brief Gets or sets the block to use for the implementation of @c getTokenForcingRefresh:withCallback: @@ -137,6 +145,11 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); */ @property(nonatomic, copy) FIRAppGetUIDImplementation getUIDImplementation; +/* + * The container of interop SDKs for this app. + */ +@property(nonatomic) FIRComponentContainer *container; + /** * Creates an error for failing to configure a subspec service. This method is called by each * FIRApp notification listener. @@ -150,6 +163,13 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); */ + (BOOL)isDefaultAppConfigured; +/** + * Register a class that conforms to `FIRCoreConfigurable`. Each SDK should have one class that + * registers in order to provide critical information for interoperability and lifecycle events. + * TODO(wilsonryan): Write more documentation. + */ ++ (void)registerAsConfigurable:(Class)klass; + /** * Registers a given third-party library with the given version number to be reported for * analyitcs. -- cgit v1.2.3