I\'ve an NSData object, the length is 4 bytes .These four bytes i\'m extracting from another NSData object using ,
fourByteData=[completeData subdataWithRang
It depends on the Endianness notation of the data you want to convert, in relation to your device Endianness notation. wiki on Endianness
To keep it simple you need to check does two method
NSData *data4 = [completeData subdataWithRange:NSMakeRange(0, 4)];
int value = CFSwapInt32BigToHost(*(int*)([data4 bytes]));
or
NSData *data4 = [completeData subdataWithRange:NSMakeRange(0, 4)];
int value = CFSwapInt32LittleToHost(*(int*)([data4 bytes]));
And check which one make more sense when you parse the data.