diff --git a/Example/Auth/SwiftSample/AppDelegate.swift b/Example/Auth/SwiftSample/AppDelegate.swift
deleted file mode 100644
index 52618fe5818..00000000000
--- a/Example/Auth/SwiftSample/AppDelegate.swift
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2017 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 UIKit
-
-import FirebaseCore
-import GoogleSignIn
-
-@UIApplicationMain
-class AppDelegate: UIResponder, UIApplicationDelegate {
-
- /** @var kGoogleClientID
- @brief The Google client ID.
- */
- private let kGoogleClientID = AuthCredentials.GOOGLE_CLIENT_ID
-
- // TODO: add Facebook login support as well.
-
- /** @var kFacebookAppID
- @brief The Facebook app ID.
- */
- private let kFacebookAppID = AuthCredentials.FACEBOOK_APP_ID
-
- /** @var window
- @brief The main window of the app.
- */
- var window: UIWindow?
-
- func application(_ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
- FirebaseApp.configure()
- GIDSignIn.sharedInstance().clientID = kGoogleClientID
- return true
- }
-
- @available(iOS 9.0, *)
- func application(_ application: UIApplication, open url: URL,
- options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool {
- return GIDSignIn.sharedInstance().handle(url,
- sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String,
- annotation: nil)
- }
-
- func application(_ application: UIApplication, open url: URL, sourceApplication: String?,
- annotation: Any) -> Bool {
- return GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication,
- annotation: annotation)
- }
-}
diff --git a/Example/Auth/SwiftSample/AuthCredentialsTemplate.swift b/Example/Auth/SwiftSample/AuthCredentialsTemplate.swift
deleted file mode 100644
index eea9335948c..00000000000
--- a/Example/Auth/SwiftSample/AuthCredentialsTemplate.swift
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2017 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.
- */
-
-
-/*
- Some of the Auth Credentials needs to be populated for the Sample build to work.
-
- Please follow the following steps to populate the valid AuthCredentials
- and copy it to AuthCredentials.swift file
-
- You will need to replace the following values:
- $KGOOGLE_CLIENT_ID
- Get the value of the CLIENT_ID key in the GoogleService-Info.plist file.
-
- $KFACEBOOK_APP_ID
- FACEBOOK_APP_ID is the developer's Facebook app's ID, to be used to test the
- 'Signing in with Facebook' feature of Firebase Auth. Follow the instructions
- on the Facebook developer site: https://developers.facebook.com/docs/apps/register
- to obtain the id
-
- */
-
-import Foundation
-
-
-struct AuthCredentials {
- static let FACEBOOK_APP_ID = "$KFACEBOOK_APP_ID"
- static let GOOGLE_CLIENT_ID = "$KGOOGLE_CLIENT_ID"
-}
diff --git a/Example/Auth/SwiftSample/InfoTemplate.plist b/Example/Auth/SwiftSample/InfoTemplate.plist
deleted file mode 100644
index e51622bc7c1..00000000000
--- a/Example/Auth/SwiftSample/InfoTemplate.plist
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleURLTypes
-
-
- CFBundleTypeRole
- Editor
- CFBundleURLName
- com.google.swiftbear
- CFBundleURLSchemes
-
- com.google.swiftbear
-
-
-
- CFBundleTypeRole
- Editor
- CFBundleURLName
- $REVERSE_CLIENT_ID
- CFBundleURLSchemes
-
- $REVERSE_CLIENT_ID
-
-
-
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- LSApplicationQueriesSchemes
-
- fbauth2
-
-
-
diff --git a/Example/Auth/SwiftSample/LaunchScreen.storyboard b/Example/Auth/SwiftSample/LaunchScreen.storyboard
deleted file mode 100644
index 8326657f7a5..00000000000
--- a/Example/Auth/SwiftSample/LaunchScreen.storyboard
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Example/Auth/SwiftSample/Main.storyboard b/Example/Auth/SwiftSample/Main.storyboard
deleted file mode 100644
index 3525a8bdf6a..00000000000
--- a/Example/Auth/SwiftSample/Main.storyboard
+++ /dev/null
@@ -1,227 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Example/Auth/SwiftSample/Sample.entitlements b/Example/Auth/SwiftSample/Sample.entitlements
deleted file mode 100644
index 9199daef185..00000000000
--- a/Example/Auth/SwiftSample/Sample.entitlements
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- application-identifier
- $(AppIdentifierPrefix)$(CFBundleIdentifier)
- aps-environment
- development
-
-
diff --git a/Example/Auth/SwiftSample/Stubs.swift b/Example/Auth/SwiftSample/Stubs.swift
deleted file mode 100644
index edb574f024c..00000000000
--- a/Example/Auth/SwiftSample/Stubs.swift
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2017 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.
- */
-
-/// This file contains a collection of stub functions to verify the Swift syntax of Firebase Auth
-/// APIs in Swift for those that are not already covered by other parts of the app.
-/// These functions are never executed, but just for passing compilation.
-
-import FirebaseAuth
-
-func actionCodeSettingsStubs() {
- let actionCodeSettings = ActionCodeSettings()
- actionCodeSettings.url = URL(string: "http://some.url/path/")
- actionCodeSettings.setIOSBundleID("some.bundle.id")
- actionCodeSettings.setAndroidPackageName("some.package.name", installIfNotAvailable: true,
- minimumVersion: nil)
- let _: String? = actionCodeSettings.iOSBundleID
- let _: String? = actionCodeSettings.androidPackageName
- let _: Bool = actionCodeSettings.androidInstallIfNotAvailable
- let _: String? = actionCodeSettings.androidMinimumVersion
- Auth.auth().sendPasswordReset(withEmail: "nobody@nowhere.com",
- actionCodeSettings: actionCodeSettings) { (error: Error?) -> () in
- }
- Auth.auth().currentUser?.sendEmailVerification(with: actionCodeSettings) {
- (error: Error?) -> () in
- }
-}
-
-func languageStubs() {
- let _: String? = Auth.auth().languageCode
- Auth.auth().languageCode = "asdf"
- Auth.auth().useAppLanguage()
-}
-
-func metadataStubs() {
- let credential = OAuthProvider.credential(withProviderID: "fake", accessToken: "none")
- Auth.auth().signInAndRetrieveData(with: credential) { result, error in
- let _: Bool? = result!.additionalUserInfo!.isNewUser
- let metadata: UserMetadata = result!.user.metadata
- let _: Date? = metadata.lastSignInDate
- let _: Date? = metadata.creationDate
- }
-}
diff --git a/Example/Auth/SwiftSample/ViewController.swift b/Example/Auth/SwiftSample/ViewController.swift
deleted file mode 100644
index 05b0dd266b5..00000000000
--- a/Example/Auth/SwiftSample/ViewController.swift
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * Copyright 2017 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 UIKit
-
-import FirebaseAuth
-import GoogleSignIn
-
-final class ViewController: UIViewController, UITextFieldDelegate, AuthUIDelegate {
- /// The profile image for the currently signed-in user.
- @IBOutlet weak var profileImage: UIImageView!
-
- /// The display name for the currently signed-in user.
- @IBOutlet weak var displayNameLabel: UILabel!
-
- /// The email for the currently signed-in user.
- @IBOutlet weak var emailLabel: UILabel!
-
- /// The ID for the currently signed-in user.
- @IBOutlet weak var userIDLabel: UILabel!
-
- /// The list of providers for the currently signed-in user.
- @IBOutlet weak var providerListLabel: UILabel!
-
- /// The picker for the list of action types.
- @IBOutlet weak var actionTypePicker: UIPickerView!
-
- /// The picker for the list of actions.
- @IBOutlet weak var actionPicker: UIPickerView!
-
- /// The picker for the list of credential types.
- @IBOutlet weak var credentialTypePicker: UIPickerView!
-
- /// The label for the "email" text field.
- @IBOutlet weak var emailInputLabel: UILabel!
-
- /// The "email" text field.
- @IBOutlet weak var emailField: UITextField!
-
- /// The label for the "password" text field.
- @IBOutlet weak var passwordInputLabel: UILabel!
-
- /// The "password" text field.
- @IBOutlet weak var passwordField: UITextField!
-
- /// The "phone" text field.
- @IBOutlet weak var phoneField: UITextField!
-
- /// The scroll view holding all content.
- @IBOutlet weak var scrollView: UIScrollView!
-
- // The active keyboard input field.
- var activeField: UITextField?
-
- /// The currently selected action type.
- fileprivate var actionType = ActionType(rawValue: 0)! {
- didSet {
- if actionType != oldValue {
- actionPicker.reloadAllComponents()
- actionPicker.selectRow(actionType == .auth ? authAction.rawValue : userAction.rawValue,
- inComponent: 0, animated: false)
- }
- }
- }
-
- /// The currently selected auth action.
- fileprivate var authAction = AuthAction(rawValue: 0)!
-
- /// The currently selected user action.
- fileprivate var userAction = UserAction(rawValue: 0)!
-
- /// The currently selected credential.
- fileprivate var credentialType = CredentialType(rawValue: 0)!
-
- /// The current Firebase user.
- fileprivate var user: User? = nil {
- didSet {
- if user?.uid != oldValue?.uid {
- actionTypePicker.reloadAllComponents()
- actionType = ActionType(rawValue: actionTypePicker.selectedRow(inComponent: 0))!
- }
- }
- }
-
- func registerForKeyboardNotifications() {
- NotificationCenter.default.addObserver(self,
- selector:
- #selector(keyboardWillBeShown(notification:)),
- name: NSNotification.Name.UIKeyboardWillShow,
- object: nil)
- NotificationCenter.default.addObserver(self,
- selector: #selector(keyboardWillBeHidden(notification:)),
- name: NSNotification.Name.UIKeyboardWillHide,
- object: nil)
- }
-
- func deregisterFromKeyboardNotifications() {
- NotificationCenter.default.removeObserver(self,
- name: NSNotification.Name.UIKeyboardWillShow,
- object: nil)
- NotificationCenter.default.removeObserver(self,
- name: NSNotification.Name.UIKeyboardWillHide,
- object: nil)
- }
-
- func keyboardWillBeShown(notification: NSNotification) {
- scrollView.isScrollEnabled = true
- let info = notification.userInfo!
- let keyboardSize = (info[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue.size
- let contentInsets : UIEdgeInsets = UIEdgeInsetsMake(0.0, 0.0, keyboardSize!.height, 0.0)
-
- scrollView.contentInset = contentInsets
- scrollView.scrollIndicatorInsets = contentInsets
-
- var aRect = self.view.frame
- aRect.size.height -= keyboardSize!.height
- if let activeField = activeField {
- if (!aRect.contains(activeField.frame.origin)) {
- scrollView.scrollRectToVisible(activeField.frame, animated: true)
- }
- }
- }
-
- func keyboardWillBeHidden(notification: NSNotification){
- let info = notification.userInfo!
- let keyboardSize = (info[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue.size
- let contentInsets : UIEdgeInsets = UIEdgeInsetsMake(0.0, 0.0, -keyboardSize!.height, 0.0)
- scrollView.contentInset = contentInsets
- scrollView.scrollIndicatorInsets = contentInsets
- self.view.endEditing(true)
- scrollView.isScrollEnabled = false
- }
-
- func textFieldDidBeginEditing(_ textField: UITextField) {
- activeField = textField
- }
-
- func textFieldDidEndEditing(_ textField: UITextField) {
- activeField = nil
- }
-
- func dismissKeyboard() {
- view.endEditing(true)
- }
-
- func verify(phoneNumber: String, completion: @escaping (PhoneAuthCredential?, Error?) -> Void) {
- if #available(iOS 8.0, *) {
- PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumber, uiDelegate:self) {
- verificationID, error in
- guard error == nil else {
- completion(nil, error)
- return
- }
- let codeAlertController =
- UIAlertController(title: "Enter Code", message: nil, preferredStyle: .alert)
- codeAlertController.addTextField { textfield in
- textfield.placeholder = "SMS Code"
- textfield.keyboardType = UIKeyboardType.numberPad
- }
- codeAlertController.addAction(UIAlertAction(title: "OK",
- style: .default,
- handler: { (UIAlertAction) in
- let code = codeAlertController.textFields!.first!.text!
- let phoneCredential =
- PhoneAuthProvider.provider().credential(withVerificationID: verificationID ?? "",
- verificationCode: code)
- completion(phoneCredential, nil)
- }))
- self.present(codeAlertController, animated: true, completion: nil)
- }
- }
- }
- /// The user's photo URL used by the last network request for its contents.
- fileprivate var lastPhotoURL: URL? = nil
-
- override func viewDidLoad() {
- GIDSignIn.sharedInstance().uiDelegate = self
- updateUserInfo(Auth.auth())
- NotificationCenter.default.addObserver(forName: .AuthStateDidChange,
- object: Auth.auth(), queue: nil) { notification in
- self.updateUserInfo(notification.object as? Auth)
- }
- phoneField.delegate = self
- registerForKeyboardNotifications()
-
- let tap = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
- scrollView.addGestureRecognizer(tap)
- }
-
- override func viewWillDisappear(_ animated: Bool) {
- deregisterFromKeyboardNotifications()
- }
-
- /// Executes the action designated by the operator on the UI.
- @IBAction func execute(_ sender: UIButton) {
- switch actionType {
- case .auth:
- switch authAction {
- case .fetchProviderForEmail:
- Auth.auth().fetchProviders(forEmail: emailField.text!) { providers, error in
- self.ifNoError(error) {
- self.showAlert(title: "Providers", message: providers?.joined(separator: ", "))
- }
- }
- case .signInAnonymously:
- Auth.auth().signInAnonymously() { user, error in
- self.ifNoError(error) {
- self.showAlert(title: "Signed In Anonymously")
- }
- }
- case .signInWithCredential:
- getCredential() { credential in
- Auth.auth().signInAndRetrieveData(with: credential) { authData, error in
- self.ifNoError(error) {
- self.showAlert(title: "Signed In With Credential",
- message: authData?.user.textDescription)
- }
- }
- }
- case .createUser:
- Auth.auth().createUser(withEmail: emailField.text!, password: passwordField.text!) {
- result, error in
- self.ifNoError(error) {
- self.showAlert(title: "Signed In With Credential", message: result?.user.textDescription)
- }
- }
- case .signOut:
- try! Auth.auth().signOut()
- GIDSignIn.sharedInstance().signOut()
- }
- case .user:
- switch userAction {
- case .updateEmail:
- user!.updateEmail(to: emailField.text!) { error in
- self.ifNoError(error) {
- self.showAlert(title: "Updated Email", message: self.user?.email)
- }
- }
- case .updatePhone:
- let phoneNumber = phoneField.text
- self.verify(phoneNumber: phoneNumber!, completion: { (phoneAuthCredential, error) in
- guard error == nil else {
- self.showAlert(title: "Error", message: error!.localizedDescription)
- return
- }
- self.user!.updatePhoneNumber(phoneAuthCredential!, completion: { error in
- self.ifNoError(error) {
- self.showAlert(title: "Updated Phone Number")
- self.updateUserInfo(Auth.auth())
- }
- })
- })
- case .updatePassword:
- user!.updatePassword(to: passwordField.text!) { error in
- self.ifNoError(error) {
- self.showAlert(title: "Updated Password")
- }
- }
- case .reload:
- user!.reload() { error in
- self.ifNoError(error) {
- self.showAlert(title: "Reloaded", message: self.user?.textDescription)
- }
- }
- case .reauthenticate:
- getCredential() { credential in
- self.user!.reauthenticateAndRetrieveData(with: credential) { authData, error in
- self.ifNoError(error) {
- if (authData?.user.uid != self.user?.uid) {
- let message = "The reauthenticated user must be the same as the original user"
- self.showAlert(title: "Reauthention error",
- message: message)
- return
- }
- self.showAlert(title: "Reauthenticated", message: self.user?.textDescription)
- }
- }
- }
- case .getToken:
- user!.getIDToken() { token, error in
- self.ifNoError(error) {
- self.showAlert(title: "Got ID Token", message: token)
- }
- }
- case .linkWithCredential:
- getCredential() { credential in
- self.user!.linkAndRetrieveData(with: credential) { authData, error in
- self.ifNoError(error) {
- self.showAlert(title: "Linked With Credential",
- message: authData?.user.textDescription)
- }
- }
- }
- case .deleteAccount:
- user!.delete() { error in
- self.ifNoError(error) {
- self.showAlert(title: "Deleted Account")
- }
- }
- }
- }
- }
-
- /// Gets an AuthCredential potentially asynchronously.
- private func getCredential(completion: @escaping (AuthCredential) -> Void) {
- switch credentialType {
- case .google:
- GIDSignIn.sharedInstance().delegate = GoogleSignInDelegate(completion: { user, error in
- self.ifNoError(error) {
- completion(GoogleAuthProvider.credential(
- withIDToken: user!.authentication.idToken,
- accessToken: user!.authentication.accessToken))
- }
- })
- GIDSignIn.sharedInstance().signIn()
- case .password:
- completion(EmailAuthProvider.credential(withEmail: emailField.text!,
- password: passwordField.text!))
- case .phone:
- let phoneNumber = phoneField.text
- self.verify(phoneNumber: phoneNumber!, completion: { (phoneAuthCredential, error) in
- guard error == nil else {
- self.showAlert(title: "Error", message: error!.localizedDescription)
- return
- }
- completion(phoneAuthCredential!)
- })
- }
- }
-
- /// Updates user's profile image and info text.
- private func updateUserInfo(_ auth: Auth?) {
- user = auth?.currentUser
- displayNameLabel.text = user?.displayName
- emailLabel.text = user?.email
- userIDLabel.text = user?.uid
- let providers = user?.providerData.map { userInfo in userInfo.providerID }
- providerListLabel.text = providers?.joined(separator: ", ")
- if let photoURL = user?.photoURL {
- lastPhotoURL = photoURL
- let queue: DispatchQueue
- if #available(iOS 8.0, *) {
- queue = DispatchQueue.global(qos: .background)
- } else {
- queue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background)
- }
- queue.async {
- if let imageData = try? Data(contentsOf: photoURL) {
- let image = UIImage(data: imageData)
- DispatchQueue.main.async {
- if self.lastPhotoURL == photoURL {
- self.profileImage.image = image
- }
- }
- }
- }
- } else {
- lastPhotoURL = nil
- self.profileImage.image = nil
- }
- updateControls()
- }
-
- // Updates the states of the UI controls.
- fileprivate func updateControls() {
- let action: Action
- switch actionType {
- case .auth:
- action = authAction
- case .user:
- action = userAction
- }
- let isCredentialEnabled = action.requiresCredential
- credentialTypePicker.isUserInteractionEnabled = isCredentialEnabled
- credentialTypePicker.alpha = isCredentialEnabled ? 1.0 : 0.6
- let isEmailEnabled = isCredentialEnabled && credentialType.requiresEmail || action.requiresEmail
- emailInputLabel.alpha = isEmailEnabled ? 1.0 : 0.6
- emailField.isEnabled = isEmailEnabled
- let isPasswordEnabled = isCredentialEnabled && credentialType.requiresPassword ||
- action.requiresPassword
- passwordInputLabel.alpha = isPasswordEnabled ? 1.0 : 0.6
- passwordField.isEnabled = isPasswordEnabled
- phoneField.isEnabled = credentialType.requiresPhone || action.requiresPhoneNumber
- }
-
- fileprivate func showAlert(title: String, message: String? = "") {
- if #available(iOS 8.0, *) {
- let alertController =
- UIAlertController(title: title, message: message, preferredStyle: .alert)
- alertController.addAction(UIAlertAction(title: "OK",
- style: .default,
- handler: { (UIAlertAction) in
- alertController.dismiss(animated: true, completion: nil)
- }))
- self.present(alertController, animated: true, completion: nil)
- } else {
- UIAlertView(title: title,
- message: message ?? "(NULL)",
- delegate: nil,
- cancelButtonTitle: nil,
- otherButtonTitles: "OK").show()
- }
- }
-
- private func ifNoError(_ error: Error?, execute: () -> Void) {
- guard error == nil else {
- showAlert(title: "Error", message: error!.localizedDescription)
- return
- }
- execute()
- }
-}
-
-extension ViewController : GIDSignInUIDelegate {
- func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
- present(viewController, animated: true, completion: nil)
- }
-
- func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
- dismiss(animated: true, completion: nil)
- }
-}
-
-extension ViewController : UIPickerViewDataSource {
- func numberOfComponents(in pickerView: UIPickerView) -> Int {
- return 1
- }
-
- func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
- switch pickerView {
- case actionTypePicker:
- if Auth.auth().currentUser != nil {
- return ActionType.countWithUser
- } else {
- return ActionType.countWithoutUser
- }
- case actionPicker:
- switch actionType {
- case .auth:
- return AuthAction.count
- case .user:
- return UserAction.count
- }
- case credentialTypePicker:
- return CredentialType.count
- default:
- return 0
- }
- }
-}
-
-extension ViewController : UIPickerViewDelegate {
- func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int)
- -> String? {
- switch pickerView {
- case actionTypePicker:
- return ActionType(rawValue: row)!.text
- case actionPicker:
- switch actionType {
- case .auth:
- return AuthAction(rawValue: row)!.text
- case .user:
- return UserAction(rawValue: row)!.text
- }
- case credentialTypePicker:
- return CredentialType(rawValue: row)!.text
- default:
- return nil
- }
- }
-
- func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
- switch pickerView {
- case actionTypePicker:
- actionType = ActionType(rawValue: row)!
- case actionPicker:
- switch actionType {
- case .auth:
- authAction = AuthAction(rawValue: row)!
- case .user:
- userAction = UserAction(rawValue: row)!
- }
- case credentialTypePicker:
- credentialType = CredentialType(rawValue: row)!
- default:
- break
- }
- updateControls()
- }
-}
-
-/// An adapter class to pass GoogleSignIn delegate method to a block.
-fileprivate final class GoogleSignInDelegate: NSObject, GIDSignInDelegate {
-
- private let completion: (GIDGoogleUser?, Error?) -> Void
- private var retainedSelf: GoogleSignInDelegate?
-
- init(completion: @escaping (GIDGoogleUser?, Error?) -> Void) {
- self.completion = completion
- super.init()
- retainedSelf = self
- }
-
- func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser?, withError error: Error?) {
- completion(user, error)
- retainedSelf = nil
- }
-}
-
-/// The list of all possible action types.
-fileprivate enum ActionType: Int {
-
- case auth, user
-
- // Count of action types when no user is signed in.
- static var countWithoutUser: Int {
- return ActionType.auth.rawValue + 1
- }
-
- // Count of action types when a user is signed in.
- static var countWithUser: Int {
- return ActionType.user.rawValue + 1
- }
-
- /// The text description for a particular enum value.
- var text : String {
- switch self {
- case .auth:
- return "Auth"
- case .user:
- return "User"
- }
- }
-}
-
-fileprivate protocol Action {
- /// The text description for the particular action.
- var text: String { get }
-
- /// Whether or not the action requires a credential.
- var requiresCredential : Bool { get }
-
- /// Whether or not the action requires an email.
- var requiresEmail: Bool { get }
-
- /// Whether or not the credential requires a password.
- var requiresPassword: Bool { get }
-
- /// Whether or not the credential requires a phone number.
- var requiresPhoneNumber: Bool { get }
-}
-
-/// The list of all possible actions the operator can take on the Auth object.
-fileprivate enum AuthAction: Int, Action {
-
- case fetchProviderForEmail, signInAnonymously, signInWithCredential, createUser, signOut
-
- /// Total number of auth actions.
- static var count: Int {
- return AuthAction.signOut.rawValue + 1
- }
-
- var text : String {
- switch self {
- case .fetchProviderForEmail:
- return "Fetch Provider ⬇️"
- case .signInAnonymously:
- return "Sign In Anonymously"
- case .signInWithCredential:
- return "Sign In w/ Credential ↙️"
- case .createUser:
- return "Create User ⬇️"
- case .signOut:
- return "Sign Out"
- }
- }
-
- var requiresCredential : Bool {
- return self == .signInWithCredential
- }
-
- var requiresEmail : Bool {
- return self == .fetchProviderForEmail || self == .createUser
- }
-
- var requiresPassword : Bool {
- return self == .createUser
- }
-
- var requiresPhoneNumber: Bool {
- return false
- }
-}
-
-/// The list of all possible actions the operator can take on the User object.
-fileprivate enum UserAction: Int, Action {
-
- case updateEmail, updatePhone, updatePassword, reload, reauthenticate, getToken,
- linkWithCredential, deleteAccount
-
- /// Total number of user actions.
- static var count: Int {
- return UserAction.deleteAccount.rawValue + 1
- }
-
- var text : String {
- switch self {
- case .updateEmail:
- return "Update Email ⬇️"
- case .updatePhone:
- if #available(iOS 8.0, *) {
- return "Update Phone ⬇️"
- } else {
- return "-"
- }
- case .updatePassword:
- return "Update Password ⬇️"
- case .reload:
- return "Reload"
- case .reauthenticate:
- return "Reauthenticate ↙️"
- case .getToken:
- return "Get Token"
- case .linkWithCredential:
- return "Link With Credential ↙️"
- case .deleteAccount:
- return "Delete Account"
- }
- }
-
- var requiresCredential : Bool {
- return self == .reauthenticate || self == .linkWithCredential
- }
-
- var requiresEmail : Bool {
- return self == .updateEmail
- }
-
- var requiresPassword : Bool {
- return self == .updatePassword
- }
-
- var requiresPhoneNumber : Bool {
- return self == .updatePhone
- }
-
-}
-
-/// The list of all possible credential types the operator can use to sign in or link.
-fileprivate enum CredentialType: Int {
-
- case google, password, phone
-
- /// Total number of enum values.
- static var count: Int {
- return CredentialType.phone.rawValue + 1
- }
-
- /// The text description for a particular enum value.
- var text : String {
- switch self {
- case .google:
- return "Google"
- case .password:
- return "Password ➡️️"
- case .phone:
- if #available(iOS 8.0, *) {
- return "Phone ➡️️"
- } else {
- return "-"
- }
- }
- }
-
- /// Whether or not the credential requires an email.
- var requiresEmail : Bool {
- return self == .password
- }
-
- /// Whether or not the credential requires a password.
- var requiresPassword : Bool {
- return self == .password
- }
-
- /// Whether or not the credential requires a phone number.
- var requiresPhone : Bool {
- return self == .phone
- }
-}
-
-fileprivate extension User {
- var textDescription: String {
- return self.displayName ?? self.email ?? self.uid
- }
-}
diff --git a/Example/Firebase.xcodeproj/project.pbxproj b/Example/Firebase.xcodeproj/project.pbxproj
index 41a982e6abf..2d8cf5da68e 100644
--- a/Example/Firebase.xcodeproj/project.pbxproj
+++ b/Example/Firebase.xcodeproj/project.pbxproj
@@ -21,19 +21,6 @@
name = AllUnitTests_macOS;
productName = AllTests;
};
- DE26D2971F70668F004AE1D3 /* Auth_AllTests */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = DE26D2981F70668F004AE1D3 /* Build configuration list for PBXAggregateTarget "Auth_AllTests" */;
- buildPhases = (
- );
- dependencies = (
- DE26D29E1F7066B0004AE1D3 /* PBXTargetDependency */,
- DE26D2A01F7066B0004AE1D3 /* PBXTargetDependency */,
- DE26D29C1F7066A7004AE1D3 /* PBXTargetDependency */,
- );
- name = Auth_AllTests;
- productName = Auth_AllTests;
- };
DE3373891E73773400881891 /* AllUnitTests_iOS */ = {
isa = PBXAggregateTarget;
buildConfigurationList = DE33738A1E73773400881891 /* Build configuration list for PBXAggregateTarget "AllUnitTests_iOS" */;
@@ -343,13 +330,6 @@
DE26D2581F7040E4004AE1D3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DE26D1E41F70333E004AE1D3 /* Images.xcassets */; };
DE26D2681F704A0C004AE1D3 /* FirebaseAuthApiTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE26D1C91F70330A004AE1D3 /* FirebaseAuthApiTests.m */; };
DE26D2771F705CB5004AE1D3 /* FirebaseAuthEarlGreyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE26D1FA1F70333E004AE1D3 /* FirebaseAuthEarlGreyTests.m */; };
- DE26D28F1F705F34004AE1D3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = DE26D2001F70333E004AE1D3 /* GoogleService-Info.plist */; };
- DE26D2901F705F39004AE1D3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE26D2041F70333E004AE1D3 /* Main.storyboard */; };
- DE26D2911F705F3E004AE1D3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE26D2031F70333E004AE1D3 /* LaunchScreen.storyboard */; };
- DE26D2921F705F4A004AE1D3 /* Stubs.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE26D2061F70333E004AE1D3 /* Stubs.swift */; };
- DE26D2931F705F4D004AE1D3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE26D2071F70333E004AE1D3 /* ViewController.swift */; };
- DE26D2941F705F51004AE1D3 /* AuthCredentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE26D1FE1F70333E004AE1D3 /* AuthCredentials.swift */; };
- DE26D2951F705F53004AE1D3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE26D1FD1F70333E004AE1D3 /* AppDelegate.swift */; };
DE37C63B2163D5F30025D03E /* FIRMessagingAnalyticsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE37C63A2163D5F30025D03E /* FIRMessagingAnalyticsTest.m */; };
DE47C0E2207AC87D00B1AEDF /* FIRSampleAppUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = AFC8BAA31EC257D800B8EEAE /* FIRSampleAppUtilities.m */; };
DE47C0E7207AC87D00B1AEDF /* Shared.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AFAF36F41EC28C25004BDEE5 /* Shared.xcassets */; };
@@ -553,7 +533,6 @@
DEE14D931E84468D006FA992 /* FIROptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEE14D7A1E844677006FA992 /* FIROptionsTest.m */; };
DEE14D941E84468D006FA992 /* FIRTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = DEE14D7C1E844677006FA992 /* FIRTestCase.m */; };
DEF288411F9AB6E100D480CF /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DEF288401F9AB6E100D480CF /* Default-568h@2x.png */; };
- DEF288421F9AB6E100D480CF /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DEF288401F9AB6E100D480CF /* Default-568h@2x.png */; };
DEF61BFD216E8B1100A738D4 /* FIRMessagingReceiverTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEF61BFC216E8B1000A738D4 /* FIRMessagingReceiverTest.m */; };
DEF6C30D1FBCE72F005D0740 /* FIRAuthDispatcherTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9314FF1E86C6FF0083EDBF /* FIRAuthDispatcherTests.m */; };
DEF6C30F1FBCE775005D0740 /* FIRAdditionalUserInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE9314FA1E86C6FF0083EDBF /* FIRAdditionalUserInfoTests.m */; };
@@ -747,27 +726,6 @@
remoteGlobalIDString = DE26D22D1F70398A004AE1D3;
remoteInfo = Auth_Sample;
};
- DE26D29B1F7066A7004AE1D3 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 6003F582195388D10070C39A /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = DE9314DD1E86C6BE0083EDBF;
- remoteInfo = Auth_Tests_iOS;
- };
- DE26D29D1F7066B0004AE1D3 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 6003F582195388D10070C39A /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = DE26D25C1F7049F1004AE1D3;
- remoteInfo = Auth_ApiTests;
- };
- DE26D29F1F7066B0004AE1D3 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 6003F582195388D10070C39A /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = DE26D26C1F705C35004AE1D3;
- remoteInfo = Auth_EarlGreyTests;
- };
DE3373971E73776F00881891 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6003F582195388D10070C39A /* Project object */;
@@ -1091,21 +1049,9 @@
DE26D1F81F70333E004AE1D3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; };
DE26D1FA1F70333E004AE1D3 /* FirebaseAuthEarlGreyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirebaseAuthEarlGreyTests.m; sourceTree = ""; };
DE26D1FB1F70333E004AE1D3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- DE26D1FD1F70333E004AE1D3 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- DE26D1FE1F70333E004AE1D3 /* AuthCredentials.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCredentials.swift; sourceTree = ""; };
- DE26D1FF1F70333E004AE1D3 /* AuthCredentialsTemplate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCredentialsTemplate.swift; sourceTree = ""; };
- DE26D2001F70333E004AE1D3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; };
- DE26D2011F70333E004AE1D3 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- DE26D2021F70333E004AE1D3 /* InfoTemplate.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = InfoTemplate.plist; sourceTree = ""; };
- DE26D2031F70333E004AE1D3 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; };
- DE26D2041F70333E004AE1D3 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
- DE26D2051F70333E004AE1D3 /* Sample.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Sample.entitlements; sourceTree = ""; };
- DE26D2061F70333E004AE1D3 /* Stubs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stubs.swift; sourceTree = ""; };
- DE26D2071F70333E004AE1D3 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
DE26D22E1F70398A004AE1D3 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
DE26D25D1F7049F1004AE1D3 /* Auth_ApiTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Auth_ApiTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DE26D26D1F705C35004AE1D3 /* Auth_EarlGreyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Auth_EarlGreyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- DE26D27D1F705EC7004AE1D3 /* SwiftSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
DE37C63A2163D5F30025D03E /* FIRMessagingAnalyticsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FIRMessagingAnalyticsTest.m; sourceTree = ""; };
DE45C6641E7DA8CB009E6ACD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
DE47C0ED207AC87D00B1AEDF /* Messaging_Sample_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Messaging_Sample_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1508,13 +1454,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- DE26D27A1F705EC7004AE1D3 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
DE47C0E4207AC87D00B1AEDF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -1746,7 +1685,6 @@
DE26D22E1F70398A004AE1D3 /* Sample.app */,
DE26D25D1F7049F1004AE1D3 /* Auth_ApiTests.xctest */,
DE26D26D1F705C35004AE1D3 /* Auth_EarlGreyTests.xctest */,
- DE26D27D1F705EC7004AE1D3 /* SwiftSample.app */,
DEAAD3811FBA11270053BF48 /* Core_Example_tvOS.app */,
DEAAD3951FBA11270053BF48 /* Core_Tests_tvOS.xctest */,
DEAAD3E11FBA46AA0053BF48 /* Storage_Example_tvOS.app */,
@@ -2036,24 +1974,6 @@
path = EarlGreyTests;
sourceTree = "";
};
- DE26D1FC1F70333E004AE1D3 /* SwiftSample */ = {
- isa = PBXGroup;
- children = (
- DE26D2051F70333E004AE1D3 /* Sample.entitlements */,
- DE26D2001F70333E004AE1D3 /* GoogleService-Info.plist */,
- DE26D2011F70333E004AE1D3 /* Info.plist */,
- DE26D2021F70333E004AE1D3 /* InfoTemplate.plist */,
- DE26D2031F70333E004AE1D3 /* LaunchScreen.storyboard */,
- DE26D2041F70333E004AE1D3 /* Main.storyboard */,
- DE26D1FD1F70333E004AE1D3 /* AppDelegate.swift */,
- DE26D1FE1F70333E004AE1D3 /* AuthCredentials.swift */,
- DE26D1FF1F70333E004AE1D3 /* AuthCredentialsTemplate.swift */,
- DE26D2061F70333E004AE1D3 /* Stubs.swift */,
- DE26D2071F70333E004AE1D3 /* ViewController.swift */,
- );
- path = SwiftSample;
- sourceTree = "";
- };
DE47C106207AC94A00B1AEDF /* Sample */ = {
isa = PBXGroup;
children = (
@@ -2218,12 +2138,11 @@
DE9314EB1E86C6FF0083EDBF /* Auth */ = {
isa = PBXGroup;
children = (
- DE26D1F91F70333E004AE1D3 /* EarlGreyTests */,
DE26D1CD1F70333E004AE1D3 /* Sample */,
- DE26D1FC1F70333E004AE1D3 /* SwiftSample */,
+ DE9314F91E86C6FF0083EDBF /* Tests */,
DE26D1C61F70330A004AE1D3 /* ApiTests */,
+ DE26D1F91F70333E004AE1D3 /* EarlGreyTests */,
DE9314EC1E86C6FF0083EDBF /* App */,
- DE9314F91E86C6FF0083EDBF /* Tests */,
);
path = Auth;
sourceTree = "";
@@ -2872,23 +2791,6 @@
productReference = DE26D26D1F705C35004AE1D3 /* Auth_EarlGreyTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
- DE26D27C1F705EC7004AE1D3 /* Auth_SwiftSample */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = DE26D28C1F705EC7004AE1D3 /* Build configuration list for PBXNativeTarget "Auth_SwiftSample" */;
- buildPhases = (
- DE26D2791F705EC7004AE1D3 /* Sources */,
- DE26D27A1F705EC7004AE1D3 /* Frameworks */,
- DE26D27B1F705EC7004AE1D3 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Auth_SwiftSample;
- productName = Auth_SwiftSample;
- productReference = DE26D27D1F705EC7004AE1D3 /* SwiftSample.app */;
- productType = "com.apple.product-type.application";
- };
DE47C0DC207AC87D00B1AEDF /* Messaging_Sample_iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = DE47C0EA207AC87D00B1AEDF /* Build configuration list for PBXNativeTarget "Messaging_Sample_iOS" */;
@@ -3303,16 +3205,6 @@
ProvisioningStyle = Automatic;
TestTargetID = DE26D22D1F70398A004AE1D3;
};
- DE26D27C1F705EC7004AE1D3 = {
- CreatedOnToolsVersion = 9.0;
- DevelopmentTeam = EQHXZ8M8AV;
- ProvisioningStyle = Automatic;
- };
- DE26D2971F70668F004AE1D3 = {
- CreatedOnToolsVersion = 9.0;
- DevelopmentTeam = EQHXZ8M8AV;
- ProvisioningStyle = Automatic;
- };
DE3373891E73773400881891 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = EQHXZ8M8AV;
@@ -3427,10 +3319,8 @@
DE1FAE8F1FBCF5E100897AAA /* Auth_Example_tvOS */,
DE53893D1FBB62E100199FC2 /* Auth_Tests_tvOS */,
DE26D22D1F70398A004AE1D3 /* Auth_Sample */,
- DE26D27C1F705EC7004AE1D3 /* Auth_SwiftSample */,
DE26D25C1F7049F1004AE1D3 /* Auth_ApiTests */,
DE26D26C1F705C35004AE1D3 /* Auth_EarlGreyTests */,
- DE26D2971F70668F004AE1D3 /* Auth_AllTests */,
DEE14D401E84464D006FA992 /* Core_Example_iOS */,
DEE14D581E84464D006FA992 /* Core_Tests_iOS */,
D064E6951ED9B1BF001956DF /* Core_Example_macOS */,
@@ -3657,17 +3547,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- DE26D27B1F705EC7004AE1D3 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- DE26D28F1F705F34004AE1D3 /* GoogleService-Info.plist in Resources */,
- DEF288421F9AB6E100D480CF /* Default-568h@2x.png in Resources */,
- DE26D2901F705F39004AE1D3 /* Main.storyboard in Resources */,
- DE26D2911F705F3E004AE1D3 /* LaunchScreen.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
DE47C0E5207AC87D00B1AEDF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -4206,17 +4085,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- DE26D2791F705EC7004AE1D3 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- DE26D2921F705F4A004AE1D3 /* Stubs.swift in Sources */,
- DE26D2941F705F51004AE1D3 /* AuthCredentials.swift in Sources */,
- DE26D2951F705F53004AE1D3 /* AppDelegate.swift in Sources */,
- DE26D2931F705F4D004AE1D3 /* ViewController.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
DE47C0DD207AC87D00B1AEDF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -4646,21 +4514,6 @@
target = DE26D22D1F70398A004AE1D3 /* Auth_Sample */;
targetProxy = DE26D2721F705C35004AE1D3 /* PBXContainerItemProxy */;
};
- DE26D29C1F7066A7004AE1D3 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = DE9314DD1E86C6BE0083EDBF /* Auth_Tests_iOS */;
- targetProxy = DE26D29B1F7066A7004AE1D3 /* PBXContainerItemProxy */;
- };
- DE26D29E1F7066B0004AE1D3 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = DE26D25C1F7049F1004AE1D3 /* Auth_ApiTests */;
- targetProxy = DE26D29D1F7066B0004AE1D3 /* PBXContainerItemProxy */;
- };
- DE26D2A01F7066B0004AE1D3 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = DE26D26C1F705C35004AE1D3 /* Auth_EarlGreyTests */;
- targetProxy = DE26D29F1F7066B0004AE1D3 /* PBXContainerItemProxy */;
- };
DE3373981E73776F00881891 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DEB13A0A1E73507E00AC236D /* Storage_Tests_iOS */;
@@ -5760,7 +5613,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 4ANB9W7R3P;
GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = "$SRCROOT/DynamicLinks/FDLBuilderTestAppObjC/Info.plist";
+ INFOPLIST_FILE = $SRCROOT/DynamicLinks/FDLBuilderTestAppObjC/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
@@ -5794,7 +5647,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 4ANB9W7R3P;
GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = "$SRCROOT/DynamicLinks/FDLBuilderTestAppObjC/Info.plist";
+ INFOPLIST_FILE = $SRCROOT/DynamicLinks/FDLBuilderTestAppObjC/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
@@ -6236,90 +6089,6 @@
};
name = Release;
};
- DE26D28D1F705EC7004AE1D3 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEBUG_INFORMATION_FORMAT = dwarf;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = Auth/SwiftSample/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MTL_ENABLE_DEBUG_INFO = YES;
- PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseExperimental2.dev;
- PRODUCT_NAME = SwiftSample;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- DE26D28E1F705EC7004AE1D3 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = Auth/SwiftSample/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MTL_ENABLE_DEBUG_INFO = NO;
- PRODUCT_BUNDLE_IDENTIFIER = com.google.FirebaseExperimental2.dev;
- PRODUCT_NAME = SwiftSample;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 3.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
- DE26D2991F70668F004AE1D3 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- DE26D29A1F70668F004AE1D3 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = EQHXZ8M8AV;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
DE33738B1E73773400881891 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -7591,24 +7360,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- DE26D28C1F705EC7004AE1D3 /* Build configuration list for PBXNativeTarget "Auth_SwiftSample" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- DE26D28D1F705EC7004AE1D3 /* Debug */,
- DE26D28E1F705EC7004AE1D3 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- DE26D2981F70668F004AE1D3 /* Build configuration list for PBXAggregateTarget "Auth_AllTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- DE26D2991F70668F004AE1D3 /* Debug */,
- DE26D29A1F70668F004AE1D3 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
DE33738A1E73773400881891 /* Build configuration list for PBXAggregateTarget "AllUnitTests_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_AllTests.xcscheme b/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_AllTests.xcscheme
deleted file mode 100644
index ea753c2bd90..00000000000
--- a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_AllTests.xcscheme
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_SwiftSample.xcscheme b/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_SwiftSample.xcscheme
deleted file mode 100644
index aaf8399daab..00000000000
--- a/Example/Firebase.xcodeproj/xcshareddata/xcschemes/Auth_SwiftSample.xcscheme
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Example/Podfile b/Example/Podfile
index 7bd3b8bd871..580c0c7c6db 100644
--- a/Example/Podfile
+++ b/Example/Podfile
@@ -137,14 +137,6 @@ target 'Auth_Sample' do
end
end
-target 'Auth_SwiftSample' do
- platform :ios, '8.0'
- pod 'FirebaseAuth', :path => '../'
- pod 'FirebaseCore', :path => '../'
- pod 'GoogleSignIn'
- pod 'FirebaseInstanceID'
-end
-
target 'Core_Example_macOS' do
platform :osx, '10.10'