mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 11:47:40 +00:00
Can now dismiss ebay webview, but for some reason auth is acting inconsistent could be a problem with the server itself, will wait to merge this branch and check on 09/05/16
This commit is contained in:
parent
d4f901a084
commit
8e2e94313b
Binary file not shown.
@ -90,11 +90,11 @@
|
|||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
timestampString = "494390858.671323"
|
timestampString = "494636868.104791"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "568"
|
startingLineNumber = "570"
|
||||||
endingLineNumber = "568">
|
endingLineNumber = "570">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -104,11 +104,11 @@
|
|||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
timestampString = "494391829.589686"
|
timestampString = "494636868.104791"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "566"
|
startingLineNumber = "568"
|
||||||
endingLineNumber = "566">
|
endingLineNumber = "568">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
@ -175,5 +175,197 @@
|
|||||||
landmarkType = "5">
|
landmarkType = "5">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494635088.267954"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "788"
|
||||||
|
endingLineNumber = "788"
|
||||||
|
landmarkName = "toggleAuth(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.NetworksTableViewController.toggleAuth (__ObjC.UIButton) -> ()"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494637260.284101"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "788"
|
||||||
|
endingLineNumber = "788"
|
||||||
|
offsetFromSymbolStart = "1462">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.NetworksTableViewController.(toggleAuth (__ObjC.UIButton) -> ()).(closure #1)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/include/dispatch/queue.h"
|
||||||
|
timestampString = "494637260.284213"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "325"
|
||||||
|
endingLineNumber = "325"
|
||||||
|
offsetFromSymbolStart = "44">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494636143.418834"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "791"
|
||||||
|
endingLineNumber = "791"
|
||||||
|
landmarkName = "toggleAuth(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.NetworksTableViewController.(toggleAuth (__ObjC.UIButton) -> ()).(closure #1)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494637260.28507"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "791"
|
||||||
|
endingLineNumber = "791"
|
||||||
|
offsetFromSymbolStart = "64">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "Vendoo.NetworksTableViewController.(toggleAuth (__ObjC.UIButton) -> ()).(closure #1).(closure #1)"
|
||||||
|
moduleName = "Vendoo"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Vendoo/Vendoo_bb/Vendoo/Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494637260.285178"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "792"
|
||||||
|
endingLineNumber = "792"
|
||||||
|
offsetFromSymbolStart = "34">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494636868.104791"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "408"
|
||||||
|
endingLineNumber = "408"
|
||||||
|
landmarkName = "parser(_:foundCharacters:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494636097.069833"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "764"
|
||||||
|
endingLineNumber = "764"
|
||||||
|
landmarkName = "webViewDidFinishLoad(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494636868.104791"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "306"
|
||||||
|
endingLineNumber = "306"
|
||||||
|
landmarkName = "fetchToken()"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494636370.565199"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "793"
|
||||||
|
endingLineNumber = "793"
|
||||||
|
landmarkName = "toggleAuth(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||||
|
timestampString = "494637258.536031"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "470"
|
||||||
|
endingLineNumber = "470"
|
||||||
|
landmarkName = "parser(_:foundCharacters:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "Vendoo/NetworksTableViewController.swift"
|
||||||
|
timestampString = "494637280.732776"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "765"
|
||||||
|
endingLineNumber = "765"
|
||||||
|
landmarkName = "webViewDidFinishLoad(_:)"
|
||||||
|
landmarkType = "5">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|||||||
@ -40,6 +40,7 @@ class EbayWebServiceManager: NSObject {
|
|||||||
private var completion: ServiceResponse!
|
private var completion: ServiceResponse!
|
||||||
private var isGettingSubCategories: Bool = false
|
private var isGettingSubCategories: Bool = false
|
||||||
private var isRevisingListing: 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\"?>" +
|
let soapMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||||
"<GetSessionIDRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">" +
|
"<GetSessionIDRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">" +
|
||||||
@ -133,7 +134,7 @@ extension EbayWebServiceManager {
|
|||||||
let url = NSURL(string: self.baseURL)
|
let url = NSURL(string: self.baseURL)
|
||||||
let theRequest = NSMutableURLRequest(URL: url!)
|
let theRequest = NSMutableURLRequest(URL: url!)
|
||||||
theRequest.addValue("GetSessionID", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
theRequest.addValue("GetSessionID", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||||
|
self.completion = onComplete
|
||||||
self.requestMaker(soapMessage, theRequest: theRequest)
|
self.requestMaker(soapMessage, theRequest: theRequest)
|
||||||
|
|
||||||
|
|
||||||
@ -303,7 +304,7 @@ extension EbayWebServiceManager {
|
|||||||
let url = NSURL(string: self.baseURL)
|
let url = NSURL(string: self.baseURL)
|
||||||
let theRequest = NSMutableURLRequest(URL: url!)
|
let theRequest = NSMutableURLRequest(URL: url!)
|
||||||
theRequest.addValue("FetchToken", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
theRequest.addValue("FetchToken", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||||
|
//dispatch_group_enter(self.requestGroup)
|
||||||
self.requestMaker(soapMessage, theRequest: theRequest)
|
self.requestMaker(soapMessage, theRequest: theRequest)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,6 +405,7 @@ extension EbayWebServiceManager: NSXMLParserDelegate {
|
|||||||
print("account credentials saved")
|
print("account credentials saved")
|
||||||
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "ebayAuthorized")
|
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "ebayAuthorized")
|
||||||
self.isAuthorized = true
|
self.isAuthorized = true
|
||||||
|
//self.completion(nil, nil)
|
||||||
|
|
||||||
//Test authentication
|
//Test authentication
|
||||||
let soapmessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
let soapmessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
|
||||||
@ -465,7 +467,7 @@ extension EbayWebServiceManager: NSXMLParserDelegate {
|
|||||||
let url = NSURL(string: self.baseURL)
|
let url = NSURL(string: self.baseURL)
|
||||||
let theRequest = NSMutableURLRequest(URL: url!)
|
let theRequest = NSMutableURLRequest(URL: url!)
|
||||||
theRequest.addValue("GetCategories", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
theRequest.addValue("GetCategories", forHTTPHeaderField: "X-EBAY-API-CALL-NAME")
|
||||||
|
self.completion(nil, nil)
|
||||||
self.requestMaker(soapmessage, theRequest: theRequest)
|
self.requestMaker(soapmessage, theRequest: theRequest)
|
||||||
break
|
break
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -726,10 +726,19 @@ extension NetworksTableViewController: UITableViewDelegate {
|
|||||||
extension NetworksTableViewController: EbayWebServiceManagerDelegate {
|
extension NetworksTableViewController: EbayWebServiceManagerDelegate {
|
||||||
|
|
||||||
func signInUser(signInString : String!) {
|
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.delegate = self
|
||||||
myWebView.loadRequest(NSURLRequest(URL: NSURL(string: signInString)!))
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -761,6 +770,10 @@ extension NetworksTableViewController: UIWebViewDelegate {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func dismiss() {
|
||||||
|
self.dismissViewControllerAnimated(true, completion: nil)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension NetworksTableViewController {
|
extension NetworksTableViewController {
|
||||||
@ -772,12 +785,16 @@ extension NetworksTableViewController {
|
|||||||
switch (sender.superview?.superview?.classForCoder){
|
switch (sender.superview?.superview?.classForCoder){
|
||||||
case is EbayTableViewCell.Type:
|
case is EbayTableViewCell.Type:
|
||||||
let tabBar = self.tabBarController
|
let tabBar = self.tabBarController
|
||||||
((tabBar as? HomeViewController)?.ebayGraphManager.authorizeApp())!
|
((tabBar as? HomeViewController)?.ebayGraphManager.authorizeApp({
|
||||||
|
something,_ -> Void in
|
||||||
|
// // //
|
||||||
dispatch_async(dispatch_get_main_queue(), {
|
dispatch_async(dispatch_get_main_queue(), {
|
||||||
sender.setTitle("Logout", forState: UIControlState.Normal)
|
sender.setTitle("Logout", forState: UIControlState.Normal)
|
||||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.enabled = true
|
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.enabled = true
|
||||||
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.hidden = false
|
(sender.superview?.superview as! EbayTableViewCell).settingsBtn.hidden = false
|
||||||
})
|
})
|
||||||
|
}))!
|
||||||
|
|
||||||
break
|
break
|
||||||
case is AmazonTableViewCell.Type:
|
case is AmazonTableViewCell.Type:
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user