Skip to content

Commit

Permalink
Refactor the code, create new Services group for Firebase Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
superzzp committed Feb 8, 2019
1 parent 3c4f283 commit df8ca28
Show file tree
Hide file tree
Showing 10 changed files with 316 additions and 77 deletions.
6 changes: 4 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ target 'VisualEyes' do
pod 'Firebase/Core'
pod 'Firebase/MLVision'
pod 'Firebase/MLVisionFaceModel'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'FirebaseUI/Auth'
pod 'Firebase/Database'

end
31 changes: 30 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
PODS:
- Alamofire (4.8.1)
- Firebase/Auth (5.16.0):
- Firebase/CoreOnly
- FirebaseAuth (= 5.3.0)
- Firebase/Core (5.16.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.5.0)
- Firebase/CoreOnly (5.16.0):
- FirebaseCore (= 5.2.0)
- Firebase/Database (5.16.0):
- Firebase/CoreOnly
- FirebaseDatabase (= 5.1.0)
- Firebase/MLVision (5.16.0):
- Firebase/CoreOnly
- FirebaseMLVision (= 0.14.0)
Expand All @@ -23,9 +29,18 @@ PODS:
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseAuth (5.3.0):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.2)
- GoogleUtilities/Environment (~> 5.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (5.2.0):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseDatabase (5.1.0):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.2)
- leveldb-library (~> 1.18)
- FirebaseInstanceID (3.4.0):
- FirebaseCore (~> 5.2)
- GoogleUtilities/Environment (~> 5.3)
Expand All @@ -47,6 +62,8 @@ PODS:
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseUI/Auth (5.2.2):
- Firebase/Auth (~> 5.0)
- GoogleAPIClientForREST/Core (1.3.8):
- GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Vision (1.3.8):
Expand Down Expand Up @@ -93,6 +110,7 @@ PODS:
- GTMSessionFetcher/Core (1.2.1)
- GTMSessionFetcher/Full (1.2.1):
- GTMSessionFetcher/Core (= 1.2.1)
- leveldb-library (1.20)
- nanopb (0.3.901):
- nanopb/decode (= 0.3.901)
- nanopb/encode (= 0.3.901)
Expand All @@ -103,30 +121,37 @@ PODS:

DEPENDENCIES:
- Alamofire
- Firebase/Auth
- Firebase/Core
- Firebase/Database
- Firebase/MLVision
- Firebase/MLVisionFaceModel
- Firebase/Storage
- FirebaseUI/Auth
- SwiftyJSON

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Alamofire
- Firebase
- FirebaseAnalytics
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseDatabase
- FirebaseInstanceID
- FirebaseMLCommon
- FirebaseMLVision
- FirebaseMLVisionFaceModel
- FirebaseStorage
- FirebaseUI
- GoogleAPIClientForREST
- GoogleAppMeasurement
- GoogleMobileVision
- GoogleToolboxForMac
- GoogleUtilities
- GTMSessionFetcher
- leveldb-library
- nanopb
- Protobuf
- SwiftyJSON
Expand All @@ -135,23 +160,27 @@ SPEC CHECKSUMS:
Alamofire: 16ce2c353fb72865124ddae8a57c5942388f4f11
Firebase: 749a8ff4962f9d8c79dda1966de20f6f77583d67
FirebaseAnalytics: d35d47c03c50c73c14a7fd31463c5775843e78a9
FirebaseAuth: c9b3ff063c223d2841d97240af547ce511bce19a
FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
FirebaseCore: ea2d1816723ef21492b8e9113303e1350db5e08c
FirebaseDatabase: 23acb0c53cd4d4070a427b60100b2e4aaa97c45d
FirebaseInstanceID: 97ea7a5dca9afd72c79bfcdddb7a44aa1cbb42a1
FirebaseMLCommon: d8a789e36a7faa175b1a5d1139e7fc7323c8db7b
FirebaseMLVision: 07c0da3ceaa5ecde621528a985748d6098a84388
FirebaseMLVisionFaceModel: 8c80355e22cfcf100ad2ac9c618536d19daf266b
FirebaseStorage: 29075f874c2b3cf61e5221a62c4ceefc809e5412
FirebaseUI: 09519bf436a055cd696bf68687d624423150e4c0
GoogleAPIClientForREST: 5447a194eae517986cafe6421a5330b80b820591
GoogleAppMeasurement: 621f3bc6211d5ba548debe01fafad30cf5ab6859
GoogleMobileVision: a1f93108b3527d67339e2de80e1db76645f9e8b9
GoogleToolboxForMac: ff31605b7d66400dcec09bed5861689aebadda4d
GoogleUtilities: 111a012f4c3a29c9e7c954c082fafd6ee3c999c0
GTMSessionFetcher: 32aeca0aa144acea523e1c8e053089dec2cb98ca
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5
SwiftyJSON: c4bcba26dd9ec7a027fc8eade48e2c911f229e96

PODFILE CHECKSUM: 7193d3473dd453a7b19a347bea2ba13640a95de2
PODFILE CHECKSUM: 814697674dd858c967f8583ee22f5a80815137c0

