質問

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.

役に立ちましたか?

解決

[ NSNumber numberWithInt: value ]

他のヒント

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/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top