squikend
squikend

Reputation: 269

Is it safe to archive Dictionary with String as a key?

According to Apple docs, hash value of string may not be stable across different invocations of app:

The hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs. Apple docs

Is it safe to archive (by NSArchive) dictionary of the following type [String: AnyObject]? If so, how Dictionary prevents from instability? Does it archive dictionary as array of tuples, like [(key, value)]?

Upvotes: 2

Views: 229

Answers (0)

Related Questions