mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
Merge branch 'Rapid-Dev-Branch'
Conflicts: Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Vendoo/ListingPreviewViewController.swift
This commit is contained in:
commit
ecc8d90d3c
@ -40,6 +40,7 @@
|
||||
3EC3252F1CF894E500626C48 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EC3252E1CF894E500626C48 /* AVFoundation.framework */; };
|
||||
3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */; };
|
||||
3EDE75AE1D67B92F00BC3472 /* CategoryPopUpController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EDE75AD1D67B92F00BC3472 /* CategoryPopUpController.swift */; };
|
||||
3EF422B21D73262000B9A3EB /* UserCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EF422B11D73262000B9A3EB /* UserCell.swift */; };
|
||||
3EFB0E331D0B968300A05D7A /* SideMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EFB0E321D0B968300A05D7A /* SideMenuView.swift */; };
|
||||
3F8E0464700649BDD8B552B1 /* Pods_Vendoo_VendooTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B876489113F498AF1D2FD7E9 /* Pods_Vendoo_VendooTests.framework */; };
|
||||
A87525ED0EE7D42D9A7708D8 /* Pods_Vendoo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23ECC3C8465826BD6AC74A02 /* Pods_Vendoo.framework */; };
|
||||
@ -105,6 +106,7 @@
|
||||
3EC3252E1CF894E500626C48 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
3ECEDB861CF9C722003566B3 /* ListingPreviewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListingPreviewViewController.swift; sourceTree = "<group>"; };
|
||||
3EDE75AD1D67B92F00BC3472 /* CategoryPopUpController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CategoryPopUpController.swift; sourceTree = "<group>"; };
|
||||
3EF422B11D73262000B9A3EB /* UserCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserCell.swift; sourceTree = "<group>"; };
|
||||
3EFB0E321D0B968300A05D7A /* SideMenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideMenuView.swift; sourceTree = "<group>"; };
|
||||
7D1FC6F6278B48A7BA9A9E03 /* Pods_Vendoo_VendooUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Vendoo_VendooUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A44ED233D6B5454EF92FEB08 /* Pods-Vendoo-VendooUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Vendoo-VendooUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Vendoo-VendooUITests/Pods-Vendoo-VendooUITests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
@ -328,6 +330,7 @@
|
||||
3E1AA4331D0DD0B2005FCCBB /* Settings */,
|
||||
3EFB0E321D0B968300A05D7A /* SideMenuView.swift */,
|
||||
3E1AA4311D0DA071005FCCBB /* MenuPanelViewController.swift */,
|
||||
3EF422B11D73262000B9A3EB /* UserCell.swift */,
|
||||
);
|
||||
name = Menu;
|
||||
sourceTree = "<group>";
|
||||
@ -751,6 +754,7 @@
|
||||
3E1DC3CF1D42328C0091BC60 /* CategoryCell.swift in Sources */,
|
||||
3EC325111CF703A600626C48 /* ItemCell.swift in Sources */,
|
||||
3EA668A11D02836C00EE57A8 /* EbayWebServiceManager.swift in Sources */,
|
||||
3EF422B21D73262000B9A3EB /* UserCell.swift in Sources */,
|
||||
3ECEDB871CF9C722003566B3 /* ListingPreviewViewController.swift in Sources */,
|
||||
3E1B1F0B1D2493EE00DBCF08 /* EtsySettingsViewController.swift in Sources */,
|
||||
3EC325231CF7DA5500626C48 /* HomeViewController.swift in Sources */,
|
||||
|
||||
Binary file not shown.
@ -3,19 +3,67 @@
|
||||
type = "0"
|
||||
version = "2.0">
|
||||
<Breakpoints>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ServiceNotificationManager.swift"
|
||||
timestampString = "494778762.798972"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "79"
|
||||
endingLineNumber = "79"
|
||||
landmarkName = "pollServices()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ServiceNotificationManager.swift"
|
||||
timestampString = "494778870.382513"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "75"
|
||||
endingLineNumber = "75"
|
||||
landmarkName = "pollServices()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ServiceNotificationManager.swift"
|
||||
timestampString = "494780884.179336"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "80"
|
||||
endingLineNumber = "80"
|
||||
landmarkName = "pollServices()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||
timestampString = "493861477.436016"
|
||||
filePath = "Vendoo/HomeViewController.swift"
|
||||
timestampString = "494847768.56364"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "111"
|
||||
endingLineNumber = "111"
|
||||
landmarkName = "prepareForSegue(_:sender:)"
|
||||
startingLineNumber = "182"
|
||||
endingLineNumber = "182"
|
||||
landmarkName = "listingHasEnded(_:ebayInfo:amazonInfo:etsyInfo:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
@ -26,540 +74,12 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493861794.122107"
|
||||
timestampString = "494852405.460243"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "98"
|
||||
endingLineNumber = "98"
|
||||
landmarkName = "setDictionary(_:itemdictionary:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493861800.925503"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "99"
|
||||
endingLineNumber = "99"
|
||||
landmarkName = "setDictionary(_:itemdictionary:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493861890.626697"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "70"
|
||||
endingLineNumber = "70"
|
||||
landmarkName = "setListing()"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "567"
|
||||
endingLineNumber = "567"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.publishItem (Swift.AnyObject) -> ()"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.179942"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "567"
|
||||
endingLineNumber = "567"
|
||||
offsetFromSymbolStart = "72796">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #9)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.180071"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "568"
|
||||
endingLineNumber = "568"
|
||||
offsetFromSymbolStart = "23">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "602"
|
||||
endingLineNumber = "602"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "579"
|
||||
endingLineNumber = "579"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #9)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.181266"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "579"
|
||||
endingLineNumber = "579"
|
||||
offsetFromSymbolStart = "4771">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #9).(closure #1)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.181399"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "581"
|
||||
endingLineNumber = "581"
|
||||
offsetFromSymbolStart = "54">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493954146.177165"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "693"
|
||||
endingLineNumber = "693"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #9).(closure #1)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.182059"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "694"
|
||||
endingLineNumber = "694"
|
||||
offsetFromSymbolStart = "5682">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #9).(closure #1).(closure #2)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.182162"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "694"
|
||||
endingLineNumber = "694"
|
||||
offsetFromSymbolStart = "5269">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "589"
|
||||
endingLineNumber = "589"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493954146.177165"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "668"
|
||||
endingLineNumber = "668"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "493953484.620568"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "225"
|
||||
endingLineNumber = "225"
|
||||
landmarkName = "addImagesToListing(_:imageURLs:listingOnCompletion:body:onCompletion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "637"
|
||||
endingLineNumber = "637"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "493953484.620568"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "231"
|
||||
endingLineNumber = "231"
|
||||
landmarkName = "addImagesToListing(_:imageURLs:listingOnCompletion:body:onCompletion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493923752.375488"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "459"
|
||||
endingLineNumber = "459"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493924171.32457"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "477"
|
||||
endingLineNumber = "477"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493924171.32457"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "487"
|
||||
endingLineNumber = "487"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "497"
|
||||
endingLineNumber = "497"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "507"
|
||||
endingLineNumber = "507"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493930954.132313"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "568"
|
||||
endingLineNumber = "568"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493953484.620568"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "561"
|
||||
endingLineNumber = "561"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.publishItem (Swift.AnyObject) -> ()"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.188907"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "561"
|
||||
endingLineNumber = "561"
|
||||
offsetFromSymbolStart = "72666">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ListingPreviewViewController.(publishItem (Swift.AnyObject) -> ()).(closure #8)"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "494026381.189021"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "561"
|
||||
endingLineNumber = "561"
|
||||
offsetFromSymbolStart = "4654">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "493953484.620568"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "230"
|
||||
endingLineNumber = "230"
|
||||
landmarkName = "addImagesToListing(_:imageURLs:listingOnCompletion:body:onCompletion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "494026379.170694"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "545"
|
||||
endingLineNumber = "545"
|
||||
landmarkName = "parser(_:foundCharacters:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "493953475.061056"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "242"
|
||||
endingLineNumber = "242"
|
||||
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "494026379.170694"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "303"
|
||||
endingLineNumber = "303"
|
||||
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493954225.777242"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "648"
|
||||
endingLineNumber = "648"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ListingPreviewViewController.swift"
|
||||
timestampString = "493954402.377854"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "680"
|
||||
endingLineNumber = "680"
|
||||
landmarkName = "publishItem(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "493956592.846533"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "281"
|
||||
endingLineNumber = "281"
|
||||
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||
startingLineNumber = "146"
|
||||
endingLineNumber = "146"
|
||||
landmarkName = "prepareForSegue(_:sender:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
|
||||
BIN
Vendoo/.DS_Store
vendored
BIN
Vendoo/.DS_Store
vendored
Binary file not shown.
@ -17,6 +17,9 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
|
||||
private var ebayManager: EbayWebServiceManager! = EbayWebServiceManager()
|
||||
private var selectedCategory: String!
|
||||
private var selectedSub: String!
|
||||
private var potentialEbay = false
|
||||
private var potentialEtsy = false
|
||||
private var potentialAmazon = false
|
||||
|
||||
private var categories = ["Accessories",
|
||||
"Antiques",
|
||||
@ -124,9 +127,16 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
|
||||
|
||||
// Configure the cell...
|
||||
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
cell.categoryName.text = self.categories[indexPath.row]
|
||||
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true //facebook
|
||||
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true //etsy
|
||||
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 1, inSection: 0))?.hidden = true //amazon
|
||||
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 0, inSection: 0))?.hidden = true //ebay
|
||||
|
||||
//leaving this in for category debugging purposes
|
||||
/*
|
||||
switch (cell.categoryName.text!) {
|
||||
case ("Accessories") :
|
||||
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = false //facebook
|
||||
@ -514,7 +524,7 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}*/
|
||||
|
||||
/*//ebay
|
||||
if(true){
|
||||
@ -569,22 +579,123 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
|
||||
}
|
||||
|
||||
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
|
||||
self.selectedCategory = self.categories[indexPath.row]
|
||||
|
||||
switch self.categories[indexPath.row] {
|
||||
case "Antiques":
|
||||
self.selectedCategory = "Antiques"
|
||||
break
|
||||
case "Art":
|
||||
self.selectedCategory = "Art"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Baby":
|
||||
self.selectedCategory = "Baby"
|
||||
break
|
||||
case "Bath, Beauty & Health":
|
||||
self.selectedCategory = "Health and Beauty"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Books":
|
||||
self.selectedCategory = "Books"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Business & Industrial":
|
||||
self.selectedCategory = "Business and Industrial"
|
||||
break
|
||||
case "Cameras & Photo":
|
||||
self.selectedCategory = "Cameras and Photo"
|
||||
break
|
||||
case "Cell Phones & Accessories":
|
||||
self.selectedCategory = "Cell Phones and Accessories"
|
||||
break
|
||||
case "Clothing & Shoes":
|
||||
self.selectedCategory = "Clothing, Shoes and Accessories"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Coins & Paper Money":
|
||||
self.selectedCategory = "Coins and Paper Money"
|
||||
break
|
||||
case "Collectibles":
|
||||
self.selectedCategory = "Collectibles"
|
||||
break
|
||||
case "Computers/Tablets and Networking":
|
||||
self.selectedCategory = "Computers/Tablets and Networking"
|
||||
break
|
||||
case "Consumer Electronics":
|
||||
self.selectedCategory = "Consumer Electronics"
|
||||
break
|
||||
case "Crafts":
|
||||
self.selectedCategory = "Crafts"
|
||||
break
|
||||
case "Dolls & Miniatures":
|
||||
self.selectedCategory = "Dolls and Bears"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "DVDs & Movies":
|
||||
self.selectedCategory = "DVDs & Movies"
|
||||
break
|
||||
case "Entertainment Memorabilia":
|
||||
self.selectedCategory = "Entertainment Memorabilia"
|
||||
break
|
||||
case "Everything Else":
|
||||
self.selectedCategory = "Everything Else"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Gift Cards & Coupons":
|
||||
self.selectedCategory = "Gift Cards and Coupons"
|
||||
break
|
||||
case "Home/Houseware & Garden":
|
||||
self.selectedCategory = "Home and Garden"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Jewelry & Watches":
|
||||
self.selectedCategory = "Jewelry and Watches"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Musical Instruments & Gear":
|
||||
self.selectedCategory = "Musical Instruments and Gear"
|
||||
break
|
||||
case "Pet Supplies":
|
||||
self.selectedCategory = "Pet Supplies"
|
||||
break
|
||||
case "Pottery & Glass":
|
||||
self.selectedCategory = "Pottery and Glass"
|
||||
break
|
||||
case "Real Estate":
|
||||
self.selectedCategory = "Real Estate"
|
||||
break
|
||||
case "Specialty Services":
|
||||
self.selectedCategory = "Specialty Services"
|
||||
break
|
||||
case "Sporting Goods":
|
||||
self.selectedCategory = "Sporting Goods"
|
||||
break
|
||||
case "Sports Memorabilia & Fan Shop":
|
||||
self.selectedCategory = "Sports Mem, Cards and Fan Shop"
|
||||
break
|
||||
case "Tickets & Experiences":
|
||||
self.selectedCategory = "Tickets and Experiences"
|
||||
break
|
||||
case "Toys & Hobbies":
|
||||
self.selectedCategory = "Toys and Hobbies"
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
case "Travel":
|
||||
self.selectedCategory = "Travel"
|
||||
break
|
||||
case "Video Games & Consoles":
|
||||
self.selectedCategory = "Video Games and Consoles"
|
||||
break
|
||||
default:
|
||||
self.selectedCategory = self.categories[indexPath.row]
|
||||
self.potentialEtsy = true
|
||||
break
|
||||
}
|
||||
|
||||
let cell: CategoryCell! = tableView.cellForRowAtIndexPath(indexPath) as! CategoryCell//tableView.dequeueReusableCellWithIdentifier("CategoryCell", forIndexPath: indexPath) as? CategoryCell
|
||||
if(cell.shouldAskAboutLeafCategories){
|
||||
var alert = UIAlertController(title: "Explore Subcategories", message: "Would you like to see the subcategories for \(self.selectedCategory). NOTE: Only Required If Posting to Ebay", preferredStyle: .Alert)
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Yes", style: .Default, handler: {(action: UIAlertAction!) in
|
||||
self.navigateCategories()
|
||||
}))
|
||||
|
||||
alert.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: {(action: UIAlertAction!) in
|
||||
}))
|
||||
alert.addAction(UIAlertAction(title: "No", style: .Default, handler: {(action: UIAlertAction!) in
|
||||
self.performSegueWithIdentifier("NetworkSelectionSegue", sender: self)
|
||||
}))
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
|
||||
if(self.ebayManager.isAuthorized && cell.shouldAskAboutLeafCategories){
|
||||
self.potentialEbay = true
|
||||
self.navigateCategories()
|
||||
}
|
||||
else {
|
||||
self.performSegueWithIdentifier("NetworkSelectionSegue", sender: self)
|
||||
@ -642,6 +753,20 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
|
||||
fireManager: self.firManager, ebayManager: self.ebayManager, etsyManager: self.etsyManager )
|
||||
|
||||
(segue.destinationViewController as! NetworksTableViewController).setNetworkSelectFunctionality(true)
|
||||
|
||||
//check what networks to load in network selection view
|
||||
if self.graphManager.isAuthorized {
|
||||
(segue.destinationViewController as! NetworksTableViewController).toggleMarketPlaceVisibitlity("facebook")
|
||||
}
|
||||
if self.potentialEbay && self.ebayManager.isAuthorized {
|
||||
(segue.destinationViewController as! NetworksTableViewController).toggleMarketPlaceVisibitlity("ebay")
|
||||
}
|
||||
if self.potentialEtsy && self.etsyManager.isAuthorized {
|
||||
(segue.destinationViewController as! NetworksTableViewController).toggleMarketPlaceVisibitlity("etsy")
|
||||
}
|
||||
if self.potentialAmazon {
|
||||
(segue.destinationViewController as! NetworksTableViewController).toggleMarketPlaceVisibitlity("amazon")
|
||||
}
|
||||
//print(self.categoryPicker.selectedRowInComponent(0))
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ class CategoryPopUpController: UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
self.categoryList = Dictionary<Int, AnyObject>()
|
||||
self.ebayManager.getSubCategories(selectedCategory, detailLevel: self.parentCategory.count + 1, catCode: catCode, onCompletion: {
|
||||
(dict, error) -> Void in
|
||||
var index = 0
|
||||
|
||||
@ -40,6 +40,7 @@ class EbayWebServiceManager: NSObject {
|
||||
private var completion: ServiceResponse!
|
||||
private var isGettingSubCategories: Bool = false
|
||||
private var isRevisingListing: Bool = false
|
||||
private var requestGroup: dispatch_group_t = dispatch_group_create()
|
||||
//---------------------------------------------//
|
||||
|
||||
|
||||
@ -123,7 +124,7 @@ extension EbayWebServiceManager {
|
||||
}
|
||||
}
|
||||
|
||||
func authorizeApp(){
|
||||
func authorizeApp(onComplete: ServiceResponse){
|
||||
|
||||
let soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||
"<GetSessionIDRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">" +
|
||||
@ -133,18 +134,21 @@ extension EbayWebServiceManager {
|
||||
let url = NSURL(string: self.baseURL)
|
||||
let theRequest = NSMutableURLRequest(URL: url!)
|
||||
theRequest.addValue("GetSessionID", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||
|
||||
self.completion = onComplete
|
||||
self.requestMaker(soapMessage, theRequest: theRequest)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func deauthorizeApp(){
|
||||
let soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||
//@TODO: Add an alert to let user know if their account has not been deauthorized and keep them logged in.
|
||||
var soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||
"<RevokeTokenRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">" +
|
||||
"<RequesterCredentials>" +
|
||||
"<eBayAuthToken>\(self.xmlResponseDictionary["eBayAuthToken"])</eBayAuthToken>" +
|
||||
"</RequesterCredentials></RevokeTokenRequest>"
|
||||
"<eBayAuthToken>\(self.xmlResponseDictionary["eBayAuthToken"]!)</eBayAuthToken>" +
|
||||
"</RequesterCredentials>"
|
||||
soapMessage = soapMessage + "<ErrorLanguage>en_US</ErrorLanguage>" +
|
||||
"<WarningLevel>High</WarningLevel></RevokeTokenRequest>"
|
||||
|
||||
let url = NSURL(string: self.baseURL)
|
||||
let theRequest = NSMutableURLRequest(URL: url!)
|
||||
@ -317,7 +321,7 @@ extension EbayWebServiceManager {
|
||||
let url = NSURL(string: self.baseURL)
|
||||
let theRequest = NSMutableURLRequest(URL: url!)
|
||||
theRequest.addValue("FetchToken", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||
|
||||
//dispatch_group_enter(self.requestGroup)
|
||||
self.requestMaker(soapMessage, theRequest: theRequest)
|
||||
}
|
||||
|
||||
@ -418,6 +422,7 @@ extension EbayWebServiceManager: NSXMLParserDelegate {
|
||||
print("account credentials saved")
|
||||
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "ebayAuthorized")
|
||||
self.isAuthorized = true
|
||||
//self.completion(nil, nil)
|
||||
|
||||
//Test authentication
|
||||
let soapmessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||
@ -479,7 +484,7 @@ extension EbayWebServiceManager: NSXMLParserDelegate {
|
||||
let url = NSURL(string: self.baseURL)
|
||||
let theRequest = NSMutableURLRequest(URL: url!)
|
||||
theRequest.addValue("GetCategories", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||
|
||||
self.completion(nil, nil)
|
||||
self.requestMaker(soapmessage, theRequest: theRequest)
|
||||
break
|
||||
/*
|
||||
|
||||
@ -52,8 +52,6 @@ class EtsyRESTAPIManager: NSObject {
|
||||
"accessTokenUrl": "https://openapi.etsy.com/v2/oauth/access_token?",
|
||||
"responseType": "token"])
|
||||
|
||||
|
||||
//FIXME: something is wrong when here when logging back in with a diff user
|
||||
if(self.isAuthorized){
|
||||
let dictionary = Locksmith.loadDataForUserAccount(self.userEmail, inService: "vendoo_oauth_etsy")
|
||||
let oauthDictionary = dictionary?["etsy_oauth"] as? Dictionary<String, AnyObject!>
|
||||
|
||||
@ -18,24 +18,21 @@ class FirebaseManager: NSObject {
|
||||
let ref = FIRDatabase.database().reference()
|
||||
let user_email = ((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!).stringByReplacingOccurrencesOfString(".", withString: "_")
|
||||
let storage = FIRStorage.storage()
|
||||
let indicator = TYMActivityIndicatorView.init(activityIndicatorStyle: (TYMActivityIndicatorViewStyle.Normal))
|
||||
var indicator = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.WhiteLarge)
|
||||
|
||||
//let key: String!
|
||||
|
||||
override init(){
|
||||
super.init()
|
||||
|
||||
|
||||
|
||||
indicator.color = UIColor.blueColor()
|
||||
//check if user has been created
|
||||
self.ref.child("Users").observeSingleEventOfType(.Value, withBlock: { snapshot in
|
||||
// do some stuff once
|
||||
|
||||
if(!snapshot.hasChild(self.user_email)){
|
||||
let user = ["user_Listings": "","listing_Keys": "","favorite_listings_keys": ""]
|
||||
// let userUpdates = ["/Users/\((NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!)" : user]
|
||||
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").setValue(["email": (NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!])
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -23,15 +23,21 @@ class HomeViewController: UITabBarController {
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
self.firebaseManager.ref.child("Users/\(self.firebaseManager.user_email)/user_Listings").observeSingleEventOfType( .Value, withBlock: {
|
||||
|
||||
//get all listing information for current user
|
||||
self.firebaseManager.ref.child("Users/\(self.firebaseManager.user_email)").observeSingleEventOfType( .Value, withBlock: {
|
||||
(snapshot) -> Void in
|
||||
|
||||
let listingDict = snapshot.value as? [String : AnyObject]
|
||||
let userDict = snapshot.value as? [String : AnyObject]
|
||||
|
||||
let listingDict = userDict!["user_Listings"] as? [String : AnyObject]
|
||||
|
||||
NSUserDefaults.standardUserDefaults().setObject(userDict!["name"] as? String, forKey: "name")
|
||||
|
||||
if listingDict != nil {
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
|
||||
|
||||
|
||||
for (key, values) in listingDict! {
|
||||
let serviceGroup: dispatch_group_t = dispatch_group_create()
|
||||
self.firebaseManager.ref.observeSingleEventOfType(.Value, withBlock: { snapshot in
|
||||
@ -105,6 +111,8 @@ class HomeViewController: UITabBarController {
|
||||
|
||||
|
||||
})
|
||||
}else {
|
||||
NSNotificationCenter.defaultCenter().postNotificationName("finished_fetching_listings", object: nil)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,8 @@ class ItemImagePickerViewController: UIViewController {
|
||||
private var currImageSelected: UIImageView!
|
||||
private var currUILabel: UILabel!
|
||||
private var imageIndex: Int!
|
||||
private var isEditing: Bool = false
|
||||
private var currentInformation: Dictionary<String, AnyObject>!
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@ -52,19 +54,49 @@ class ItemImagePickerViewController: UIViewController {
|
||||
self.itemPrice.delegate = self
|
||||
self.picker.delegate = self
|
||||
|
||||
// Input data into the Array:
|
||||
pickerData = ["Category 1", "Category 2", "Category 3", "Category 4", "Category 5", "Category 6"]
|
||||
|
||||
let tapGestureMain = UITapGestureRecognizer(target: self, action: #selector(ItemImagePickerViewController.takePicture))
|
||||
let tapGesture2 = UITapGestureRecognizer(target: self, action: #selector(ItemImagePickerViewController.takePicture))
|
||||
//tapGesture.cancelsTouchesInView = true
|
||||
self.view.addGestureRecognizer(tapGestureMain)
|
||||
//self.possibleItemImageMain.addGestureRecognizer(tapGestureMain)
|
||||
//self.possibleItemImage2.addGestureRecognizer(tapGesture2)
|
||||
//self.possibleItemImage3.addGestureRecognizer(tapGesture)
|
||||
//self.possibleItemImage4.addGestureRecognizer(tapGesture)
|
||||
//self.possibleItemImage5.addGestureRecognizer(tapGesture)
|
||||
|
||||
if(self.isEditing) {
|
||||
self.itemName.text = self.currentInformation["title"] as? String
|
||||
self.itemDescription.text = self.currentInformation["description"] as? String
|
||||
self.itemQuantity.text = self.currentInformation["quantity"] as? String
|
||||
self.itemPrice.text = self.currentInformation["price"] as? String
|
||||
|
||||
//@FIXME: Cancel button not changing to Back button label
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
self.cancelButton.titleLabel?.text = "Back"
|
||||
})
|
||||
|
||||
var images = (self.currentInformation["images"] as? [UIImage])!
|
||||
for i in 0...(images.count - 1) {
|
||||
switch i {
|
||||
case 0:
|
||||
self.possibleItemImageMain.image = images[i]
|
||||
self.itemImagesSelections[i] = true
|
||||
break
|
||||
case 1:
|
||||
self.possibleItemImage2.image = images[i]
|
||||
self.itemImagesSelections[i] = true
|
||||
break
|
||||
case 2:
|
||||
self.possibleItemImage3.image = images[i]
|
||||
self.itemImagesSelections[i] = true
|
||||
break
|
||||
case 3:
|
||||
self.possibleItemImage4.image = images[i]
|
||||
self.itemImagesSelections[i] = true
|
||||
break
|
||||
case 4:
|
||||
self.possibleItemImage5.image = images[i]
|
||||
self.itemImagesSelections[i] = true
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -79,7 +111,12 @@ class ItemImagePickerViewController: UIViewController {
|
||||
self.tabBarController?.tabBar.hidden = true
|
||||
}
|
||||
|
||||
|
||||
func toggleEditingMode(dictionary: Dictionary<String, AnyObject>?){
|
||||
if(!self.isEditing) {
|
||||
self.currentInformation = dictionary!
|
||||
}
|
||||
self.isEditing = !self.isEditing
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -126,12 +163,15 @@ extension ItemImagePickerViewController {
|
||||
|
||||
dict["pictures"] = images
|
||||
(segue.destinationViewController as! CategoriesTableViewController).setListingDictionary(dict)
|
||||
(segue.destinationViewController as! CategoriesTableViewController).setManagers(((self.tabBarController as? HomeViewController)?.fbGraphManager)!,
|
||||
fireManager: ((self.tabBarController as? HomeViewController)?.firebaseManager)!, ebayManager: ((self.tabBarController as? HomeViewController)?.ebayGraphManager)!,
|
||||
etsyManager: ((self.tabBarController as? HomeViewController)?.etsyManager)!)
|
||||
|
||||
//(segue.destinationViewController as! NetworksTableViewController).setNetworkSelectFunctionality(true)
|
||||
//print(self.categoryPicker.selectedRowInComponent(0))
|
||||
if(self.isEditing) {
|
||||
(segue.destinationViewController as! CategoriesTableViewController).setManagers((self.currentInformation["fbManager"] as? FacebookGraphAPIManager)!, fireManager: (self.currentInformation["firebaseManager"] as? FirebaseManager)!, ebayManager: (self.currentInformation["ebayManager"] as? EbayWebServiceManager)!, etsyManager: (self.currentInformation["etsyManager"] as? EtsyRESTAPIManager)!)
|
||||
|
||||
}else {
|
||||
(segue.destinationViewController as! CategoriesTableViewController).setManagers(((self.tabBarController as? HomeViewController)?.fbGraphManager)!,
|
||||
fireManager: ((self.tabBarController as? HomeViewController)?.firebaseManager)!, ebayManager: ((self.tabBarController as? HomeViewController)?.ebayGraphManager)!,
|
||||
etsyManager: ((self.tabBarController as? HomeViewController)?.etsyManager)!)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +225,6 @@ extension ItemImagePickerViewController: UIImagePickerControllerDelegate, UINavi
|
||||
|
||||
case 2:
|
||||
if(self.itemImagesSelections[0] && self.itemImagesSelections[1]) {
|
||||
//self.itemImagesSelections[2] = true
|
||||
viewsWereSaved[0] = true
|
||||
|
||||
self.imageIndex = 2
|
||||
@ -201,7 +240,6 @@ extension ItemImagePickerViewController: UIImagePickerControllerDelegate, UINavi
|
||||
case 3:
|
||||
if(self.itemImagesSelections[0] && self.itemImagesSelections[1]
|
||||
&& self.itemImagesSelections[2]) {
|
||||
//self.itemImagesSelections[3] = true
|
||||
viewsWereSaved[0] = true
|
||||
|
||||
self.imageIndex = 3
|
||||
@ -217,7 +255,6 @@ extension ItemImagePickerViewController: UIImagePickerControllerDelegate, UINavi
|
||||
case 4:
|
||||
if(self.itemImagesSelections[0] && self.itemImagesSelections[1]
|
||||
&& self.itemImagesSelections[2] && self.itemImagesSelections[3]) {
|
||||
//self.itemImagesSelections[4] = true
|
||||
viewsWereSaved[0] = true
|
||||
|
||||
self.imageIndex = 4
|
||||
@ -244,20 +281,6 @@ extension ItemImagePickerViewController: UIImagePickerControllerDelegate, UINavi
|
||||
viewsWereSaved[1] = true
|
||||
}
|
||||
}
|
||||
/*
|
||||
for (UIView *view in self.view.subviews)
|
||||
{
|
||||
if ([view isKindOfClass:[UIImageView class]] && CGRectContainsPoint(view.frame, location))
|
||||
{
|
||||
UIImageView *image = (UIImageView *) view;
|
||||
|
||||
// ok, now you know which image you received your long press for
|
||||
// do whatever you wanted on it at this point
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -492,9 +515,13 @@ extension ItemImagePickerViewController {
|
||||
}
|
||||
|
||||
@IBAction func cancelNewListing(sender: AnyObject) {
|
||||
//nil out all data user may have entered so that when they reopen new listing page
|
||||
//it initialized to a fresh screen.
|
||||
self.tabBarController?.selectedIndex = 0
|
||||
//@FIXME: nil out all data user may have entered so that when they reopen new listing page it initialized to a fresh screen.
|
||||
|
||||
if(!self.isEditing) {
|
||||
self.tabBarController?.selectedIndex = 0
|
||||
}else{
|
||||
self.presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
This class will be used to retrieve and manipulate data seen by the end user for he/she's item listings
|
||||
*/
|
||||
import UIKit
|
||||
import TYMActivityIndicatorView
|
||||
|
||||
class ItemTableViewController: UIViewController {
|
||||
|
||||
@ -19,6 +20,7 @@ class ItemTableViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var menuButton: UIBarButtonItem!
|
||||
|
||||
var loadingView: UIView!
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@ -39,10 +41,18 @@ class ItemTableViewController: UIViewController {
|
||||
menuButton.action = "revealToggle:"
|
||||
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
|
||||
}
|
||||
(self.tabBarController as? HomeViewController)?.firebaseManager.indicator.hidesWhenStopped = 1
|
||||
//self.view.addSubview(((self.tabBarController as? HomeViewController)?.firebaseManager.indicator)!)
|
||||
|
||||
self.loadingView = UIView(frame: self.view.frame)
|
||||
self.loadingView.backgroundColor = UIColor.grayColor()
|
||||
self.loadingView.alpha = 0.4
|
||||
((self.tabBarController as? HomeViewController)?.firebaseManager.indicator)!.center = self.view.center
|
||||
|
||||
|
||||
self.loadingView.addSubview(((self.tabBarController as? HomeViewController)?.firebaseManager.indicator)!)
|
||||
self.view.addSubview(loadingView)
|
||||
(self.tabBarController as? HomeViewController)?.firebaseManager.indicator.startAnimating()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +68,7 @@ class ItemTableViewController: UIViewController {
|
||||
|
||||
func stopIndicator(){
|
||||
(self.tabBarController as? HomeViewController)?.firebaseManager.indicator.stopAnimating()
|
||||
self.loadingView.removeFromSuperview()
|
||||
self.itemTable.reloadData()
|
||||
}
|
||||
|
||||
@ -115,6 +126,8 @@ extension ItemTableViewController: UITableViewDataSource{
|
||||
|
||||
})
|
||||
|
||||
}else {
|
||||
cell.itemStatus.text = "Status: Active"
|
||||
}
|
||||
|
||||
if(!((self.tabBarController as? HomeViewController)!.userListings[indexPath.row].networks["areNetworksChosen"])!){
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
|
||||
import UIKit
|
||||
import FirebaseStorage
|
||||
import SWRevealViewController
|
||||
|
||||
//@TODO: Need to make multiple images work for etsy and facebook and need to implement multiple images saving to firebase
|
||||
class ListingPreviewViewController: UIViewController {
|
||||
|
||||
@ -42,6 +44,7 @@ class ListingPreviewViewController: UIViewController {
|
||||
private var alert = UIAlertController(title: "Listing Published", message: "Your listing has been published", preferredStyle: .Alert)
|
||||
private var lastListingKey: String!
|
||||
private var newInProgressListing: Dictionary<String,AnyObject> = Dictionary<String, AnyObject>()
|
||||
var loadingView: UIView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
@ -124,12 +127,23 @@ class ListingPreviewViewController: UIViewController {
|
||||
// Pass the selected object to the new view controller.
|
||||
|
||||
if(segue.identifier == "EditListingSegue"){
|
||||
var imageData: [UIImage] = []
|
||||
for imageView in (self.itemListingDictionary["pictures"] as? [UIImageView])! {
|
||||
imageData.append(imageView.image!)
|
||||
}
|
||||
|
||||
let dict: Dictionary<String, AnyObject> = ["title": self.itemTitle.text,
|
||||
"description": self.itemDescription.text,
|
||||
"price": self.itemPrice.text,
|
||||
"quantity": self.itemQuantity.text,
|
||||
"images": imageData,
|
||||
"category": self.itemCategory.text,
|
||||
"fbManager": self.graphManager,
|
||||
"ebayManager": self.ebayManager,
|
||||
"etsyManager": self.etsyManager,
|
||||
"firebaseManager": self.firManager]
|
||||
let vc = (segue.destinationViewController as? ItemImagePickerViewController)!
|
||||
vc.itemName.text? = self.itemTitle.text
|
||||
vc.itemPrice.text? = self.itemPrice.text
|
||||
vc.itemDescription.text? = self.itemDescription.text
|
||||
vc.possibleItemImageMain = self.itemPictureMain
|
||||
vc.itemQuantity.text? = self.itemQuantity.text
|
||||
vc.toggleEditingMode(dict)
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,11 +173,24 @@ extension Dictionary {
|
||||
|
||||
//MARK: - IBActions
|
||||
extension ListingPreviewViewController {
|
||||
|
||||
@IBAction func cancel(sender: AnyObject) {
|
||||
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
|
||||
let vc = storyboard.instantiateViewControllerWithIdentifier("Reveal View Controller") as! SWRevealViewController
|
||||
self.presentViewController(vc, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func publishItem(sender: AnyObject) {
|
||||
self.loadingView = UIView(frame: self.view.frame)
|
||||
self.loadingView.backgroundColor = UIColor.grayColor()
|
||||
self.loadingView.alpha = 0.4
|
||||
|
||||
if(self.itemPictureMain.image == nil){
|
||||
self.firManager.indicator.center = self.view.center
|
||||
|
||||
self.loadingView.addSubview(self.firManager.indicator)
|
||||
self.view.addSubview(loadingView)
|
||||
self.firManager.indicator.startAnimating()
|
||||
|
||||
if(self.itemPicture.image == nil){
|
||||
let alert = UIAlertController(title: "Image Needed", message: "To proceed to choose networks, you must supply at least one picture for your listing", preferredStyle: .Alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in alert.dismissViewControllerAnimated(true, completion: nil)}))
|
||||
|
||||
@ -183,108 +210,6 @@ extension ListingPreviewViewController {
|
||||
//post to ebay
|
||||
/*if(self.networksDictionary["ebay"]!){
|
||||
dispatch_group_enter(postingGroup)
|
||||
var categoryCode: String!
|
||||
var dict = EbayWebServiceManager.settingsDictionary["categories"]!
|
||||
switch self.itemCategory.text {
|
||||
case "Antiques":
|
||||
categoryCode = (dict["Antiques"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Art":
|
||||
categoryCode = (dict["Art"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Baby":
|
||||
categoryCode = (dict["Baby"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Bath, Beauty & Health":
|
||||
categoryCode = (dict["Health and Beauty"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Books":
|
||||
categoryCode = (dict["Books"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Business & Industrial":
|
||||
categoryCode = (dict["Business and Industrial"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Cameras & Photo":
|
||||
categoryCode = (dict["Cameras and Photo"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Cell Phones & Accessories":
|
||||
categoryCode = (dict["Cell Phones and Accessories"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Clothing & Shoes":
|
||||
categoryCode = (dict["Clothing, Shoes and Accessories"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Coins & Paper Money":
|
||||
categoryCode = (dict["Coins and Paper Money"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Collectibles":
|
||||
categoryCode = (dict["Collectibles"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Computers/Tablets and Networking":
|
||||
categoryCode = (dict["Computers/Tablets and Networking"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Consumer Electronics":
|
||||
categoryCode = (dict["Consumer Electronics"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Crafts":
|
||||
categoryCode = (dict["Crafts"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Dolls & Miniatures":
|
||||
categoryCode = (dict["Dolls and Bears"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "DVDs & Movies":
|
||||
categoryCode = (dict["DVDs & Movies"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Entertainment Memorabilia":
|
||||
categoryCode = (dict["Entertainment Memorabilia"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Everything Else":
|
||||
categoryCode = (dict["Everything Else"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Gift Cards & Coupons":
|
||||
categoryCode = (dict["Gift Cards and Coupons"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Home/Houseware & Garden":
|
||||
categoryCode = (dict["Coins and Paper Money"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Jewelry & Watches":
|
||||
categoryCode = (dict["Jewelry and Watches"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Musical Instruments & Gear":
|
||||
categoryCode = (dict["Musical Instruments and Gear"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Pet Supplies":
|
||||
categoryCode = (dict["Pet Supplies"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Pottery & Glass":
|
||||
categoryCode = (dict["Pottery and Glass"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Real Estate":
|
||||
categoryCode = (dict["Real Estate"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Specialty Services":
|
||||
categoryCode = (dict["Specialty Services"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Sporting Goods":
|
||||
categoryCode = (dict["Sporting Goods"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Sports Memorabilia & Fan Shop":
|
||||
categoryCode = (dict["Sports Mem, Cards and Fan Shop"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Tickets & Experiences":
|
||||
categoryCode = (dict["Tickets and Experiences"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Toys & Hobbies":
|
||||
categoryCode = (dict["Toys and Hobbies"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Travel":
|
||||
categoryCode = (dict["Travel"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
case "Video Games & Consoles":
|
||||
categoryCode = (dict["Video Games and Consoles"] as! Dictionary<String, AnyObject>)["cat_id"] as! String
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
let body: [String: String] = [ "title": self.itemTitle.text,
|
||||
"quantity":self.itemQuantity.text,
|
||||
@ -678,6 +603,28 @@ extension ListingPreviewViewController {
|
||||
//notify to save final listing to firebase
|
||||
dispatch_group_notify(postingGroup, dispatch_get_main_queue(), {
|
||||
newListingRef.setValue(self.newInProgressListing)
|
||||
// self.alert.title = "Listing saved with error"
|
||||
// self.alert.message = "Your listing has been saved but something went wrong when trying to publish to facebook"
|
||||
|
||||
|
||||
//let alert = UIAlertController(title: "Listing Published", message: "Your listing has been published", preferredStyle: .Alert)
|
||||
|
||||
// self.alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in self.alert.dismissViewControllerAnimated(true, completion: nil)}))
|
||||
|
||||
//register new listing id in global path of firebase root'
|
||||
self.firManager.ref.child("Global_listings").child(newListingRef.key).setValue(newListingRef.key)
|
||||
self.firManager.indicator.stopAnimating()
|
||||
|
||||
let alert = UIAlertController(title: "Listing Posted Successfully", message: "Your listing was submitted to all networks successfully", preferredStyle: .Alert)
|
||||
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in
|
||||
|
||||
self.cancel(self)
|
||||
alert.dismissViewControllerAnimated(true, completion: nil)
|
||||
}))
|
||||
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
})
|
||||
|
||||
// self.alert.title = "Listing saved with error"
|
||||
// self.alert.message = "Your listing has been saved but something went wrong when trying to publish to facebook"
|
||||
|
||||
@ -1016,6 +1016,17 @@
|
||||
<color key="textColor" red="0.10588235294117647" green="0.078431372549019607" blue="0.23921568627450979" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="EMt-PR-56K">
|
||||
<rect key="frame" x="307" y="8" width="60" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Cancel">
|
||||
<color key="titleColor" red="1" green="0.44538913570442429" blue="0.4193885779602724" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="cancel:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="a84-0e-3PX"/>
|
||||
<action selector="editListing:" destination="gfQ-Y2-Mqh" eventType="touchUpInside" id="yDN-99-lsc"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
@ -1392,7 +1403,7 @@
|
||||
<color key="separatorColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="sectionIndexBackgroundColor" red="1" green="0.674443664" blue="0.43274429120000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="User_Cell" id="hae-qr-YYv">
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="User_Cell" id="hae-qr-YYv" customClass="UserCell" customModule="Vendoo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="1" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hae-qr-YYv" id="jVD-It-v2S">
|
||||
@ -1400,14 +1411,14 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hi User" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QxU-Ol-czq">
|
||||
<rect key="frame" x="17" y="4" width="66" height="26"/>
|
||||
<rect key="frame" x="17" y="4" width="208" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="user@email.com" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CH5-dW-4wI">
|
||||
<rect key="frame" x="17" y="20" width="114" height="26"/>
|
||||
<rect key="frame" x="17" y="20" width="208" height="26"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.43529411759999997" green="0.4431372549" blue="0.47450980390000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
@ -1422,6 +1433,10 @@
|
||||
</button>
|
||||
</subviews>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="email" destination="CH5-dW-4wI" id="dTu-Qs-a3W"/>
|
||||
<outlet property="name" destination="QxU-Ol-czq" id="GGJ-j1-f1P"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Notifications_Cell" id="TpL-A6-BYb">
|
||||
<rect key="frame" x="0.0" y="45" width="375" height="44"/>
|
||||
@ -1597,7 +1612,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="9G8-XI-ptI">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="9G8-XI-ptI" id="r3f-6Q-p1g">
|
||||
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
||||
@ -1614,7 +1629,7 @@
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="JJa-O7-kym">
|
||||
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JJa-O7-kym" id="bCt-1V-IW1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="342" height="43.5"/>
|
||||
@ -1675,7 +1690,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Change_Pass_Cell" id="ceq-sl-ClT">
|
||||
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ceq-sl-ClT" id="Waq-fu-UxD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
@ -1692,7 +1707,7 @@
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Delete_Account_Cell" id="Lha-cf-Sfc">
|
||||
<rect key="frame" x="0.0" y="72" width="375" height="44"/>
|
||||
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Lha-cf-Sfc" id="kmF-Sb-d0c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||
@ -2450,11 +2465,11 @@
|
||||
<image name="start" width="50" height="50"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="Ds4-LY-IRj"/>
|
||||
<segue reference="syc-IR-LNQ"/>
|
||||
<segue reference="NOz-ya-avj"/>
|
||||
<segue reference="rkZ-c8-XJc"/>
|
||||
<segue reference="nWA-7e-2Ec"/>
|
||||
<segue reference="Sz0-BH-2me"/>
|
||||
<segue reference="eaI-bm-1aI"/>
|
||||
<segue reference="rkZ-c8-XJc"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
<color key="tintColor" red="0.2784313725" green="0.80392156859999997" blue="0.68235294120000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</document>
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import FirebaseAuth
|
||||
import Locksmith
|
||||
|
||||
class MenuPanelViewController: UIViewController{
|
||||
|
||||
@ -99,7 +100,11 @@ extension MenuPanelViewController: UITableViewDataSource
|
||||
let cell: UITableViewCell
|
||||
switch(indexPath.row){
|
||||
case 0:
|
||||
cell = self.table.dequeueReusableCellWithIdentifier("User_Cell")!
|
||||
|
||||
cell = (self.table.dequeueReusableCellWithIdentifier("User_Cell", forIndexPath: indexPath) as! UserCell)
|
||||
|
||||
(cell as! UserCell).name.text = "Hi " + (NSUserDefaults.standardUserDefaults().objectForKey("name") as? String)!
|
||||
(cell as! UserCell).email.text = (NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!
|
||||
break
|
||||
case 1:
|
||||
cell = self.table.dequeueReusableCellWithIdentifier("Notifications_Cell")!
|
||||
@ -129,7 +134,32 @@ extension MenuPanelViewController{
|
||||
|
||||
do{
|
||||
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")
|
||||
self.presentViewController(vc!, animated: true, completion: nil)
|
||||
|
||||
@ -33,6 +33,8 @@ class NetworksTableViewController: UIViewController {
|
||||
private var firManager: FirebaseManager! = nil
|
||||
private var etsyManager: EtsyRESTAPIManager! = nil
|
||||
private var ebayManager: EbayWebServiceManager! = EbayWebServiceManager()
|
||||
private var shouldShowDictionary: Dictionary<String, Bool> = ["ebay":false, "amazon":false,"etsy":false,"facebook":false]
|
||||
private var networkOrderSelection: [String] = []
|
||||
|
||||
|
||||
|
||||
@ -71,6 +73,23 @@ class NetworksTableViewController: UIViewController {
|
||||
self.networkToggleOrSelect = bool
|
||||
}
|
||||
|
||||
func toggleMarketPlaceVisibitlity (market: String) {
|
||||
self.shouldShowDictionary[market] = !self.shouldShowDictionary[market]!
|
||||
}
|
||||
|
||||
private func checkVisibility () -> String? {
|
||||
var string = ""
|
||||
for (market, visibility) in self.shouldShowDictionary {
|
||||
if visibility {
|
||||
self.shouldShowDictionary[market] = !self.shouldShowDictionary[market]!
|
||||
string = market
|
||||
self.networkOrderSelection.append(market)
|
||||
break
|
||||
}
|
||||
}
|
||||
return string
|
||||
}
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
if(!networkToggleOrSelect) {
|
||||
@ -129,8 +148,20 @@ extension NetworksTableViewController: UITableViewDataSource {
|
||||
}
|
||||
|
||||
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
// #warning Incomplete implementation, return the number of rows
|
||||
return 4
|
||||
if(self.networkToggleOrSelect) {
|
||||
var count = 0
|
||||
// #warning Incomplete implementation, return the number of rows
|
||||
for (_, visibility) in self.shouldShowDictionary {
|
||||
if visibility {
|
||||
count += 1
|
||||
}
|
||||
}
|
||||
return count
|
||||
}
|
||||
else {
|
||||
return 4
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +173,27 @@ extension NetworksTableViewController: UITableViewDataSource {
|
||||
//may hide future networks that don't apply to a listing
|
||||
if(self.networkToggleOrSelect){
|
||||
|
||||
switch (indexPath.row){
|
||||
let market = self.checkVisibility()!
|
||||
switch (market) {
|
||||
case "facebook":
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("facebook", forIndexPath: indexPath) as! FBTableViewCell)
|
||||
break
|
||||
case "ebay":
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell)
|
||||
break
|
||||
case "etsy":
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("etsy", forIndexPath: indexPath) as! EtsyTableViewCell)
|
||||
break
|
||||
case "amazon":
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("amazon", forIndexPath: indexPath) as! AmazonTableViewCell)
|
||||
break
|
||||
default:
|
||||
cell = UITableViewCell()
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
/*switch (indexPath.row){
|
||||
|
||||
case 0:
|
||||
|
||||
@ -162,7 +213,7 @@ extension NetworksTableViewController: UITableViewDataSource {
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("facebook", forIndexPath: indexPath) as! FBTableViewCell)
|
||||
|
||||
break
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
else{
|
||||
@ -353,8 +404,8 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
//case where class is being used in new item posting workflow to select which network to sell on
|
||||
if(self.networkToggleOrSelect){
|
||||
|
||||
switch (indexPath.row){
|
||||
case 0:
|
||||
switch (self.networkOrderSelection[indexPath.row]){
|
||||
case "ebay":
|
||||
let cell: EbayTableViewCell!
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("ebay", forIndexPath: indexPath) as! EbayTableViewCell)
|
||||
cell.setSelected(false, animated: false)
|
||||
@ -383,7 +434,7 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
}
|
||||
|
||||
break
|
||||
case 1:
|
||||
case "amazon":
|
||||
let cell: AmazonTableViewCell!
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("amazon", forIndexPath: indexPath) as! AmazonTableViewCell)
|
||||
cell.setSelected(false, animated: false)
|
||||
@ -413,7 +464,7 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
break
|
||||
|
||||
|
||||
case 2:
|
||||
case "etsy":
|
||||
let cell: EtsyTableViewCell!
|
||||
|
||||
cell = (self.tableView.dequeueReusableCellWithIdentifier("etsy", forIndexPath: indexPath) as! EtsyTableViewCell)
|
||||
@ -451,7 +502,7 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
|
||||
break
|
||||
|
||||
default:
|
||||
case "facebook":
|
||||
|
||||
let cell: FBTableViewCell!
|
||||
|
||||
@ -477,16 +528,9 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
//code to select network
|
||||
self.networksDictionary["facebook"] = true
|
||||
|
||||
//this is the type of code desired to access the REST management classes
|
||||
/*
|
||||
let tabBar = self.tabBarController
|
||||
(tabBar as? HomeViewController)?.fbGraphManager.authorizeApp(self)
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
||||
}
|
||||
@ -682,10 +726,19 @@ extension NetworksTableViewController: UITableViewDelegate {
|
||||
extension NetworksTableViewController: EbayWebServiceManagerDelegate {
|
||||
|
||||
func signInUser(signInString : String!) {
|
||||
let myWebView:UIWebView = UIWebView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height))
|
||||
let mywebViewController = UIViewController()
|
||||
|
||||
//let myWebView:UIWebView = UIWebView(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height))
|
||||
let myWebView = UIWebView(frame: mywebViewController.view.bounds)
|
||||
myWebView.delegate = self
|
||||
myWebView.loadRequest(NSURLRequest(URL: NSURL(string: signInString)!))
|
||||
self.view.addSubview(myWebView)
|
||||
mywebViewController.view = myWebView
|
||||
|
||||
let navController = UINavigationController(rootViewController: mywebViewController)
|
||||
mywebViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Done, target: self, action: Selector("dismiss"))
|
||||
|
||||
self.presentViewController(navController, animated: true, completion: nil)
|
||||
//self.view.addSubview(myWebView)
|
||||
}
|
||||
|
||||
}
|
||||
@ -712,24 +765,15 @@ extension NetworksTableViewController: UIWebViewDelegate {
|
||||
NSLog("Oauth successful")
|
||||
((self.tabBarController as? HomeViewController)?.ebayGraphManager)!.fetchToken()
|
||||
}
|
||||
|
||||
/*var data : NSData? = NSData(contentsOfURL: NSURL(string: responseString as! String)!)!
|
||||
if (data != nil){
|
||||
let jsonObject: AnyObject?
|
||||
do {
|
||||
try jsonObject = NSJSONSerialization.JSONObjectWithData(data!, options: .MutableLeaves)
|
||||
print(jsonObject)
|
||||
|
||||
}
|
||||
catch {
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
func dismiss() {
|
||||
self.dismissViewControllerAnimated(true, completion: nil)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension NetworksTableViewController {
|
||||
@ -741,12 +785,16 @@ extension NetworksTableViewController {
|
||||
switch (sender.superview?.superview?.classForCoder){
|
||||
case is EbayTableViewCell.Type:
|
||||
let tabBar = self.tabBarController
|
||||
((tabBar as? HomeViewController)?.ebayGraphManager.authorizeApp())!
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
sender.setTitle("Logout", forState: UIControlState.Normal)
|
||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.enabled = true
|
||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.hidden = false
|
||||
})
|
||||
((tabBar as? HomeViewController)?.ebayGraphManager.authorizeApp({
|
||||
something,_ -> Void in
|
||||
// // //
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
sender.setTitle("Logout", forState: UIControlState.Normal)
|
||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.enabled = true
|
||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.hidden = false
|
||||
})
|
||||
}))!
|
||||
|
||||
break
|
||||
case is AmazonTableViewCell.Type:
|
||||
break
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import Locksmith
|
||||
import FirebaseAuth
|
||||
|
||||
class SettingsViewController: UIViewController {
|
||||
|
||||
@ -106,7 +107,7 @@ extension SettingsViewController: UITableViewDelegate {
|
||||
|
||||
//put in password changing code later
|
||||
print("password accepted please enter new password")
|
||||
let alert2 = UIAlertController(title: "Change Password", message: "WARNING! You are about to change your vendoo account password. Please enter your current password to continue.", preferredStyle: .Alert)
|
||||
let alert2 = UIAlertController(title: "Change Password", message: "WARNING! You are about to change your vendoo account password. Please enter your new password to continue.", preferredStyle: .Alert)
|
||||
|
||||
alert2.addTextFieldWithConfigurationHandler({ (textField : UITextField!) -> Void in
|
||||
|
||||
@ -117,7 +118,24 @@ extension SettingsViewController: UITableViewDelegate {
|
||||
alert2.addAction(UIAlertAction(title: "Change Password", style: .Default, handler:{(action: UIAlertAction!) in
|
||||
let textField2 = alert2.textFields![0] as UITextField
|
||||
|
||||
print("your new password is \(textField2.text!). This will be take out once password change logic is implemented.")
|
||||
FIRAuth.auth()?.currentUser?.updatePassword(textField2.text!, completion: {
|
||||
(error) -> Void in
|
||||
|
||||
if (error != nil) {
|
||||
print(error)
|
||||
}else {
|
||||
print("Current user's new password is now \(textField2.text!).")
|
||||
do{
|
||||
try Locksmith.updateData(["pass": textField2.text!], forUserAccount: (NSUserDefaults.standardUserDefaults().objectForKey("email") as? String)!, inService: "vendoo")
|
||||
print("account credentials saved")
|
||||
}
|
||||
catch{
|
||||
//could not save data to keychain
|
||||
print("account credentials could not be saved")
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}))
|
||||
alert.dismissViewControllerAnimated(false, completion: {})
|
||||
|
||||
@ -6,10 +6,11 @@
|
||||
// Copyright © 2016 Okechi Onyeje. All rights reserved.
|
||||
//
|
||||
|
||||
//NEED TO PROMPT NEW USER THAT THEY HAVE BEEN LOGGED IN, NEED TO ADD AN INDICTOR TO LET USER KNOW THEY NEED TO WAIT AND NEED TO SEGUE TO MAIN SCREEN VIEW CONTROLLER
|
||||
//@FIXME: NEED TO PROMPT NEW USER THAT THEY HAVE BEEN LOGGED IN, NEED TO ADD AN INDICTOR TO LET USER KNOW THEY NEED TO WAIT AND NEED TO SEGUE TO MAIN SCREEN VIEW CONTROLLER
|
||||
|
||||
import UIKit
|
||||
import FirebaseAuth
|
||||
import Firebase
|
||||
import Locksmith
|
||||
|
||||
class SignUpViewController: UIViewController {
|
||||
@ -43,43 +44,56 @@ class SignUpViewController: UIViewController {
|
||||
extension SignUpViewController {
|
||||
|
||||
@IBAction func signUpUser(sender: AnyObject) {
|
||||
let finalEmail = email!.text!.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
|
||||
if( (self.email.text != "") && (self.name.text != "") && (self.password.text != "")) {
|
||||
let finalEmail = email!.text!.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
|
||||
|
||||
if isValidEmail(finalEmail){
|
||||
|
||||
FIRAuth.auth()?.createUserWithEmail(email.text!, password: password.text!) { (user, error) in
|
||||
if error != nil {
|
||||
/*
|
||||
if ( error!.userInfo[("error_name" as NSObject!)] == "ERROR_WEAK_PASSWORD"){
|
||||
if isValidEmail(finalEmail){
|
||||
FIRAuth.auth()?.createUserWithEmail(email.text!, password: password.text!) { (user, error) in
|
||||
if error != nil {
|
||||
/*
|
||||
if ( error!.userInfo[("error_name" as NSObject!)] == "ERROR_WEAK_PASSWORD"){
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
print("user could not be created")
|
||||
print(error!.localizedDescription)
|
||||
return
|
||||
}
|
||||
else{
|
||||
|
||||
//save user account
|
||||
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "signedIn")
|
||||
NSUserDefaults.standardUserDefaults().setObject(self.email.text, forKey: "email")
|
||||
|
||||
//save user credentials in Keychain
|
||||
do{
|
||||
try Locksmith.saveData(["pass": self.password.text!], forUserAccount: self.email.text!, inService: "vendoo")
|
||||
print("account credentials saved")
|
||||
}
|
||||
*/
|
||||
print("user could not be created")
|
||||
print(error!.localizedDescription)
|
||||
return
|
||||
}
|
||||
catch{
|
||||
//could not save data to keychain
|
||||
print("account credentials could not be saved")
|
||||
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")
|
||||
print("account credentials saved")
|
||||
}
|
||||
catch{
|
||||
//could not save data to keychain
|
||||
print("account credentials could not be saved")
|
||||
|
||||
}
|
||||
self.performSegueWithIdentifier("HomeScreenSegue", sender:nil)
|
||||
}
|
||||
self.performSegueWithIdentifier("HomeScreenSegue", sender:nil)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
|
||||
var alert = UIAlertController(title: "Missing Required Fields", message: "You are missing required field(s) to complete your Vendoo sign up. Please make sure the email, name, and password fields have been filled.", preferredStyle: .Alert)
|
||||
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: {(action: UIAlertAction!) in
|
||||
}))
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
19
Vendoo/UserCell.swift
Normal file
19
Vendoo/UserCell.swift
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// UserCell.swift
|
||||
// Vendoo
|
||||
//
|
||||
// Created by Okechi Onyeje on 8/28/16.
|
||||
// Copyright © 2016 Okechi Onyeje. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class UserCell: UITableViewCell {
|
||||
@IBOutlet weak var name: UILabel!
|
||||
@IBOutlet weak var email: UILabel!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user