MediaEventTemplate

@objc(UAMediaEventTemplate)
public class MediaEventTemplate : NSObject

A MediaEventTemplate represents a custom media event template for the application.

  • The event’s ID.

    Declaration

    Swift

    @objc
    public var identifier: String?
  • The event’s category.

    Declaration

    Swift

    @objc
    public var category: String?
  • The event’s type.

    Declaration

    Swift

    @objc
    public var type: String?
  • The event’s description.

    Declaration

    Swift

    @objc
    public var eventDescription: String?
  • YES if the event is a feature, else NO.

    Declaration

    Swift

    @objc
    public var isFeature: Bool { get set }
  • The event’s author. The author’s length must not exceed 255 characters or it will invalidate the event.

    Declaration

    Swift

    @objc
    public var author: String?
  • The event’s publishedDate. The publishedDate’s length must not exceed 255 characters or it will invalidate the event.

    Declaration

    Swift

    @objc
    public var publishedDate: String?
  • Factory method for creating a browsed content event template.

    Declaration

    Swift

    @objc
    public class func browsedTemplate() -> MediaEventTemplate

    Return Value

    A Media event template instance

  • Factory method for creating a starred content event template.

    Declaration

    Swift

    @objc
    public class func starredTemplate() -> MediaEventTemplate

    Return Value

    A Media event template instance

  • Factory method for creating a shared content event template.

    Declaration

    Swift

    @objc
    public class func sharedTemplate() -> MediaEventTemplate

    Return Value

    A Media event template instance

  • Factory method for creating a shared content event template. If the source or medium exceeds 255 characters it will cause the event to be invalid.

    Declaration

    Swift

    @objc(sharedTemplateWithSource:withMedium:)
    public class func sharedTemplate(source: String?, medium: String?)
        -> MediaEventTemplate

    Parameters

    source

    The source as an NSString.

    medium

    The medium as an NSString.

    Return Value

    A Media event template instance

  • Factory method for creating a consumed content event template.

    Declaration

    Swift

    @objc
    public class func consumedTemplate() -> MediaEventTemplate

    Return Value

    A Media event template instance

  • Factory method for creating a consumed content event template with a value.

    Declaration

    Swift

    @objc(consumedTemplateWithValueFromString:)
    public class func consumedTemplate(valueString: String?)
        -> MediaEventTemplate

    Parameters

    valueString

    The value of the event as as string. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.

    Return Value

    A Media event template instance

  • Factory method for creating a consumed content event template with a value.

    Declaration

    Swift

    @objc(consumedTemplateWithValue:)
    public class func consumedTemplate(value: NSNumber?) -> MediaEventTemplate

    Parameters

    value

    The value of the event. The value must be between -2^31 and 2^31 - 1 or it will invalidate the event.

    Return Value

    A Media event template instance

  • Creates the custom media event.

    Declaration

    Swift

    @objc
    public func createEvent() -> CustomEvent