COCOAPODS: 1.5.3
28 changes: 28 additions & 0 deletions VisualEyes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
0B6166E4220D683C006EDA27 /* StorageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B6166E3220D683C006EDA27 /* StorageService.swift */; };
0B6166E6220D6914006EDA27 /* UserService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B6166E5220D6914006EDA27 /* UserService.swift */; };
0B6166E8220D6A09006EDA27 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B6166E7220D6A09006EDA27 /* LoginViewController.swift */; };
0B6166EA220D6A90006EDA27 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B6166E9220D6A90006EDA27 /* User.swift */; };
0BF9B2CC22076CF400A3CDCF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9B2CB22076CF400A3CDCF /* AppDelegate.swift */; };
0BF9B2CE22076CF400A3CDCF /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BF9B2CD22076CF400A3CDCF /* art.scnassets */; };
0BF9B2D022076CF400A3CDCF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9B2CF22076CF400A3CDCF /* ViewController.swift */; };
Expand All @@ -23,6 +27,10 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0B6166E3220D683C006EDA27 /* StorageService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageService.swift; sourceTree = "<group>"; };
0B6166E5220D6914006EDA27 /* UserService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserService.swift; sourceTree = "<group>"; };
0B6166E7220D6A09006EDA27 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = "<group>"; };
0B6166E9220D6A90006EDA27 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
0BF9B2C822076CF400A3CDCF /* VisualEyes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VisualEyes.app; sourceTree = BUILT_PRODUCTS_DIR; };
0BF9B2CB22076CF400A3CDCF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
0BF9B2CD22076CF400A3CDCF /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -63,6 +71,15 @@
name = Pods;
sourceTree = "<group>";
};
0B6166E2220D67C9006EDA27 /* Services */ = {
isa = PBXGroup;
children = (
0B6166E3220D683C006EDA27 /* StorageService.swift */,
0B6166E5220D6914006EDA27 /* UserService.swift */,
);
path = Services;
sourceTree = "<group>";
};
0BF9B2BF22076CF400A3CDCF = {
isa = PBXGroup;
children = (
Expand All @@ -84,6 +101,7 @@
0BF9B2CA22076CF400A3CDCF /* VisualEyes */ = {
isa = PBXGroup;
children = (
0B6166E2220D67C9006EDA27 /* Services */,
0BF9B2F02207791C00A3CDCF /* Supporting-files */,
0BF9B2EF2207790200A3CDCF /* Extensions */,
0BF9B2E222076D2A00A3CDCF /* Controller */,
Expand All @@ -101,6 +119,7 @@
children = (
0BF9B2ED220773E200A3CDCF /* UserData.swift */,
0BF9B2F3220C275F00A3CDCF /* UserSnapPos.swift */,
0B6166E9220D6A90006EDA27 /* User.swift */,
);
path = Model;
sourceTree = "<group>";
Expand All @@ -119,6 +138,7 @@
children = (
0BF9B2CF22076CF400A3CDCF /* ViewController.swift */,
0BF9B2EB220773C300A3CDCF /* DataViewController.swift */,
0B6166E7220D6A09006EDA27 /* LoginViewController.swift */,
);
path = Controller;
sourceTree = "<group>";
Expand Down Expand Up @@ -252,12 +272,14 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-VisualEyes/Pods-VisualEyes-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAuthUI.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleMobileVision/GoogleMVFaceDetectorResources.bundle",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAuthUI.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMVFaceDetectorResources.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -281,6 +303,7 @@
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
);
name = "[CP] Embed Pods Frameworks";
Expand All @@ -294,6 +317,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -310,11 +334,15 @@
files = (
0BF9B2EC220773C300A3CDCF /* DataViewController.swift in Sources */,
0BF9B2D022076CF400A3CDCF /* ViewController.swift in Sources */,
0B6166E6220D6914006EDA27 /* UserService.swift in Sources */,
0BF9B2F4220C275F00A3CDCF /* UserSnapPos.swift in Sources */,
0BF9B2E6220772F300A3CDCF /* Extensions.swift in Sources */,
0BF9B2EE220773E200A3CDCF /* UserData.swift in Sources */,
0B6166E4220D683C006EDA27 /* StorageService.swift in Sources */,
0BF9B2CC22076CF400A3CDCF /* AppDelegate.swift in Sources */,
0B6166E8220D6A09006EDA27 /* LoginViewController.swift in Sources */,
0BF9B2F22207795600A3CDCF /* Constants.swift in Sources */,
0B6166EA220D6A90006EDA27 /* User.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>VisualEyes.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>12</integer>
<integer>17</integer>
</dict>
</dict>
</dict>
Expand Down
Binary file not shown.
22 changes: 22 additions & 0 deletions VisualEyes/Controller/LoginViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// LoginViewController.swift
// VisualEyes
//
// Created by Alex Zhang on 2019-02-07.
// Copyright © 2019 Alex Zhang. All rights reserved.
//

//preemptively solved namespace conflict between Makestagram.User and FirebaseAuth.User by using type alias FIRUser

import Foundation
import UIKit
import FirebaseAuth
import FirebaseUI
import FirebaseDatabase

typealias FIRUser = FirebaseAuth.User

class LoginViewController: UIViewController,FUIAuthDelegate{


}
Loading

0 comments on commit df8ca28

Please sign in to comment.