SITResource
Objective-C
@interface SITResource : NSObject <SITMapperProtocol>
Swift
class SITResource : NSObject, SITMapperProtocol
Abstract base class with common properties across Resources
-
Create a resource
Declaration
Objective-C
- (instancetype _Nonnull)initWithIdentifier:(NSString *_Nonnull)identifier createdAt:(NSDate *_Nonnull)createdAt updatedAt:(NSDate *_Nonnull)updatedAt customFields: (NSDictionary *_Nonnull)customFields;Swift
init(identifier: String, createdAt: Date, updatedAt: Date, customFields: [AnyHashable : Any])Parameters
identifierIdentifier of the resource
createdAtCreation date
updatedAtLast updated date
customFieldsKey-Value pairs that can be used to store information
Return Value
SITResource
-
Unique identifier of the resource
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nonnull identifier;Swift
var identifier: String { get set } -
Date containing the time when a resource was first created.
Declaration
Objective-C
@property (nonatomic, strong) NSDate *_Nonnull createdAt;Swift
var createdAt: Date { get set } -
Date containing the time when a resource was last updated.
Declaration
Objective-C
@property (nonatomic, strong) NSDate *_Nonnull updatedAt;Swift
var updatedAt: Date { get set } -
A dictionary containing additional information not managed by Situm SDK
Note
You can use this property to insert personalized content for your application. It will be loaded with the contents inserted on the web app.Declaration
Objective-C
@property (nonatomic, strong) NSDictionary *_Nonnull customFields;Swift
var customFields: [AnyHashable : Any] { get set }