Skip to content
Open
Binary file modified teckers/.DS_Store
Binary file not shown.
147 changes: 87 additions & 60 deletions teckers/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,79 +1,96 @@
PODS:
- Alamofire (4.8.2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this is the latest podfile version in order to merge this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will check it

- Firebase/Auth (6.4.0):
- Alamofire (4.9.1)
- AppAuth (1.3.0):
- AppAuth/Core (= 1.3.0)
- AppAuth/ExternalUserAgent (= 1.3.0)
- AppAuth/Core (1.3.0)
- AppAuth/ExternalUserAgent (1.3.0)
- Firebase/Auth (6.13.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 6.2.0)
- Firebase/Core (6.4.0):
- FirebaseAuth (~> 6.4.0)
- Firebase/Core (6.13.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 6.0.3)
- Firebase/CoreOnly (6.4.0):
- FirebaseCore (= 6.0.4)
- FirebaseAnalytics (6.0.3):
- FirebaseCore (~> 6.0)
- FirebaseAnalytics (= 6.1.6)
- Firebase/CoreOnly (6.13.0):
- FirebaseCore (= 6.4.0)
- FirebaseAnalytics (6.1.6):
- FirebaseCore (~> 6.4)
- FirebaseInstanceID (~> 4.2)
- GoogleAppMeasurement (= 6.0.3)
- GoogleAppMeasurement (= 6.1.6)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 0.3)
- FirebaseAuth (6.2.0):
- nanopb (= 0.3.9011)
- FirebaseAuth (6.4.0):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 6.0)
- FirebaseCore (~> 6.2)
- GoogleUtilities/AppDelegateSwizzler (~> 6.2)
- GoogleUtilities/Environment (~> 6.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (6.0.4):
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/Logger (~> 6.0)
- FirebaseInstanceID (4.2.1):
- FirebaseCore (6.4.0):
- FirebaseCoreDiagnostics (~> 1.0)
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Logger (~> 6.2)
- FirebaseCoreDiagnostics (1.1.2):
- FirebaseCoreDiagnosticsInterop (~> 1.0)
- GoogleDataTransportCCTSupport (~> 1.0)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Logger (~> 6.2)
- nanopb (~> 0.3.901)
- FirebaseCoreDiagnosticsInterop (1.1.0)
- FirebaseInstanceID (4.2.7):
- FirebaseCore (~> 6.0)
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/UserDefaults (~> 6.0)
- GoogleAppMeasurement (6.0.3):
- GoogleAppMeasurement (6.1.6):
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 0.3)
- GoogleSignIn (4.4.0):
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- "GoogleToolboxForMac/NSString+URLArguments (~> 2.1)"
- nanopb (= 0.3.9011)
- GoogleDataTransport (3.2.0)
- GoogleDataTransportCCTSupport (1.2.2):
- GoogleDataTransport (~> 3.2)
- nanopb (~> 0.3.901)
- GoogleSignIn (5.0.2):
- AppAuth (~> 1.2)
- GTMAppAuth (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleToolboxForMac/DebugUtils (2.2.1):
- GoogleToolboxForMac/Defines (= 2.2.1)
- GoogleToolboxForMac/Defines (2.2.1)
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.2.1)":
- GoogleToolboxForMac/DebugUtils (= 2.2.1)
- GoogleToolboxForMac/Defines (= 2.2.1)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.2.1)"
- "GoogleToolboxForMac/NSString+URLArguments (2.2.1)"
- GoogleUtilities/AppDelegateSwizzler (6.2.3):
- GoogleUtilities/AppDelegateSwizzler (6.3.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (6.2.3)
- GoogleUtilities/Logger (6.2.3):
- GoogleUtilities/Environment (6.3.2)
- GoogleUtilities/Logger (6.3.2):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (6.2.3):
- GoogleUtilities/MethodSwizzler (6.3.2):
- GoogleUtilities/Logger
- GoogleUtilities/Network (6.2.3):
- GoogleUtilities/Network (6.3.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (6.2.3)"
- GoogleUtilities/Reachability (6.2.3):
- "GoogleUtilities/NSData+zlib (6.3.2)"
- GoogleUtilities/Reachability (6.3.2):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.2.3):
- GoogleUtilities/UserDefaults (6.3.2):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (1.2.2)
- KeychainAccess (3.2.0)
- nanopb (0.3.901):
- nanopb/decode (= 0.3.901)
- nanopb/encode (= 0.3.901)
- nanopb/decode (0.3.901)
- nanopb/encode (0.3.901)
- GTMAppAuth (1.0.0):
- AppAuth/Core (~> 1.0)
- GTMSessionFetcher (~> 1.1)
- GTMSessionFetcher (1.3.0):
- GTMSessionFetcher/Full (= 1.3.0)
- GTMSessionFetcher/Core (1.3.0)
- GTMSessionFetcher/Full (1.3.0):
- GTMSessionFetcher/Core (= 1.3.0)
- KeychainAccess (4.1.0)
- nanopb (0.3.9011):
- nanopb/decode (= 0.3.9011)
- nanopb/encode (= 0.3.9011)
- nanopb/decode (0.3.9011)
- nanopb/encode (0.3.9011)

DEPENDENCIES:
- Alamofire (~> 4.8)
Expand All @@ -85,36 +102,46 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- Alamofire
- AppAuth
- Firebase
- FirebaseAnalytics
- FirebaseAuth
- FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseCoreDiagnosticsInterop
- FirebaseInstanceID
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleDataTransportCCTSupport
- GoogleSignIn
- GoogleToolboxForMac
- GoogleUtilities
- GTMAppAuth
- GTMSessionFetcher
- KeychainAccess
- nanopb

SPEC CHECKSUMS:
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
Firebase: 9445469655a98e9010737f4bc4720e5bda465873
FirebaseAnalytics: 69fe25866d2ec87c6f02d72c3c9a82bce9c065a0
FirebaseAuth: 68cfa47997f53d29ce978e7a615fb78d7925fcbe
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
AppAuth: 73574f3013a1e65b9601a3ddc8b3158cce68c09d
Firebase: 458d109512200d1aca2e1b9b6cf7d68a869a4a46
FirebaseAnalytics: 45f36d9c429fc91d206283900ab75390cd05ee8a
FirebaseAuth: 7d0f84873926f6648bbd1391a318dfb1a26b5e4f
FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
FirebaseCore: 7ea99e200f0024262650be56623fbe6a7bef1707
FirebaseInstanceID: 9782fcfb89e4d7da76cc28eac4b8543dc7be4a4b
GoogleAppMeasurement: 1e45fa601e6280c180880d57010390f6679cd971
GoogleSignIn: 7ff245e1a7b26d379099d3243a562f5747e23d39
GoogleToolboxForMac: b3553629623a3b1bff17f555e736cd5a6d95ad55
GoogleUtilities: d2b0e277a95962e09bb27f5cd42f5f0b6a506c7d
GTMSessionFetcher: 61bb0f61a4cb560030f1222021178008a5727a23
KeychainAccess: 3b1bf8a77eb4c6ea1ce9404c292e48f948954c6b
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
FirebaseCore: 307ea2508df730c5865334e41965bd9ea344b0e5
FirebaseCoreDiagnostics: 511f4f3ed7d440bb69127e8b97c2bc8befae639e
FirebaseCoreDiagnosticsInterop: e9b1b023157e3a2fc6418b5cb601e79b9af7b3a0
FirebaseInstanceID: ebd2ea79ee38db0cb5f5167b17a0d387e1cc7b6e
GoogleAppMeasurement: dfe55efa543e899d906309eaaac6ca26d249862f
GoogleDataTransport: 8e9b210c97d55fbff306cc5468ff91b9cb32dcf5
GoogleDataTransportCCTSupport: ef79a4728b864946a8aafdbab770d5294faf3b5f
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
GoogleUtilities: 547a86735c6f0ee30ad17e94df4fc21f616b71cb
GTMAppAuth: 4deac854479704f348309e7b66189e604cf5e01e
GTMSessionFetcher: 43b8b64263023d4f32caa0b40f4c8bfa3c5f36d8
KeychainAccess: 445e28864fe6d3458b41fa211bcdc39890e8bd5a
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd

PODFILE CHECKSUM: 07e73414723f08c2598fa21178e90b9c04688321

COCOAPODS: 1.8.4
COCOAPODS: 1.8.3
2 changes: 1 addition & 1 deletion teckers/teckers/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
@available(iOS 9.0, *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are allowing iOS 9.0 we need to implement some test cases, please figuring out an option for this

func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any])
-> Bool {
return GIDSignIn.sharedInstance().handle(url, sourceApplication:options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String, annotation: [:])
return GIDSignIn.sharedInstance().handle(url)
}

