Braze iOS SDK
Documentation for the Braze iOS SDK
 All Classes Functions Properties
Instance Methods | Class Methods | Properties | List of all members
ABKContentCard Class Reference

Instance Methods

(nullable NSData *) - serializeToData
 
(void) - logContentCardImpression
 
(void) - logContentCardClicked
 
(void) - logContentCardDismissed
 
(BOOL) - isControlCard
 
(BOOL) - hasSameId:
 

Class Methods

(nullable ABKContentCard *) + deserializeCardFromDictionary:
 

Properties

NSString * idString
 
BOOL viewed
 
double created
 
double expiresAt
 
BOOL dismissible
 
BOOL pinned
 
BOOL dismissed
 
BOOL clicked
 
NSDictionary * extras
 
BOOL isTest
 
NSString * urlString
 
BOOL openUrlInWebView
 

Method Documentation

+ (nullable ABKContentCard *) deserializeCardFromDictionary: (nullable NSDictionary *)  cardDictionary
Parameters
cardDictionaryThe dictionary for card deserialization.

Deserializes the dictionary to a card for use by wrappers such as Braze's Unity SDK for iOS. When the deserialization isn't successful, this method returns nil; otherwise, it returns the deserialized card.

- (void) logContentCardClicked

Manually log a click to Braze for the card. This should only be used for custom contentcard view controllers.

- (void) logContentCardDismissed

Manually dismiss a card. Sets the card's dismissed property to YES and logs the dismissal to Braze. Only has effect if the card is dismissible and if the dismissed property is currently set to NO.

- (void) logContentCardImpression

Manually log an impression to Braze for the card. This should only be used for custom content card view controllers.

- (nullable NSData *) serializeToData

Serializes the card to binary data for use by wrappers such as Braze's Unity SDK for iOS.

Property Documentation

- (BOOL) clicked
readwritenonatomicassign

This property reflects if the card has been clicked.

- (double) created
readnonatomicassign

The property is the unix timestamp of the card's creation time from Braze dashboard.

- (BOOL) dismissed
readwritenonatomicassign

This property reflects if the card has been dimissed.

- (BOOL) dismissible
readwritenonatomicassign

This property reflects if the card can be dismissed by the user.

- (double) expiresAt
readatomicassign

The property is the unix timestamp of the card's expiration time. When the value is less than 0, it means the card doesn't an expire date.

- (NSDictionary*) extras
readwriteatomicstrong

This property carries extra data in the form of an NSDictionary which can be sent down via the Braze Dashboard. You may want to design and implement a custom handler to access this data depending on your use case.

- (NSString*) idString
readatomicassign

Card's ID.

- (BOOL) isTest
readnonatomicassign

This property is set to YES if the instance represents a test content card

- (BOOL) openUrlInWebView
readwriteatomic

When the card's urlString is not nil, if the property is set to YES, the URL will be opened in a modal WKWebView inside the app. If this property is set to NO, the URL will be opened by the OS and web URLs will be opened in an external web browser app.

This property defaults to NO.

- (BOOL) pinned
readwritenonatomicassign

This property reflects if the card has been pinned by the user.

- (NSString*) urlString
readwriteatomiccopy

The URL string that will be opened after the card is clicked on.

- (BOOL) viewed
readwritenonatomicassign

This property reflects if the card is read or unread by the user.