mirror of
https://bitbucket.org/vendoo/vendoo_v1.0.git
synced 2025-12-25 03:37:39 +00:00
network error bug fixed
This commit is contained in:
parent
ba56169bf3
commit
0042a65201
Binary file not shown.
@ -10,11 +10,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "505234532.167163"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "442"
|
||||
endingLineNumber = "442"
|
||||
startingLineNumber = "443"
|
||||
endingLineNumber = "443"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@ -280,7 +280,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ExternalWebViewController.swift"
|
||||
timestampString = "506359937.526087"
|
||||
timestampString = "506444138.580552"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "32"
|
||||
@ -295,7 +295,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ExternalWebViewController.swift"
|
||||
timestampString = "506359937.526342"
|
||||
timestampString = "506444138.580651"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "32"
|
||||
@ -310,7 +310,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ExternalWebViewController.swift"
|
||||
timestampString = "506359937.526555"
|
||||
timestampString = "506444138.580732"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "32"
|
||||
@ -325,7 +325,7 @@
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ExternalWebViewController.swift"
|
||||
timestampString = "506359937.526814"
|
||||
timestampString = "506444138.580811"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "32"
|
||||
@ -374,11 +374,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "505234532.167163"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "539"
|
||||
endingLineNumber = "539"
|
||||
startingLineNumber = "540"
|
||||
endingLineNumber = "540"
|
||||
landmarkName = "tableView(_:didSelectRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@ -390,11 +390,11 @@
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "505234532.167163"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "540"
|
||||
endingLineNumber = "540"
|
||||
startingLineNumber = "541"
|
||||
endingLineNumber = "541"
|
||||
landmarkName = "tableView(_:didSelectRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@ -578,7 +578,7 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
@ -594,15 +594,15 @@
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506355695.058673"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "548"
|
||||
endingLineNumber = "548"
|
||||
startingLineNumber = "549"
|
||||
endingLineNumber = "549"
|
||||
landmarkName = "tableView(_:titleForHeaderInSection:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
@ -623,5 +623,309 @@
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "506415773.009495"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "245"
|
||||
endingLineNumber = "245"
|
||||
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 = "506416123.471754"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "296"
|
||||
endingLineNumber = "296"
|
||||
landmarkName = "listItem(_:imageUrls:completion:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/EbayWebServiceManager.swift"
|
||||
timestampString = "506416197.569007"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "559"
|
||||
endingLineNumber = "559"
|
||||
landmarkName = "parser(_:foundCharacters:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "420"
|
||||
endingLineNumber = "420"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506444138.584428"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "420"
|
||||
endingLineNumber = "420"
|
||||
offsetFromSymbolStart = "8768">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506444138.584528"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "420"
|
||||
endingLineNumber = "420"
|
||||
offsetFromSymbolStart = "20489">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506417060.929718"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "382"
|
||||
endingLineNumber = "382"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506417060.932611"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "382"
|
||||
endingLineNumber = "382"
|
||||
offsetFromSymbolStart = "3520">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506417060.932738"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "382"
|
||||
endingLineNumber = "382"
|
||||
offsetFromSymbolStart = "20465">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "458"
|
||||
endingLineNumber = "458"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506443695.961323"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "458"
|
||||
endingLineNumber = "458"
|
||||
offsetFromSymbolStart = "13681">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506443695.96148"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "458"
|
||||
endingLineNumber = "458"
|
||||
offsetFromSymbolStart = "20513">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "489"
|
||||
endingLineNumber = "489"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
<Locations>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506443695.96225"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "489"
|
||||
endingLineNumber = "489"
|
||||
offsetFromSymbolStart = "18482">
|
||||
</Location>
|
||||
<Location
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
symbolName = "Vendoo.ItemTableViewController.tableView (__ObjC.UITableView, cellForRowAtIndexPath : __ObjC.NSIndexPath) -> __ObjC.UITableViewCell"
|
||||
moduleName = "Vendoo"
|
||||
usesParentBreakpointCondition = "Yes"
|
||||
urlString = "file:///Users/okechi/Documents/iOs%20Practice/Kroleo/Vendoo/Vendoo_bb/Vendoo/Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506443695.962349"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "489"
|
||||
endingLineNumber = "489"
|
||||
offsetFromSymbolStart = "20537">
|
||||
</Location>
|
||||
</Locations>
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506417283.852662"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "387"
|
||||
endingLineNumber = "387"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/ItemTableViewController.swift"
|
||||
timestampString = "506441897.665422"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "463"
|
||||
endingLineNumber = "463"
|
||||
landmarkName = "tableView(_:cellForRowAtIndexPath:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "No"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/SignInViewController.swift"
|
||||
timestampString = "506442291.093686"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "64"
|
||||
endingLineNumber = "64"
|
||||
landmarkName = "signInUser(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
<BreakpointProxy
|
||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||
<BreakpointContent
|
||||
shouldBeEnabled = "Yes"
|
||||
ignoreCount = "0"
|
||||
continueAfterRunningActions = "No"
|
||||
filePath = "Vendoo/NetworkCollectionViewCell.swift"
|
||||
timestampString = "506443799.616654"
|
||||
startingColumnNumber = "9223372036854775807"
|
||||
endingColumnNumber = "9223372036854775807"
|
||||
startingLineNumber = "16"
|
||||
endingLineNumber = "16"
|
||||
landmarkName = "setImg(_:)"
|
||||
landmarkType = "5">
|
||||
</BreakpointContent>
|
||||
</BreakpointProxy>
|
||||
</Breakpoints>
|
||||
</Bucket>
|
||||
|
||||
@ -62,7 +62,10 @@ extension ItemCell: UICollectionViewDataSource{
|
||||
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
|
||||
let cell: NetworkCollectionViewCell! = self.networks.dequeueReusableCellWithReuseIdentifier("network", forIndexPath: indexPath) as! NetworkCollectionViewCell
|
||||
cell.setImg(selectedNetworks[indexPath.row])
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
cell.setImg(self.selectedNetworks[indexPath.row])
|
||||
})
|
||||
/*switch (indexPath.row){
|
||||
case 0:
|
||||
cell = collectionView.dequeueReusableCellWithReuseIdentifier("ebay", forIndexPath: indexPath)
|
||||
|
||||
@ -403,6 +403,7 @@ extension ItemTableViewController: UITableViewDataSource{
|
||||
|
||||
}
|
||||
|
||||
//draft listings
|
||||
}else{
|
||||
cell.itemImage.image = (self.tabBarController as? HomeViewController)?.draftListings[indexPath.row].images[0] //come back
|
||||
cell.itemName.text = (self.tabBarController as? HomeViewController)!.draftListings[indexPath.row].title
|
||||
|
||||
@ -87,6 +87,33 @@ extension SignInViewController {
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: {(action: UIAlertAction!) in
|
||||
}))
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
|
||||
//if request fails due to connectivity, then retry the login request
|
||||
}else if (error?.userInfo["NSUnderlyingError"]?.code == -1005 || error?.code == 17020){
|
||||
|
||||
var alert = UIAlertController(title: "Network Error", message: "There has been a problem connecting to the server. This could be due to various reasons such as having a slow or non existent connection or using an anonymity tool like a VPN service. Would you like to attempt to reconnect?", preferredStyle: .Alert)
|
||||
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: {(action: UIAlertAction!) in
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {() -> Void in
|
||||
var downloadGroup = dispatch_group_create()
|
||||
dispatch_group_enter(downloadGroup)
|
||||
dispatch_group_wait(downloadGroup, dispatch_time(DISPATCH_TIME_NOW, 5000000000))
|
||||
// Wait 5 seconds before trying again.
|
||||
dispatch_group_leave(downloadGroup)
|
||||
dispatch_async(dispatch_get_main_queue(), {() -> Void in
|
||||
//Main Queue stuff here
|
||||
//Redo the function that made the Request.
|
||||
self.signInUser(self)
|
||||
|
||||
})
|
||||
})
|
||||
}))
|
||||
alert.addAction(UIAlertAction(title: "Cancel", style: .Cancel, handler: {(action: UIAlertAction!) in
|
||||
}))
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
|
||||
return
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user