Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 0 additions & 163 deletions UITests/FirebaseUISample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
299AC6F5D5E37D05D2D7040A /* Pods_FirebaseUISample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */; };
68A64A1B95792CC2A39C7FFC /* Pods_FirebaseUISampleUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */; };
8D69E6B621DEC97E00CFA49B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B421DEC97E00CFA49B /* Main.storyboard */; };
8D69E6B821DEC97F00CFA49B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B721DEC97F00CFA49B /* Assets.xcassets */; };
8D69E6BB21DEC97F00CFA49B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D69E6B921DEC97F00CFA49B /* LaunchScreen.storyboard */; };
Expand Down Expand Up @@ -40,9 +38,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUISampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISampleUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISampleUITests/Pods-FirebaseUISampleUITests.release.xcconfig"; sourceTree = "<group>"; };
70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUISample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8D69E6AB21DEC97E00CFA49B /* FirebaseUISample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FirebaseUISample.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D69E6B521DEC97E00CFA49B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8D69E6B721DEC97F00CFA49B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -145,17 +140,13 @@
8D69E73B21DECA7000CFA49B /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
8D69E73C21DECA7000CFA49B /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Localizable.strings; sourceTree = "<group>"; };
8D69E73D21DECA7000CFA49B /* en-IN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-IN"; path = "en-IN.lproj/Localizable.strings"; sourceTree = "<group>"; };
B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISampleUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISampleUITests/Pods-FirebaseUISampleUITests.debug.xcconfig"; sourceTree = "<group>"; };
BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISample.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample.release.xcconfig"; sourceTree = "<group>"; };
C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUISample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8D69E6A821DEC97E00CFA49B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
299AC6F5D5E37D05D2D7040A /* Pods_FirebaseUISample.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -170,42 +161,19 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
68A64A1B95792CC2A39C7FFC /* Pods_FirebaseUISampleUITests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0B66B725F3F91007A7818EB8 /* Pods */ = {
isa = PBXGroup;
children = (
C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */,
BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */,
B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */,
56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
8D36545EB6479C45B0B9C535 /* Frameworks */ = {
isa = PBXGroup;
children = (
70945DA605F03FD5784E8035 /* Pods_FirebaseUISample.framework */,
34F4E39B9DEB60EE1A2C0EE5 /* Pods_FirebaseUISampleUITests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
8D69E6A221DEC97E00CFA49B = {
isa = PBXGroup;
children = (
8D69E6AD21DEC97E00CFA49B /* FirebaseUISample */,
8D69E6C621DEC98000CFA49B /* FirebaseUISampleTests */,
8D69E6D121DEC98000CFA49B /* FirebaseUISampleUITests */,
8D69E6AC21DEC97E00CFA49B /* Products */,
0B66B725F3F91007A7818EB8 /* Pods */,
8D36545EB6479C45B0B9C535 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -271,12 +239,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 8D69E6D721DEC98000CFA49B /* Build configuration list for PBXNativeTarget "FirebaseUISample" */;
buildPhases = (
092F06231E157F830A2D3C66 /* [CP] Check Pods Manifest.lock */,
8D69E6A721DEC97E00CFA49B /* Sources */,
8D69E6A821DEC97E00CFA49B /* Frameworks */,
8D69E6A921DEC97E00CFA49B /* Resources */,
AF0DE935EA9C73CD8A32BE38 /* [CP] Embed Pods Frameworks */,
B2F32F94A8B497C74C7F7C7E /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -309,7 +274,6 @@
isa = PBXNativeTarget;
buildConfigurationList = 8D69E6DD21DEC98000CFA49B /* Build configuration list for PBXNativeTarget "FirebaseUISampleUITests" */;
buildPhases = (
07E1DC16FC3541EBA6886105 /* [CP] Check Pods Manifest.lock */,
8D69E6CA21DEC98000CFA49B /* Sources */,
8D69E6CB21DEC98000CFA49B /* Frameworks */,
8D69E6CC21DEC98000CFA49B /* Resources */,
Expand Down Expand Up @@ -479,129 +443,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
07E1DC16FC3541EBA6886105 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FirebaseUISampleUITests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
092F06231E157F830A2D3C66 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FirebaseUISample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
AF0DE935EA9C73CD8A32BE38 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework",
"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
"${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework",
"${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework",
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework",
"${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bolts.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterCore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B2F32F94A8B497C74C7F7C7E /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/gRPCCertificates-Firestore.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAnonymousAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseEmailAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseFacebookAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseGoogleAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebasePhoneAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseTwitterAuthUI.bundle",
"${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle",
"${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework/TwitterKitResources.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Firestore.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAnonymousAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseEmailAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseFacebookAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseGoogleAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebasePhoneAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseTwitterAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TwitterKitResources.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUISample/Pods-FirebaseUISample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D69E6A721DEC97E00CFA49B /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -869,7 +710,6 @@
};
8D69E6D821DEC98000CFA49B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C7C0896071DA1A357BCE9D70 /* Pods-FirebaseUISample.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -886,7 +726,6 @@
};
8D69E6D921DEC98000CFA49B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BB73DBADE04C5998FCFD7CF5 /* Pods-FirebaseUISample.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand Down Expand Up @@ -939,7 +778,6 @@
};
8D69E6DE21DEC98000CFA49B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B4F18AEE29E87F337C1385BB /* Pods-FirebaseUISampleUITests.debug.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = FirebaseUISampleUITests/Info.plist;
Expand Down Expand Up @@ -1037,7 +875,6 @@
};
8D69E6DF21DEC98000CFA49B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 56C72EBB3DCA973EB4ADE941 /* Pods-FirebaseUISampleUITests.release.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = FirebaseUISampleUITests/Info.plist;
Expand Down
26 changes: 17 additions & 9 deletions UITests/FirebaseUISample/FUIViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,19 @@ - (IBAction)onAuthorization:(id)sender {

[self prepareStubs];

NSString *firstProviderID = _authProviders.firstObject.providerID;
BOOL shouldSkipPhoneAuthPicker = _authProviders.count == 1 &&
[_authProviders.firstObject.providerID isEqualToString:FIRPhoneAuthProviderID];
if (shouldSkipPhoneAuthPicker) {
FUIPhoneAuth *provider = _authProviders.firstObject;
[provider signInWithPresentingViewController:self phoneNumber:nil];
} else {
([firstProviderID isEqualToString:FIRPhoneAuthProviderID] ||
[firstProviderID isEqualToString:FIREmailAuthProviderID]);
if (!shouldSkipPhoneAuthPicker) {
UIViewController *controller = [self.authUIMock authViewController];
[self presentViewController:controller animated:YES completion:nil];
} else if ([firstProviderID isEqualToString:FIRPhoneAuthProviderID]) {
FUIPhoneAuth *provider = _authProviders.firstObject;
[provider signInWithPresentingViewController:self phoneNumber:nil];
} else if ([firstProviderID isEqualToString:FIREmailAuthProviderID]) {
FUIEmailAuth *provider = _authProviders.firstObject;
[provider signInWithPresentingViewController:self email:nil];
}

}
Expand Down Expand Up @@ -248,9 +253,9 @@ - (void)prepareStubsForSimulationNewUser {
});


OCMStub([self.authMock createUserAndRetrieveDataWithEmail:OCMOCK_ANY
password:OCMOCK_ANY
completion:OCMOCK_ANY]).
OCMStub([self.authMock createUserWithEmail:OCMOCK_ANY
password:OCMOCK_ANY
completion:OCMOCK_ANY]).
andDo(^(NSInvocation *invocation) {
FIRAuthDataResultCallback mockedCallback;
[invocation getArgument:&mockedCallback atIndex:4];
Expand Down Expand Up @@ -293,6 +298,9 @@ - (void)populateListOfIDPs {
for (NSIndexPath *indexPath in selectedRows) {
if (indexPath.section == kSectionsProviders) {
switch (indexPath.row) {
case kIDPEmail:
[_authProviders addObject:[[FUIEmailAuth alloc] init]];
break;
case kIDPGoogle:
[_authProviders addObject:[[FUIGoogleAuth alloc] init]];
break;
Expand Down Expand Up @@ -493,7 +501,7 @@ - (void)mockSignInWithProvider:(NSString *)providerId user:(id)mockUser {
OCMStub([mockProviderUI signOut]);
OCMStub([mockProviderUI providerID]).andReturn(providerId);

OCMStub([mockUser reauthenticateWithCredential:OCMOCK_ANY completion:OCMOCK_ANY]).
OCMStub([mockUser reauthenticateAndRetrieveDataWithCredential:OCMOCK_ANY completion:OCMOCK_ANY]).
andDo(^(NSInvocation *invocation) {
FIRUserProfileChangeCallback mockedCallBack;
[invocation getArgument:&mockedCallBack atIndex:3];
Expand Down
Loading