What exactly are the data types int 16, int 32 and int 64 on iPhone, in Core Data?

The Xcode data modeling model shows me three different types of int data. When I write code, what data types do correspond on the iPhone? Are they all just NSInteger wrapped in NSNumber?

As far as I understand, NSNumber only distinguishes int NSInteger ... so I think these three end almost the same way?

+4
source share
1 answer

These values ​​correspond to NSAttributeType NSAttributeDescription . They are similar to the strings returned by the NSValue objCType method inherited by NSNumber . The main database must know how to encode / decode the value in persistent storage, as well as the init method to call when creating the NSNumber object. Types in NSEntityDescription provide the ability to dynamically create the correct object from storage and save them again. Generally, you don't need to worry about the details of storing NSValue classes and subclasses. These details are hidden by purpose. If you are implementing your own NSAtomicStore, then you will need to know. For more information, see Atomic Store programming topics .

+4
source

Source: https://habr.com/ru/post/1312074/


All Articles