mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 03:37:39 +00:00
Merged branch BUG-Integration-Bug-due-to-notifications-if-user-does-not-have-any-listings-when-a-new-user-is-created into master
This commit is contained in:
commit
b74bab3241
Binary file not shown.
@ -186,7 +186,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/CategoriesTableViewController.swift"
|
||||
timestampString = "501863904.741449"
|
||||
timestampString = "501868546.548886"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "570"
|
||||
@ -201,7 +201,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/CategoriesTableViewController.swift"
|
||||
timestampString = "501863904.74155"
|
||||
timestampString = "501868546.549061"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "572"
|
||||
@ -744,7 +744,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/SettingsViewController.swift"
|
||||
timestampString = "501863904.765008"
|
||||
timestampString = "501868546.567523"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "194"
|
||||
@ -759,7 +759,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/SettingsViewController.swift"
|
||||
timestampString = "501863904.765171"
|
||||
timestampString = "501868546.567615"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "197"
|
||||
@ -881,5 +881,132 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/HomeViewController.swift"
|
||||
timestampString = "501867900.667754"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "16"
|
||||
endingLineNumber = "16"
|
||||
landmarkName = "HomeViewController"
|
||||
landmarkType = "3">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.HomeViewController.firebaseManager.getter : Vendoo.FirebaseManager"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/HomeViewController.swift"
|
||||
timestampString = "501868546.571367"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "16"
|
||||
endingLineNumber = "16"
|
||||
offsetFromSymbolStart = "35">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.HomeViewController.init (nibName : Swift.Optional<Swift.String>, bundle : Swift.Optional<__ObjC.NSBundle>) -> Vendoo.HomeViewController"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/HomeViewController.swift"
|
||||
timestampString = "501868546.571482"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "16"
|
||||
endingLineNumber = "16"
|
||||
offsetFromSymbolStart = "143">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.HomeViewController.init (coder : __ObjC.NSCoder) -> Swift.Optional<Vendoo.HomeViewController>"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/HomeViewController.swift"
|
||||
timestampString = "501868546.571568"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "16"
|
||||
endingLineNumber = "16"
|
||||
offsetFromSymbolStart = "83">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/FirebaseManager.swift"
|
||||
timestampString = "501868545.010904"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "31"
|
||||
endingLineNumber = "31"
|
||||
landmarkName = "init()"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.FirebaseManager.init () -> Vendoo.FirebaseManager"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/FirebaseManager.swift"
|
||||
timestampString = "501868546.572473"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "31"
|
||||
endingLineNumber = "31"
|
||||
offsetFromSymbolStart = "1491">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.FirebaseManager.(init () -> Vendoo.FirebaseManager).(closure #1)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/FirebaseManager.swift"
|
||||
timestampString = "501868546.572569"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "34"
|
||||
endingLineNumber = "34"
|
||||
offsetFromSymbolStart = "19">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/FirebaseManager.swift"
|
||||
timestampString = "501868545.010904"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "34"
|
||||
endingLineNumber = "34"
|
||||
landmarkName = "init()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// FirebaseService.swift
|
||||
// Vendoo
|
||||
//
|
||||
// This class is responsible for initializing a new user, as well as managing web request to both firebase database and data storage
|
||||
// Created by Okechi Onyeje on 6/2/16.
|
||||
// Copyright © 2016 Okechi Onyeje. All rights reserved.
|
||||
//
|
||||
@ -19,6 +20,7 @@ class FirebaseManager: NSObject {
|
||||
let user_email = ((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!).stringByReplacingOccurrencesOfString(".", withString: "_")
|
||||
let storage = FIRStorage.storage()
|
||||
var indicator = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.WhiteLarge)
|
||||
var firGroup = dispatch_group_create()
|
||||
|
||||
//let key: String!
|
||||
|
||||
@ -26,18 +28,20 @@ class FirebaseManager: NSObject {
|
||||
super.init()
|
||||
indicator.color = UIColor.blueColor()
|
||||
//check if user has been created
|
||||
dispatch_group_enter(self.firGroup)
|
||||
self.ref.child("Users").observeSingleEventOfType(.Value, withBlock: { snapshot in
|
||||
// do some stuff once
|
||||
|
||||
if(!snapshot.hasChild(self.user_email)){
|
||||
let user = ["name": (NSUserDefaults.standardUserDefaults().objectForKey("name") as? String)!, "user_Listings": "", "listing_Keys": "", "favorite_listings_keys": ""]
|
||||
self.ref.child("Users").child(self.user_email).setValue(user)
|
||||
self.ref.child("Users").child(self.user_email).setValue(user, withCompletionBlock: {
|
||||
(error, reference) -> Void in
|
||||
|
||||
dispatch_group_leave(self.firGroup)
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ class HomeViewController: UITabBarController {
|
||||
ServiceNotificationManager.delegate = self
|
||||
self.notificationsManager.setManagers(fbGraphManager, fireManager: firebaseManager, ebayManager: ebayGraphManager, etsyManager: etsyManager)
|
||||
// Do any additional setup after loading the view.
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
dispatch_group_notify(self.firebaseManager.firGroup, dispatch_get_main_queue(), {
|
||||
|
||||
//get all listing information for current user
|
||||
self.firebaseManager.ref.child("Users/\(self.firebaseManager.user_email)").observeSingleEventOfType( .Value, withBlock: {
|
||||
|
||||
@ -61,13 +61,11 @@ extension SignUpViewController {
|
||||
return
|
||||
}
|
||||
else{
|
||||
|
||||
//save user account
|
||||
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "signedIn")
|
||||
NSUserDefaults.standardUserDefaults().setObject(self.email.text, forKey: "email")
|
||||
NSUserDefaults.standardUserDefaults().setObject(self.name.text, forKey: "name")
|
||||
|
||||
|
||||
//save user credentials in Keychain
|
||||
do{
|
||||
try Locksmith.saveData(["pass": self.password.text!], forUserAccount: self.email.text!, inService: "vendoo")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user