Difference between revisions of "Getting Started with CoreData"

From PeformIQ Upgrade
Jump to navigation Jump to search
(Created page with "=Initial Thoughts= Create a new SwiftUI app selecting the uses CodeData option and then define some schema. In this case I plan to derive from the USGS Earthquake monthly summary data =Links= * * * Category:CoreData Category:IOS Category:Apple Category:Database")
 
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
=Links=
=Links=


*
* https://developer.apple.com/documentation/coredata
*
* https://developer.apple.com/documentation/coredata/setting_up_a_core_data_stack
* https://www.raywenderlich.com/7569-getting-started-with-core-data-tutorial (iOS 12 - So may be dated)
* https://www.oneclickitsolution.com/blog/getting-started-with-core-data-fundamentals/
*  
*  
=Attribute Types=
Looks like NSAttributeType is now deprecated!
* https://developer.apple.com/documentation/coredata/nsattributedescription#//apple_ref/occ/cl/NSAttributeDescription
* https://developer.apple.com/documentation/coredata/nsattributetype
<pre>
typedef enum {
    NSUndefinedAttributeType = 0,
    NSInteger16AttributeType = 100,
    NSInteger32AttributeType = 200,
    NSInteger64AttributeType = 300,
    NSDecimalAttributeType = 400,
    NSDoubleAttributeType = 500,
    NSFloatAttributeType = 600,
    NSStringAttributeType = 700,
    NSBooleanAttributeType = 800,
    NSDateAttributeType = 900,
    NSBinaryDataAttributeType = 1000,
    NSTransformableAttributeType = 1800,
    NSObjectIDAttributeType = 2000
} NSAttributeType;
</pre>
This means the types available are:
<pre>
Undefined/transient,
short,
integer,
long,
float,
double,
NSDecimalNumber,
NSString,
Boolean,
NSDate,
NSData,
Value transformers,
and id
</pre>


[[Category:CoreData]]
[[Category:CoreData]]

Latest revision as of 02:47, 8 July 2022

Initial Thoughts

Create a new SwiftUI app selecting the uses CodeData option and then define some schema. In this case I plan to derive from the USGS Earthquake monthly summary data



Links

Attribute Types

Looks like NSAttributeType is now deprecated!

typedef enum {
    NSUndefinedAttributeType = 0,
    NSInteger16AttributeType = 100,
    NSInteger32AttributeType = 200,
    NSInteger64AttributeType = 300,
    NSDecimalAttributeType = 400,
    NSDoubleAttributeType = 500,
    NSFloatAttributeType = 600,
    NSStringAttributeType = 700,
    NSBooleanAttributeType = 800,
    NSDateAttributeType = 900,
    NSBinaryDataAttributeType = 1000,
    NSTransformableAttributeType = 1800,
    NSObjectIDAttributeType = 2000
} NSAttributeType;

This means the types available are:

Undefined/transient,
short,
integer,
long,
float,
double,
NSDecimalNumber,
NSString,
Boolean,
NSDate,
NSData,
Value transformers,
and id