func applicationWillResignActive(_ application: UIApplication) {
Expand Down
5 changes: 2 additions & 3 deletions teckers/teckers/Controller/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit
import GoogleSignIn

class LoginViewController: UIViewController, GIDSignInUIDelegate {
class LoginViewController: UIViewController {

@IBOutlet weak var signInButton: GIDSignInButton! //Google Button
@IBOutlet weak var spinner: UIActivityIndicatorView!
Expand All @@ -32,8 +32,7 @@ class LoginViewController: UIViewController, GIDSignInUIDelegate {
}
}
}
GIDSignIn.sharedInstance().uiDelegate = self
// GIDSignIn.sharedInstance().signInSilently()
GIDSignIn.sharedInstance()?.presentingViewController = self
signUI()
}

Expand Down
52 changes: 22 additions & 30 deletions teckers/teckers/Controller/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,30 @@ class MainTabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
let mainStoryboard = UIStoryboard(name: Storyboards.logedStoryboard.rawValue, bundle: Bundle.main)

if !(roles.contains(Roles.Administrador.rawValue)) {
}
else if (roles.contains(Roles.Mentor.rawValue)) {
if let viewMentor = mainStoryboard.instantiateViewController(withIdentifier: Views.DeliverablesParentMentor.rawValue) as? DeliverablesTeckersController {
DeliverableService.getDeliverableMentor(completion: { [weak self] (deliverableArray, error) in
viewMentor.teckers = deliverableArray ?? []
if viewMentor.teckers.count == 1 {
if let viewTecker = mainStoryboard.instantiateViewController(withIdentifier: Views.DeliverablesTecker.rawValue) as? DeliverablesController {
self?.viewControllers?[1] = viewTecker
let roles = UserDefaults.standard.array(forKey: TokenKeys.Roles.rawValue) ?? []
for r in roles {
let storyboard: UIStoryboard = UIStoryboard(name: Storyboards.logedStoryboard.rawValue, bundle: Bundle.main)
// let navigation = UINavigationController()
if let role = r as? String{
switch(Roles(rawValue: role)){
case .Administrador:
// if let programs = storyboard.instantiateViewController(withIdentifier: Views.ProgramBatchControllerID.rawValue) as? ProgramBatchController {
// self.viewControllers?[1] = programs
return
// }
case .Mentor:
if let chooseTecker = storyboard.instantiateViewController(withIdentifier: Views.DeliverablesParentMentor.rawValue) as? DeliverablesTeckersController {
// chooseTecker.getTeckers()
self.viewControllers?[1] = chooseTecker
return
}
}
self?.viewControllers?[1] = viewMentor
})
}
}
else if (roles.contains(Roles.Parent.rawValue)) {
if let viewParent = mainStoryboard.instantiateViewController(withIdentifier: Views.DeliverablesParentMentor.rawValue) as? DeliverablesTeckersController {
DeliverableService.getDeliverableParent(completion: { [weak self] (deliverableArray, error) in
viewParent.teckers = deliverableArray ?? []
if viewParent.teckers.count == 1 {
if let viewTecker = mainStoryboard.instantiateViewController(withIdentifier: Views.DeliverablesTecker.rawValue) as? DeliverablesController {
self?.viewControllers?[1] = viewTecker
case .Tecker:
if let deliverable = storyboard.instantiateViewController(withIdentifier: Views.DeliverablesID.rawValue) as? DeliverablesController {
self.viewControllers?[1] = deliverable
}
}
self?.viewControllers?[1] = viewParent
})
}
}
else if roles.contains(Roles.Tecker.rawValue) {
if let viewTecker = mainStoryboard.instantiateViewController(withIdentifier: Views.DeliverablesTecker.rawValue) as? DeliverablesController {
self.viewControllers?[1] = viewTecker
default:
break
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion teckers/teckers/Controller/SignedInViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit
import Firebase
import GoogleSignIn

class SignedInViewController: UIViewController, GIDSignInUIDelegate {
class SignedInViewController: UIViewController {
@IBOutlet weak var signOutButton: UIButton!
@IBOutlet weak var emailLabel: UILabel!

Expand Down
Loading