after supporting arm64, there are some problems when formatting strings, mainly related to the definition of Nsinteger:
#if __lp64__ | | (target_os_embedded &&!) Target_os_iphone) | | Target_os_win32 | | ns_build_32_like_64longlong Nsuinteger; #else intint Nsuinteger; #endif
In other words, when you format a string for Nsinteger, you need to use %ld, and in the case of the three digits, %d is required.
One workaround is to force type conversions.
the other way, is to format the string after it has been converted to nsnumber* using the literal syntax.
For example:
6 ; NSLog (@ "%@", @ (value)); NSString* test = [NSString stringWithFormat:@ "%@", @ (value)];
is actually converted to nsnumber object and then formatted, the disadvantage of course is more than one boxing process , but the code is easier to write, especially in the resource file given the string of time do not need to worry about whether to use%d or% ld.
formatting strings using literal syntax