I've created two apps, call them server and client. The xcode projects for both of these apps use common sub-projects. The apps are designed for a specific customer to run on iOS7/iPad
For testing, I am compiling the server app and running it on an iPad 3. The client app is running on an Air. Xcode throws up a bunch of warnings when I compile for the iPad3 and its because the NSInteger/NSUInteger types are 32 bit and the logic I'm using (in this case NSString with format %lu) is complaining (because it was written for 64bit)
But even more troubling is that I use NSKeyArchiving to package data from one iPad to send to the other - I'm guessing I'm going to run into an issue if the data stored in these types exceeds 32 bits.
It looks like I need to standardise on another base type such as UInt32 rather than NSUInteger - is that right approach? Any other tips?
EDIT: Here's one example:
+ (NSUInteger)nextTransactionNumber
{
static int64_t currentTransactionNumber = 0;
OSAtomicIncrement64(¤tTransactionNumber);
return currentTransactionNumber;
}
This compiles fine for 64bit, but has grief on the return for 32bit. So am I better to use Uint32?