Question

I have a plist where I would like to save a some response details from my server too, however the variables are of type uint32_t and plists do not have a whole lot of type options to choose from other than, number - string - array - dictionary etc.

so what is the best course of action? conversion? if so how would I go about doing this.

Was it helpful?

Solution

[ NSNumber numberWithInt: value ]

OTHER TIPS

When decoding, integer will automatically choose the best size, be it 32 or 64 bits. When encoding, you should specifically call [NSNumber numberWithUnsignedInt: ...] or a similar method to create an NSNumber of the right size. However, it will be encoded as integer anyway.

how to write an integer to a plist can be found here: http://ipgames.wordpress.com/tutorials/writeread-data-to-plist-file/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top