AWSPinpointTargetingClient
Objective-C
@interface AWSPinpointTargetingClient : NSObject
///
/// Returns the current endpoint.
/// - Warning: Calling this method from a non-main thread might result in a deadlock if the main queue is blocked
/// - Returns: An AWSPinpointEndpoint
- (AWSPinpointEndpointProfile*) currentEndpointProfile;
///
/// Requests the current endpoint.
/// - Parameter completion: a block that is called with the current endpoint
- (void) currentEndpointProfileWithCompletion:(void (^_Nonnull)(AWSPinpointEndpointProfile *profile))completion;
/**
* Sends an update of the current endpoint
*/
- (AWSTask *)updateEndpointProfile;
/**
* Updates with the provided endpoint profile, AWSPinpointTargetingClient attributes and metrics are added to the profile.
*/
- (AWSTask *)updateEndpointProfile:(AWSPinpointEndpointProfile*) endpointProfile;
/**
* Adds the specified attribute to the current endpoint profile generated by this client.
* @param theValue A list of strings with the values of the attribute
* @param theKey the name of the attribute to add
*/
- (void)addAttribute:(NSArray *)theValue
forKey:(NSString *)theKey;
/**
* Removes the specified attribute from the current endpoint profile generated by this client.
* @param theKey the key of the attribute to remove
*/
- (void)removeAttributeForKey:(NSString*) theKey;
/**
* Adds the specified metric to the current endpoint profile generated by this client.
* @param theValue the value of the metric
* @param theKey the name of the metric to add
*/
- (void)addMetric:(NSNumber *)theValue
forKey:(NSString *)theKey;
/**
* Removes the specified metric from the current endpoint profile generated by this client.
* @param theKey the key of the metric to remove
*/
- (void)removeMetricForKey:(NSString*) theKey;
@end
Swift
class AWSPinpointTargetingClient : NSObject
Undocumented
-
Returns the current endpoint.
Warning
Calling this method from a non-main thread might result in a deadlock if the main queue is blockedDeclaration
Objective-C
- (nonnull AWSPinpointEndpointProfile *)currentEndpointProfile;
Swift
func currentEndpointProfile() -> AWSPinpointEndpointProfile
Return Value
An AWSPinpointEndpoint
-
Requests the current endpoint.
Declaration
Objective-C
- (void)currentEndpointProfileWithCompletion: (void (^_Nonnull)(AWSPinpointEndpointProfile *_Nonnull))completion;
Swift
func currentEndpointProfile() async -> AWSPinpointEndpointProfile
-
Sends an update of the current endpoint
Declaration
Objective-C
- (nonnull AWSTask *)updateEndpointProfile;
Swift
func updateEndpointProfile() -> AWSTask
-
Updates with the provided endpoint profile, AWSPinpointTargetingClient attributes and metrics are added to the profile.
Declaration
Objective-C
- (nonnull AWSTask *)updateEndpointProfile: (nonnull AWSPinpointEndpointProfile *)endpointProfile;
Swift
func update(_ endpointProfile: AWSPinpointEndpointProfile) -> AWSTask
-
Adds the specified attribute to the current endpoint profile generated by this client.
Declaration
Objective-C
- (void)addAttribute:(nonnull NSArray *)theValue forKey:(nonnull NSString *)theKey;
Swift
func addAttribute(_ theValue: [Any], forKey theKey: String)
Parameters
theValue
A list of strings with the values of the attribute
theKey
the name of the attribute to add
-
Removes the specified attribute from the current endpoint profile generated by this client.
Declaration
Objective-C
- (void)removeAttributeForKey:(nonnull NSString *)theKey;
Swift
func removeAttribute(forKey theKey: String)
Parameters
theKey
the key of the attribute to remove
-
Adds the specified metric to the current endpoint profile generated by this client.
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 name of the metric to add
-
Removes the specified metric from the current endpoint profile generated by this client.
Declaration
Objective-C
- (void)removeMetricForKey:(nonnull NSString *)theKey;
Swift
func removeMetric(forKey theKey: String)
Parameters
theKey
the key of the metric to remove