I have a fair amount of string format specifiers in NSLog / NSAssert etc. calls which use %d and %u with NSInteger (= int on 32bit) an
%d
%u
NSInteger (= int on 32bit)
You can also use %zd (NSInteger) and %tu (NSUInteger) when logging to the console.
%zd
NSInteger
%tu
NSUInteger
NSInteger integer = 1; NSLog(@"first number: %zd", integer); NSUInteger uinteger = 1; NSLog(@"second number: %tu", uinteger);
Also to be found here.