SCSAppEventList

@interface SCSAppEventList : NSObject <NSCopying>

The SCSAppEventList allows for matching specific schemes of URLs which may be received remotely. When a matching URL is detected it is removed from the original message, and results in a URL event which is flagged as being an AppEvent.

  • Initializer for generating a matching scheme for AppEvent URLs

    Declaration

    Objective-C

    - (nonnull instancetype)initWithScheme:(nonnull NSString *)scheme;

    Swift

    init(scheme: String)

    Parameters

    scheme

    the matching scheme to be applied against all incoming URLs.

  • Add a description to be associated with the matched URL.

    Declaration

    Objective-C

    - (void)addDescription:(nonnull NSString *)description
                   forPath:(nonnull NSString *)path;

    Swift

    func addDescription(_ description: String, forPath path: String)

    Parameters

    description

    The description for the associated URL.

    path

    The specific path on the URL which to associate with the description.

  • Add a description to be associated with the matched URL. Matching will occur in the order that the descriptions are added. You should add patterns in order: from the most specific to the most generic.

    For example if you add “.*” as an expression first, that will always match all paths provided on this instance. Note: Expressions are given priority when returning an associated description. It is recommended to use either direct path matching, or regex matching. Not both.

    Declaration

    Objective-C

    - (void)addDescription:(nonnull NSString *)description
            withExpression:(nonnull NSString *)expression;

    Swift

    func addDescription(_ description: String, withExpression expression: String)

    Parameters

    description

    The description for the associated URL.

    expression

    The regex expression which will be used to match against a provided url. The pattern must be a valid regex expression or it will be ignored.

  • Returns the description associated with the given path. The list of patterns will be searched in-order first. If no matches are found then it will attempt to directly match the description from the given path.

    Declaration

    Objective-C

    - (nullable NSString *)descriptionForPath:(nonnull NSString *)path;

    Swift

    func description(forPath path: String) -> String?

    Parameters

    path

    The description for the associated URL.

  • The custom URL scheme.

    Declaration

    Objective-C

    @property (nonatomic, readonly, strong) NSString *scheme

    Swift

    var scheme: String { get }