What is the difference between "attribute" and "property" in restkit

I am new to the iOS RestKit framework. I read the document and still can not understand the differences between the "attribute" and the "property" in RestKit.

Since the document has

- addPropertyMappingsFromArray:

and

– addAttributeMappingsFromArray:

I know that when assigning relationships, I must use the first. However, I still cannot understand the differences.

+8
ios restkit
source share
1 answer

I just stumbled upon this myself. Naming can definitely be clearer.

- addAttributeMappingsFromArray: refers to what you expect: class attribute mapping. - addPropertyMappingsFromArray: on the other hand, refers to RKPropertyMapping objects.

If you look at the source of RestKit, you will see that all addAttributeMappings methods are a convenient abstraction on top of addPropertyMappings methods and take care of creating the necessary RKPropertyMapping objects for you.

+5
source share

All Articles