I have this code which works well but I don’t know if it is the correct way to call stringWithFormat because in the documentation %d is for int and I’m passing a long:
long seconds = (long)[[NSDate date]timeIntervalSince1970];
NSString *unixTimestamp = [NSString stringWithFormat:@"date=%d", seconds];
Thanks in advance!
Try
%ld:Abstract from printf docs (NSString’s stringWithFormat format follows the same standard as printf function):