Answer the question
In order to leave comments, you need to log in
How to adapt an application for x64?
Good day, please tell me how to adapt the application for x64, for example I write:
For x32
stringNumbersYearsUser = [NSString stringWithFormat:@"%d", [stringTodayYear integerValue] - [stringYearsUsers integerValue] - 1];
stringNumbersYearsUser = [NSString stringWithFormat:@"%ld", [stringTodayYear integerValue] - [stringYearsUsers integerValue]];
Answer the question
In order to leave comments, you need to log in
So that there are no warnings, we bring it to a 64-bit value and output it already
NSInteger notifyID = 5;
NSLog(@"%ld, (long)notifyID);
It's all about the size of long in the system. The integerValue method returns an NSInteger, which is defined as typedef long NSInteger. Accordingly, in a 32-bit system it is 4 bytes, and in a 64-bit system it is 8 bytes, to display a number with a greater bit depth, you need to change the format specifier. I suppose it's enough to leave ld and forget about 32-bit warning
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question