I have stored messages in Firebase like so:
messageObject["timestamp"] = FIRServerValue.timestamp()
The objects have a child like: timestamp: 1465222757817
. The problem is that older non 64 bit devices cannot handle Integers of that length. What would be a good workaraound for this problem?
Edit:
When declaring the timestamp as Int64
, it throws an error:
var timestampQueryValue: Int64 = 1465222757817
self.chatRef.queryOrderedByChild("timestamp")
.queryStartingAtValue(timestampQueryValue)
.observeEventType(.ChildAdded, withBlock: {
(snapshot) -> Void in /* ... */ })
/* Error: Cannot convert value of type 'Int64'
to expected argument type 'AnyObject?' */