AWSPinpointEndpointProfile

Objective-C

@interface AWSPinpointEndpointProfile : NSObject

Swift

class AWSPinpointEndpointProfile : NSObject

The Endpoint profile contains information about the device/user to be target for messaging.

  • The Pinpoint Application ID @returns applicationId

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nonnull applicationId;

    Swift

    var applicationId: String { get set }
  • The Endpoint ID is the unique identifier of this device @returns endpointId

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull endpointId;

    Swift

    var endpointId: String { get }
  • The Channel type defaults to APNS @returns channelType

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nullable channelType;

    Swift

    var channelType: String? { get }
  • The address is the token returned from APNS to be used to send push notifications @returns address

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nullable address;

    Swift

    var address: String? { get set }
  • A string representing the opt out option of the endpoint profile. It defaults to ALL or NONE depending on if the user has allowed remote push notifications. @returns optOut

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nullable optOut;

    Swift

    var optOut: String? { get set }
  • The effectiveDate of the profile Defaults to current time @returns effectiveDate

    Declaration

    Objective-C

    @property (nonatomic, readonly) UTCTimeMillis effectiveDate;

    Swift

    var effectiveDate: UTCTimeMillis { get }
  • The AWSPinpointEndpointProfileLocation facet of the endpoint profile @returns location

    Declaration

    Objective-C

    @property (nonatomic) AWSPinpointEndpointProfileLocation *_Nullable location;

    Swift

    var location: AWSPinpointEndpointProfileLocation? { get set }
  • The AWSPinpointEndpointProfileDemographic facet of the endpoint profile @returns demographic

    Declaration

    Objective-C

    @property (nonatomic) AWSPinpointEndpointProfileDemographic *_Nullable demographic;

    Swift

    var demographic: AWSPinpointEndpointProfileDemographic? { get set }
  • The AWSPinpointEndpointProfileDemographic facet that, if it is set, will overwrite the default demographic for subsequent requests to Pinpoint @returns demographic

    Declaration

    Objective-C

    @property (nonatomic, strong) AWSPinpointEndpointProfileDemographic *_Nullable customDemographic;

    Swift

    var customDemographic: AWSPinpointEndpointProfileDemographic? { get set }
  • The AWSPinpointEndpointProfileUser facet of the endpoint profile @returns user

    Declaration

    Objective-C

    @property (nonatomic) AWSPinpointEndpointProfileUser *_Nullable user;

    Swift

    var user: AWSPinpointEndpointProfileUser? { get set }
  • An AWSPinpointEndpointProfile object with the specified applicationId and endpointId @returns AWSPinpointEndpointProfile

    Declaration

    Objective-C

    - (nonnull instancetype)initWithApplicationId:(nonnull NSString *)applicationId
                                       endpointId:(nonnull NSString *)endpointId;

    Swift

    init(applicationId: String, endpointId: String)
  • An AWSPinpointEndpointProfile object with the specified context @returns AWSPinpointEndpointProfile

    Declaration

    Objective-C

    - (nonnull instancetype)initWithContext:(nonnull AWSPinpointContext *)context;

    Swift

    init(context: AWSPinpointContext)
  • Adds an attribute to this AWSPinpointEndpointProfile with the specified key. Only 40 attributes/metrics are allowed to be added to an AWSPinpointEndpointProfile. If 40 attributes/metrics already exist on this AWSPinpointEndpointProfile, the call is ignored.

    Declaration

    Objective-C

    - (void)addAttribute:(nonnull NSArray *)theValue
                  forKey:(nonnull NSString *)theKey;

    Swift

    func addAttribute(_ theValue: [Any], forKey theKey: String)

    Parameters

    theValue

    The value of the attribute. The value will be truncated if it exceeds 200 characters.

    theKey

    The key of the attribute. The key will be truncated if it exceeds 50 characters.

  • Returns the value of the attribute with the specified key.

    Declaration

    Objective-C

    - (nonnull NSArray *)attributeForKey:(nonnull NSString *)theKey;

    Swift

    func attribute(forKey theKey: String) -> [Any]

    Parameters

    theKey

    The key of the attribute to return @returns The attribute with the specified key, or null if attribute does not exist

  • Determines if this AWSPinpointEndpointProfile contains a specific attribute

    Declaration

    Objective-C

    - (BOOL)hasAttributeForKey:(nonnull NSString *)theKey;

    Swift

    func hasAttribute(forKey theKey: String) -> Bool

    Parameters

    theKey

    The key of the attribute @returns YES if this AWSPinpointEndpointProfile has an attribute with the specified key, NO otherwise

  • Returns an Dictionary of all attributes contained within this AWSPinpointEndpointProfile @returns an Dictionary of all attributes, where the attribute keys are the keys and the attribute values are the values

    Declaration

    Objective-C

    - (nonnull NSDictionary *)allAttributes;

    Swift

    func allAttributes() -> [AnyHashable : Any]
  • Adds a metric to this AWSPinpointEndpointProfile with the specified key. Only 40 attributes/metrics are allowed to be added to an AWSPinpointEndpointProfile. If 40 attribute/metrics already exist on this AWSPinpointEndpointProfile, the call is ignored.

    Declaration

    Objective-C

    - (void)addMetric:(nonnull NSNumber *)theValue
               forKey:(nonnull NSString *)theKey;

    Swift

    func addMetric(_ theValue: NSNumber, forKey theKey: String)

    Parameters

    theValue

    The value of the metric.

    theKey

    The key of the metric. The key will be truncated if it exceeds 50 characters.

  • Returns the value of the metric with the specified key.

    Declaration

    Objective-C

    - (nonnull NSNumber *)metricForKey:(nonnull NSString *)theKey;

    Swift

    func metric(forKey theKey: String) -> NSNumber

    Parameters

    theKey

    The key of the metric to return @returns The metric with the specified key, or null if metric does not exist

  • Determines if this AWSPinpointEndpointProfile contains a specific metric

    Declaration

    Objective-C

    - (BOOL)hasMetricForKey:(nonnull NSString *)theKey;

    Swift

    func hasMetric(forKey theKey: String) -> Bool

    Parameters

    theKey

    The key of the metric @returns YES if this AWSPinpointEndpointProfile has a metric with the specified key, NO otherwise

  • Returns an Dictionary of all metrics contained within this AWSPinpointEndpointProfile @returns an Dictionary of all metrics, where the metric keys are the keys and the metric values are the values

    Declaration

    Objective-C

    - (nonnull NSDictionary *)allMetrics;

    Swift

    func allMetrics() -> [AnyHashable : Any]
  • Returns an Dictionary representation of this object. @returns an Dictionary representation of this AWSPinpointEndpointProfile object.

    Declaration

    Objective-C

    - (nonnull NSDictionary *)toDictionary;

    Swift

    func toDictionary() -> [AnyHashable : Any]