Logout functionality now implemented correctly

This commit is contained in:
Okechi Onyeje 2016-08-29 20:59:28 -04:00
parent 8b17acc3d3
commit aabe1cccf9
3 changed files with 99 additions and 9 deletions

View File

@ -230,7 +230,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.241024" timestampString = "494211344.051886"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "460" startingLineNumber = "460"
@ -245,7 +245,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.241192" timestampString = "494211344.052162"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "460" startingLineNumber = "460"
@ -278,7 +278,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.241994" timestampString = "494211344.059888"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "479" startingLineNumber = "479"
@ -293,7 +293,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.242121" timestampString = "494211344.062411"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "481" startingLineNumber = "481"
@ -342,7 +342,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.243433" timestampString = "494211344.069134"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "498" startingLineNumber = "498"
@ -357,7 +357,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.243578" timestampString = "494211344.069421"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "498" startingLineNumber = "498"
@ -372,7 +372,7 @@
moduleName = "Vendoo" moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes" usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift" urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
timestampString = "494209191.24367" timestampString = "494211344.06972"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "500" startingLineNumber = "500"
@ -681,7 +681,7 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
shouldBeEnabled = "Yes" shouldBeEnabled = "No"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Vendoo/SignInViewController.swift" filePath = "Vendoo/SignInViewController.swift"
@ -694,5 +694,69 @@
landmarkType = "5"> landmarkType = "5">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/MenuPanelViewController.swift"
timestampString = "494210317.414309"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "137"
endingLineNumber = "137"
landmarkName = "logoutUser(_:)"
landmarkType = "5">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Vendoo.MenuPanelViewController.logoutUser (Swift.AnyObject) -&gt; ()"
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/MenuPanelViewController.swift"
timestampString = "494211344.086761"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "137"
endingLineNumber = "137"
offsetFromSymbolStart = "312">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Vendoo.MenuPanelViewController.logoutUser (Swift.AnyObject) -&gt; ()"
moduleName = "Vendoo"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/MenuPanelViewController.swift"
timestampString = "494211344.086887"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "137"
endingLineNumber = "137"
offsetFromSymbolStart = "4725">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/MenuPanelViewController.swift"
timestampString = "494210917.083247"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "161"
endingLineNumber = "161"
landmarkName = "logoutUser(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints> </Breakpoints>
</Bucket> </Bucket>

View File

@ -8,6 +8,7 @@
import UIKit import UIKit
import FirebaseAuth import FirebaseAuth
import Locksmith
class MenuPanelViewController: UIViewController{ class MenuPanelViewController: UIViewController{
@ -133,7 +134,32 @@ extension MenuPanelViewController{
do{ do{
try FIRAuth.auth()?.signOut() try FIRAuth.auth()?.signOut()
NSUserDefaults.standardUserDefaults().setBool(false, forKey: "signedIn") try Locksmith.deleteDataForUserAccount((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!, inService: "vendoo")
do {
try Locksmith.deleteDataForUserAccount((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!, inService: "vendoo_oauth_ebay")
}catch {
(error)
print(error)
}
do {
try Locksmith.deleteDataForUserAccount((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!, inService: "vendoo_oauth_etsy")
}catch {
(error)
print(error)
}
do {
try Locksmith.deleteDataForUserAccount((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!, inService: "vendoo_oauth_amazon")
}catch {
(error)
print(error)
}
for key in Array(NSUserDefaults.standardUserDefaults().dictionaryRepresentation().keys) {
NSUserDefaults.standardUserDefaults().removeObjectForKey(key)
}
let vc = self.storyboard?.instantiateViewControllerWithIdentifier("SignInViewController") let vc = self.storyboard?.instantiateViewControllerWithIdentifier("SignInViewController")
self.presentViewController(vc!, animated: true, completion: nil) self.presentViewController(vc!, animated: true, completion: nil)