Reputation: 3604
This is kinda bizarre for such a stalwart devtool like Xcode. But i have an NSLog as follows:
NSLog(@"getting request via remote notif.. with state: %d", application.applicationState);
and compiler warnings to change it to:
NSLog(@"getting request via remote notif.. with state: %ld", application.applicationState);
And on the very next compile, i get the exact same warnings but in reversed!
how odd..anyone know the real issue?
Upvotes: 0
Views: 79
Reputation: 26336
To support logging in a 64 bit environment, you should always use %ld
and then cast your integer to long
ie.
NSLog(@"blablabla with state: %ld", (long)application.applicationState);
See String Format Specifiers for more info.
Upvotes: 2