Преглед изворни кода

Integrate FIS SDK into Segmentation (#5622)

* migrate FloC SDK to depend on FIS SDK directly

* format floc

* format

* using customized FIRapp

* remove test plist file

* refactor to capture weakself

* format

* replace partial mock with class mock

* minor refactoring

* use subscript to manipulate dictionary instance

* fix import error

Co-authored-by: Di Wu <arete@google.com>
ChaoqunCHEN пре 5 година
родитељ
комит
443c4b7bac

+ 3 - 0
.gitignore

@@ -29,6 +29,9 @@ FirebaseStorage/Tests/Integration/Credentials.h
 FirebaseStorage/Tests/SwiftIntegration/Credentials.swift
 FirebaseStorageSwift/Tests/Integration/Credentials.swift
 
+# FirebaseSegmentation integration tests GoogleService-Info.plist
+FirebaseSegmentation/Tests/Sample/GoogleService-Info.plist
+
 Secrets.tar
 
 # OS X

+ 5 - 2
FirebaseSegmentation.podspec

@@ -19,11 +19,14 @@ Firebase Segmentation enables you to associate your custom application instance
   s.static_framework = true
   s.prefix_header_file = false
 
-  s.source_files = 'FirebaseSegmentation/Sources/**/*.[mh]'
+  s.source_files = [
+    'FirebaseSegmentation/Sources/**/*.[mh]',
+    'FirebaseCore/Sources/Private/*.h',
+  ]
   s.public_header_files = 'FirebaseSegmentation/Sources/Public/*.h'
 
   s.dependency 'FirebaseCore', '~> 6.7'
-  s.dependency 'FirebaseInstanceID', '~> 4.3'
+  s.dependency 'FirebaseInstallations', '~> 1.7'
 
    header_search_paths = {
     'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}"'

+ 5 - 5
FirebaseSegmentation/Sources/FIRSegmentation.m

@@ -14,10 +14,10 @@
 
 #import "FirebaseSegmentation/Sources/Public/FIRSegmentation.h"
 
-#import <FirebaseCore/FIRAppInternal.h>
-#import <FirebaseCore/FIRComponentContainer.h>
-#import <FirebaseCore/FIRLogger.h>
-#import <FirebaseCore/FIROptionsInternal.h>
+#import "FirebaseCore/Sources/Private/FIRComponentContainer.h"
+#import "FirebaseCore/Sources/Private/FIRLogger.h"
+#import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
+#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h"
 #import "FirebaseSegmentation/Sources/Private/FIRSegmentationComponent.h"
 #import "FirebaseSegmentation/Sources/SEGContentManager.h"
 
@@ -36,7 +36,7 @@
 }
 
 + (nonnull FIRSegmentation *)segmentationWithApp:(nonnull FIRApp *)firebaseApp {
-  // Use the provider to generate and return instances of FIRRemoteConfig for this specific app and
+  // Use the provider to generate and return instances of FIRSegmentation for this specific app and
   // namespace. This will ensure the app is configured before Remote Config can return an instance.
   id<FIRSegmentationProvider> provider =
       FIR_COMPONENT(FIRSegmentationProvider, firebaseApp.container);

+ 4 - 4
FirebaseSegmentation/Sources/FIRSegmentationComponent.m

@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#import "FIRSegmentationComponent.h"
+#import "FirebaseSegmentation/Sources/Private/FIRSegmentationComponent.h"
 
-#import <FirebaseCore/FIRAppInternal.h>
-#import <FirebaseCore/FIRComponentContainer.h>
-#import <FirebaseCore/FIROptionsInternal.h>
+#import "FirebaseCore/Sources/Private/FIRAppInternal.h"
+#import "FirebaseCore/Sources/Private/FIRComponentContainer.h"
+#import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
 #import "FirebaseSegmentation/Sources/Private/FIRSegmentationInternal.h"
 #import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"
 

+ 2 - 2
FirebaseSegmentation/Sources/Public/FIRSegmentation.h

@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @class FIRApp;
 /**
- *  The Firebase Segmentation SDK is used to associate a custom, non-Firebase custom installation
+ * The Firebase Segmentation SDK is used to associate a custom, non-Firebase custom installation
  * identifier to Firebase. Once this custom installation identifier is set, developers can use the
  * current app installation for segmentation purposes. If the custom installation identifier is
  * explicitely set to nil, any existing custom installation identifier data will be removed.
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
 NS_SWIFT_NAME(Segmentation)
 @interface FIRSegmentation : NSObject
 
-/// Firebase Remote Config service fetch error.
+/// Firebase Segmentation service fetch error.
 typedef NS_ENUM(NSInteger, FIRSegmentationErrorCode) {
   /// No error. The operation was successful.
   FIRSegmentationErrorCodeNone = 8001,

+ 1 - 1
FirebaseSegmentation/Sources/SEGContentManager.h

@@ -14,7 +14,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "SEGSegmentationConstants.h"
+#import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 101 - 59
FirebaseSegmentation/Sources/SEGContentManager.m

@@ -12,21 +12,21 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "SEGContentManager.h"
+#import "FirebaseSegmentation/Sources/SEGContentManager.h"
 
-#import <FirebaseCore/FIRAppInternal.h>
-#import <FirebaseInstanceID/FIRInstanceID.h>
-#import "FIRSegmentation.h"
-#import "SEGDatabaseManager.h"
-#import "SEGNetworkManager.h"
-#import "SEGSegmentationConstants.h"
+#import "FirebaseCore/Sources/Private/FIRAppInternal.h"
+#import "FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FirebaseInstallations.h"
+#import "FirebaseSegmentation/Sources/Public/FIRSegmentation.h"
+#import "FirebaseSegmentation/Sources/SEGDatabaseManager.h"
+#import "FirebaseSegmentation/Sources/SEGNetworkManager.h"
+#import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"
 
 NSString *const kErrorDescription = @"ErrorDescription";
 
 @interface SEGContentManager () {
   NSMutableDictionary<NSString *, id> *_associationData;
-  NSString *_instanceIdentifier;
-  NSString *_instanceIdentifierToken;
+  NSString *_installationIdentifier;
+  NSString *_installationIdentifierToken;
   SEGDatabaseManager *_databaseManager;
   SEGNetworkManager *_networkManager;
 }
@@ -63,69 +63,111 @@ NSString *const kErrorDescription = @"ErrorDescription";
   return self;
 }
 
-// TODO(dmandar) IID only supports default instance. Modify for FIS.
-- (FIRInstanceID *)instanceIDForApp:(NSString *)firebaseApp {
-  return [FIRInstanceID instanceID];
+- (FIRInstallations *)installationForApp:(NSString *)firebaseApp {
+  return [FIRInstallations installationsWithApp:[FIRApp appNamed:firebaseApp]];
 }
 
 - (void)associateCustomInstallationIdentiferNamed:(NSString *)customInstallationID
                                       firebaseApp:(NSString *)firebaseApp
                                        completion:(SEGRequestCompletion)completionHandler {
-  // Get the latest instance identifier
-  if (![self instanceIDForApp:firebaseApp]) {
-    completionHandler(NO, @{kErrorDescription : @"InstanceID SDK not available"});
+  // Get the latest installation identifier
+  FIRInstallations *installation = [self installationForApp:firebaseApp];
+  if (installation == nil) {
+    completionHandler(NO, @{kErrorDescription : @"Firebase Installations SDK not available"});
   }
   __weak SEGContentManager *weakSelf = self;
-  [[FIRInstanceID instanceID] instanceIDWithHandler:^(FIRInstanceIDResult *_Nullable result,
-                                                      NSError *_Nullable error) {
+  [installation
+      installationIDWithCompletion:^(NSString *_Nullable identifier, NSError *_Nullable error) {
+        SEGContentManager *strongSelf = weakSelf;
+        if (!strongSelf) {
+          completionHandler(NO, @{kErrorDescription : @"Internal Error getting installation ID."});
+          return;
+        }
+
+        [strongSelf associateInstallationWithLatestIdentifier:identifier
+                                                 installation:installation
+                                         customizedIdentifier:customInstallationID
+                                                  firebaseApp:firebaseApp
+                                                        error:error
+                                                   completion:completionHandler];
+      }];
+}
+
+- (void)associateInstallationWithLatestIdentifier:(NSString *_Nullable)identifier
+                                     installation:(FIRInstallations *)installation
+                             customizedIdentifier:(NSString *)customInstallationID
+                                      firebaseApp:(NSString *)firebaseApp
+                                            error:(NSError *_Nullable)error
+                                       completion:(SEGRequestCompletion)completionHandler {
+  if (!identifier || error) {
+    NSString *errorMessage = @"Error getting installation ID.";
+    if (error) {
+      errorMessage = [errorMessage stringByAppendingString:error.description];
+    }
+    NSDictionary *errorDictionary = @{kErrorDescription : errorMessage};
+    completionHandler(NO, errorDictionary);
+    return;
+  }
+
+  _installationIdentifier = identifier;
+
+  __weak SEGContentManager *weakSelf = self;
+  [installation authTokenWithCompletion:^(FIRInstallationsAuthTokenResult *_Nullable tokenResult,
+                                          NSError *_Nullable error) {
     SEGContentManager *strongSelf = weakSelf;
     if (!strongSelf) {
-      completionHandler(NO, @{kErrorDescription : @"Internal Error getting instance ID."});
+      completionHandler(NO, @{kErrorDescription : @"Internal Error getting installation token."});
       return;
     }
+    [strongSelf associateInstallationWithToken:tokenResult
+                          customizedIdentifier:customInstallationID
+                                   firebaseApp:firebaseApp
+                                         error:error
+                                    completion:completionHandler];
+  }];
+}
 
-    if (!result || error) {
-      NSString *errorMessage = @"Error getting instance ID.";
-      if (error) {
-        errorMessage = [errorMessage stringByAppendingString:error.description];
-      }
-      NSDictionary *errorDictionary = @{kErrorDescription : errorMessage};
-      completionHandler(NO, errorDictionary);
-      return;
+- (void)associateInstallationWithToken:(FIRInstallationsAuthTokenResult *_Nullable)tokenResult
+                  customizedIdentifier:(NSString *)customInstallationID
+                           firebaseApp:(NSString *)firebaseApp
+                                 error:(NSError *_Nullable)error
+                            completion:(SEGRequestCompletion)completionHandler {
+  if (!tokenResult || error) {
+    NSString *errorMessage = @"Error getting AuthToken.";
+    if (error) {
+      errorMessage = [errorMessage stringByAppendingString:error.description];
     }
-
-    strongSelf->_instanceIdentifier = result.instanceID;
-    strongSelf->_instanceIdentifierToken = result.token;
-
-    NSMutableDictionary<NSString *, NSString *> *appAssociationData =
-        [[NSMutableDictionary alloc] init];
-    [appAssociationData setObject:customInstallationID forKey:kSEGCustomInstallationIdentifierKey];
-    [appAssociationData setObject:self->_instanceIdentifier
-                           forKey:kSEGFirebaseInstallationIdentifierKey];
-    [appAssociationData setObject:kSEGAssociationStatusPending forKey:kSEGAssociationStatusKey];
-    [strongSelf->_associationData setObject:appAssociationData forKey:firebaseApp];
-
-    // Update the database async.
-    // TODO(mandard) The database write and corresponding completion handler needs to be wired up
-    // once we support listening to FID changes.
-    [strongSelf->_databaseManager insertMainTableApplicationNamed:firebaseApp
-                                         customInstanceIdentifier:customInstallationID
-                                       firebaseInstanceIdentifier:strongSelf->_instanceIdentifier
-                                                associationStatus:kSEGAssociationStatusPending
-                                                completionHandler:nil];
-
-    // Send the change up to the backend. Also add the token.
-
-    [strongSelf->_networkManager
-        makeAssociationRequestToBackendWithData:appAssociationData
-                                          token:strongSelf->_instanceIdentifierToken
-                                     completion:^(BOOL status,
-                                                  NSDictionary<NSString *, id> *result) {
-                                       // TODO...log, update database.
-
-                                       completionHandler(status, result);
-                                     }];
-  }];
+    NSDictionary *errorDictionary = @{kErrorDescription : errorMessage};
+    completionHandler(NO, errorDictionary);
+    return;
+  }
+  _installationIdentifierToken = tokenResult.authToken;
+
+  NSMutableDictionary<NSString *, NSString *> *appAssociationData =
+      [[NSMutableDictionary alloc] init];
+  appAssociationData[kSEGCustomInstallationIdentifierKey] = customInstallationID;
+  appAssociationData[kSEGFirebaseInstallationIdentifierKey] = _installationIdentifier;
+  appAssociationData[kSEGAssociationStatusKey] = kSEGAssociationStatusPending;
+  _associationData[firebaseApp] = appAssociationData;
+
+  // Update the database async.
+  // TODO(mandard) The database write and corresponding completion handler needs to be wired up
+  // once we support listening to FID changes.
+  [_databaseManager insertMainTableApplicationNamed:firebaseApp
+                           customInstanceIdentifier:customInstallationID
+                         firebaseInstanceIdentifier:_installationIdentifier
+                                  associationStatus:kSEGAssociationStatusPending
+                                  completionHandler:nil];
+
+  // Send the change up to the backend. Also add the token.
+  [_networkManager
+      makeAssociationRequestToBackendWithData:appAssociationData
+                                        token:_installationIdentifierToken
+                                   completion:^(BOOL status, NSDictionary<NSString *, id> *result) {
+                                     // TODO...log, update database.
+
+                                     completionHandler(status, result);
+                                   }];
 }
 
 @end

+ 1 - 1
FirebaseSegmentation/Sources/SEGDatabaseManager.h

@@ -14,7 +14,7 @@
 
 #import <Foundation/Foundation.h>
 
-#import "SEGSegmentationConstants.h"
+#import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 2 - 2
FirebaseSegmentation/Sources/SEGDatabaseManager.m

@@ -12,10 +12,10 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "SEGDatabaseManager.h"
+#import "FirebaseSegmentation/Sources/SEGDatabaseManager.h"
 
-#import <FirebaseCore/FIRLogger.h>
 #import <sqlite3.h>
+#import "FirebaseCore/Sources/Private/FIRLogger.h"
 
 /// SQLite file name.
 static NSString *const kDatabaseName = @"FirebaseSegmentation.sqlite3";

+ 2 - 2
FirebaseSegmentation/Sources/SEGNetworkManager.h

@@ -14,9 +14,9 @@
 
 #import <Foundation/Foundation.h>
 
-#import <FirebaseCore/FIROptionsInternal.h>
+#import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
 
-#import "SEGSegmentationConstants.h"
+#import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"
 
 NS_ASSUME_NONNULL_BEGIN
 

+ 4 - 4
FirebaseSegmentation/Sources/SEGNetworkManager.m

@@ -12,11 +12,11 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "SEGNetworkManager.h"
+#import "FirebaseSegmentation/Sources/SEGNetworkManager.h"
 
-#import <FirebaseCore/FIRAppInternal.h>
-#import <FirebaseCore/FIRLogger.h>
-#import <FirebaseCore/FIROptionsInternal.h>
+#import "FirebaseCore/Sources/Private/FIRAppInternal.h"
+#import "FirebaseCore/Sources/Private/FIRLogger.h"
+#import "FirebaseCore/Sources/Private/FIROptionsInternal.h"
 
 // TODO(dmandar): define in build file.
 #define SEG_ALPHA_SERVER

+ 1 - 1
FirebaseSegmentation/Sources/SEGSegmentationConstants.m

@@ -12,4 +12,4 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#import "SEGSegmentationConstants.h"
+#import "FirebaseSegmentation/Sources/SEGSegmentationConstants.h"

+ 0 - 36
FirebaseSegmentation/Tests/Sample/GoogleService-Info.plist

@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CLIENT_ID</key>
-	<string>444915101522-odgs2o9ik22d6kv6ussnf3ks6qlkkgor.apps.googleusercontent.com</string>
-	<key>REVERSED_CLIENT_ID</key>
-	<string>com.googleusercontent.apps.444915101522-odgs2o9ik22d6kv6ussnf3ks6qlkkgor</string>
-	<key>API_KEY</key>
-	<string>AIzaSyAAHL-jKH-CRKBQlp1dlaEQLhZQCEaLFls</string>
-	<key>GCM_SENDER_ID</key>
-	<string>444915101522</string>
-	<key>PLIST_VERSION</key>
-	<string>1</string>
-	<key>BUNDLE_ID</key>
-	<string>com.google.firebase.config.testapp.dev</string>
-	<key>PROJECT_ID</key>
-	<string>floc-test-app</string>
-	<key>STORAGE_BUCKET</key>
-	<string>floc-test-app.appspot.com</string>
-	<key>IS_ADS_ENABLED</key>
-	<false></false>
-	<key>IS_ANALYTICS_ENABLED</key>
-	<false></false>
-	<key>IS_APPINVITE_ENABLED</key>
-	<true></true>
-	<key>IS_GCM_ENABLED</key>
-	<true></true>
-	<key>IS_SIGNIN_ENABLED</key>
-	<true></true>
-	<key>GOOGLE_APP_ID</key>
-	<string>1:444915101522:ios:4f2ff3b071ebe329a7548b</string>
-	<key>DATABASE_URL</key>
-	<string>https://floc-test-app.firebaseio.com</string>
-</dict>
-</plist>

+ 37 - 23
FirebaseSegmentation/Tests/Unit/SEGContentManagerTests.m

@@ -14,31 +14,40 @@
 
 #import <XCTest/XCTest.h>
 
-#import "SEGContentManager.h"
-#import "SEGDatabaseManager.h"
-#import "SEGNetworkManager.h"
+#import "FirebaseSegmentation/Sources/SEGContentManager.h"
+#import "FirebaseSegmentation/Sources/SEGDatabaseManager.h"
+#import "FirebaseSegmentation/Sources/SEGNetworkManager.h"
 
-#import <FirebaseCore/FirebaseCore.h>
-#import <FirebaseInstanceID/FIRInstanceID.h>
 #import <OCMock/OCMock.h>
+#import "FirebaseCore/Sources/Public/FirebaseCore/FirebaseCore.h"
+#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.h"
+#import "FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FirebaseInstallations.h"
 
 @interface SEGContentManager (ForTest)
 - (instancetype)initWithDatabaseManager:databaseManager networkManager:networkManager;
 @end
 
-@interface FIRInstanceIDResult (ForTest)
-@property(nonatomic, readwrite) NSString *instanceID;
-@property(nonatomic, readwrite) NSString *token;
+@interface FIRInstallations (Tests)
+@property(nonatomic, readwrite, strong) FIROptions *appOptions;
+@property(nonatomic, readwrite, strong) NSString *appName;
+
+- (instancetype)initWithAppOptions:(FIROptions *)appOptions
+                           appName:(NSString *)appName
+         installationsIDController:(FIRInstallationsIDController *)installationsIDController
+                 prefetchAuthToken:(BOOL)prefetchAuthToken;
 @end
 
-@interface FIRInstanceID (ForTest)
-+ (instancetype)instanceIDForTests;
+@interface FIRInstallationsAuthTokenResult (ForTest)
+- (instancetype)initWithToken:(NSString *)token expirationDate:(NSDate *)expirationTime;
 @end
 
 @interface SEGContentManagerTests : XCTestCase
 @property(nonatomic) SEGContentManager *contentManager;
-@property(nonatomic) id instanceIDMock;
 @property(nonatomic) id networkManagerMock;
+@property(nonatomic) id mockIDController;
+@property(nonatomic) FIROptions *appOptions;
+@property(readonly) NSString *firebaseAppName;
+@property(strong, readonly, nonatomic) id mockInstallations;
 
 @end
 
@@ -46,14 +55,20 @@
 
 - (void)setUp {
   // Setup FIRApp.
-  XCTAssertNoThrow([FIRApp configureWithOptions:[self FIRAppOptions]]);
-  // TODO (mandard): Investigate replacing the partial mock with a class mock.
-  self.instanceIDMock = OCMPartialMock([FIRInstanceID instanceIDForTests]);
-  FIRInstanceIDResult *result = [[FIRInstanceIDResult alloc] init];
-  result.instanceID = @"test-instance-id";
-  result.token = @"test-instance-id-token";
-  OCMStub([self.instanceIDMock
-      instanceIDWithHandler:([OCMArg invokeBlockWithArgs:result, [NSNull null], nil])]);
+  _firebaseAppName = @"my-firebase-app-id";
+  XCTAssertNoThrow([FIRApp configureWithName:self.firebaseAppName options:[self FIRAppOptions]]);
+
+  // Installations Mock
+  NSString *FID = @"fid-is-better-than-iid";
+  _mockInstallations = OCMClassMock([FIRInstallations class]);
+  OCMStub([_mockInstallations installationsWithApp:[FIRApp appNamed:self.firebaseAppName]])
+      .andReturn(_mockInstallations);
+  FIRInstallationsAuthTokenResult *FISToken =
+      [[FIRInstallationsAuthTokenResult alloc] initWithToken:@"fake-fis-token" expirationDate:nil];
+  OCMStub([_mockInstallations
+      installationIDWithCompletion:([OCMArg invokeBlockWithArgs:FID, [NSNull null], nil])]);
+  OCMStub([_mockInstallations
+      authTokenWithCompletion:([OCMArg invokeBlockWithArgs:FISToken, [NSNull null], nil])]);
 
   // Mock the network manager.
   FIROptions *options = [[FIROptions alloc] init];
@@ -75,9 +90,8 @@
 - (void)tearDown {
   [self.networkManagerMock stopMocking];
   self.networkManagerMock = nil;
-  [self.instanceIDMock stopMocking];
-  self.instanceIDMock = nil;
   self.contentManager = nil;
+  self.mockIDController = nil;
 }
 
 // Associate a fake custom installation id and fake firebase installation id.
@@ -87,7 +101,7 @@
       [self expectationWithDescription:@"associateCustomInstallation for contentmanager"];
   [_contentManager
       associateCustomInstallationIdentiferNamed:@"my-custom-id"
-                                    firebaseApp:@"my-firebase-app-id"
+                                    firebaseApp:self.firebaseAppName
                                      completion:^(BOOL success, NSDictionary *result) {
                                        XCTAssertTrue(success,
                                                      @"Could not associate custom installation ID");
@@ -101,7 +115,7 @@
 - (FIROptions *)FIRAppOptions {
   FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:@"1:123:ios:123abc"
                                                     GCMSenderID:@"correct_gcm_sender_id"];
-  options.APIKey = @"correct_api_key";
+  options.APIKey = @"AIzaSaaaaaaaaaaaaaaaaaaaaaaaaaaa1111111";
   options.projectID = @"abc-xyz-123";
   return options;
 }

+ 1 - 1
FirebaseSegmentation/Tests/Unit/SEGDatabaseManagerTests.m

@@ -14,7 +14,7 @@
 
 #import <XCTest/XCTest.h>
 
-#import "SEGDatabaseManager.h"
+#import "FirebaseSegmentation/Sources/SEGDatabaseManager.h"
 
 #import <OCMock/OCMock.h>
 

+ 2 - 2
FirebaseSegmentation/Tests/Unit/SEGInitializationTests.m

@@ -14,8 +14,8 @@
 
 #import <XCTest/XCTest.h>
 
-#import "FIRApp.h"
-#import "FIROptions.h"
+#import "FirebaseCore/Sources/Public/FirebaseCore/FIRApp.h"
+#import "FirebaseCore/Sources/Public/FirebaseCore/FIROptions.h"
 #import "FirebaseSegmentation/Sources/Public/FIRSegmentation.h"
 
 @interface FIRSegmentation (ForTest)

+ 0 - 1
scripts/check.sh

@@ -74,7 +74,6 @@ EXAMPLES:
 
 EOF
 }
-set -x #TODO: temporary, remove.
 set -euo pipefail
 unset CDPATH