No matter what I try, I can’t seem to update these two columns. self.arcade.finds just will not update. I can update other properties of Arcade but just not anything that is an Int or Double. I tried many different things such as Backendless.sharedInstance().of(Arcade.ofClass()). Please Help. This is the exact code in the API. Here is the code I am currently using to update:
print("Before changing anything, here is my finds: \(self.arcade.finds)")
print("Here is my object ID: \(self.arcade.objectId)")
// Change Finds
self.arcade.finds = 4
print("Now here are my finds \(self.arcade.finds)")
// Time to update the value
var error: Fault?
let updatedArcade = Backendless.sharedInstance().data.save(self.arcade, error: &error) as? Arcade
if error == nil {
print("Arcade has been updated. Finds now: \(updatedArcade!.finds)")
}
else {
print("Server reported an error (2): \(error)")
}
Here is Arcade class:
class Arcade: NSObject {
var name:String!
var objectId:String!
var finds:Int! = 1
var notFinds:Int! = 0
var lastSeen = NSDate()
var geoPoint:GeoPoint? // This should be something that can hold a lat and long
var URL:String!
}
Here is my log:
Before changing anything, here are my finds: 1
Here is my object ID: 1187DB6C-DCF2-5F01-FF91-F0878B00E200
Now here are my finds 4
Arcade has been updated. Finds now: 1