I am a Jr Software Developer, can I just change the (unsigned) to (NSUInteger) or will to create problems later?
- (unsigned)retainCount
{
return UINT_MAX; //denotes an object that cannot be released
}
warning said
MKStoreManager.m:88:1: Conflicting return type in implementation of 'retainCount': 'NSUInteger' (aka 'unsigned long') vs 'unsigned int'
I found a previous definition
- (NSUInteger)retainCount OBJC_ARC_UNAVAILABLE;
Your method must return
NSUIntegerbecause that is how theretainCountmethod is defined inNSObject.The error is being caused by the value you are trying to return. Instead of returning
UINT_MAX, you should returnNSUIntegerMax.The underlying type for
NSUIntegerchanges depending on whether building for 32 or 64 bit. Accordingly, the value ofNSUIntegerMaxalso changes to match the type.