The following code is in SKYDatabase.m. And this function is called before saving the record to server.
- (void)od_prepareRecordForSaving:(SKYRecord *)record
{
if (![record isKindOfClass:[SKYRecord class]]) {
NSString *reason =
[NSString stringWithFormat:@"The given object %@ is not an SKYRecord.", record];
@throw
[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil];
}
if (!record.creationDate) {
record.creationDate = [NSDate date];
}
}
Last commit of these lines is 3 years ago, and the commit message of this logic is Copy ODKit source from AskQ. Also I cannot find the same logic in other SDK.
How I found this thing
I was testing my chat cache code with error response. I expected the creationDate of the record would be nil, but I found its not.
The following code is in
SKYDatabase.m
. And this function is called before saving the record to server.Last commit of these lines is 3 years ago, and the commit message of this logic is
Copy ODKit source from AskQ
. Also I cannot find the same logic in other SDK.How I found this thing
I was testing my chat cache code with error response. I expected the
creationDate
of the record would be nil, but I found its not.