Functions

The following functions are available globally.

  • Express the input dictionary as a application/x-www-form-urlencoded string. If the parameters dictionary is nil or empty, returns nil.

    Declaration

    Objective-C

    NSString *_Nonnull ARTFormEncode(NSDictionary *_Nonnull parameters)

    Swift

    func ARTFormEncode(_ parameters: [AnyHashable : Any]) -> String
  • Undocumented

    Declaration

    Objective-C

    ARTScheduledBlockHandle *artDispatchScheduled(NSTimeInterval seconds, dispatch_queue_t queue, dispatch_block_t block)

    Swift

    func artDispatchScheduled(_ seconds: TimeInterval, _ queue: dispatch_queue_t!, _ block: (() -> Void)!) -> ARTScheduledBlockHandle!
  • Undocumented

    Declaration

    Objective-C

    static inline void artDispatchCancel(ARTScheduledBlockHandle *handle) {
        if (handle) {
            [handle cancel];
        }
    }

    Swift

    func artDispatchCancel(_ handle: ARTScheduledBlockHandle!)
  • Undocumented

    Declaration

    Objective-C

    NSString* ARTAPNSDeviceTokenKeyOfType(NSString * _Nullable tokenType)

    Swift

    func ARTAPNSDeviceTokenKeyOfType(_ tokenType: String?) -> String
  • Undocumented

    Declaration

    Objective-C

    NSString *_Nonnull ARTMessageActionToStr(ARTMessageAction action)

    Swift

    func ARTMessageActionToStr(_ action: ARTMessageAction) -> String
  • A static method that takes the value of one of the keys in the Message.annotations.summary object for the distinct.v1 annotation type, and outputs a strongly-typed summary entry.

    Declaration

    Objective-C

    NSDictionary<NSString *, ARTSummaryClientIdList *>
        *_Nullable ARTSummaryDistinctV1(NSDictionary *_Nullable dictionary)

    Swift

    func ARTSummaryDistinctV1(_ dictionary: [AnyHashable : Any]?) -> [String : ARTSummaryClientIdList]?

    Parameters

    dictionary

    The value of one of the keys of the Message.annotations.summary.

    Return Value

    Map of annotation name to aggregated annotations.

  • A static method that takes the value of one of the keys in the Message.annotations.summary object for the unique.v1 annotation type, and outputs a strongly-typed summary entry.

    Declaration

    Objective-C

    NSDictionary<NSString *, ARTSummaryClientIdList *>
        *_Nullable ARTSummaryUniqueV1(NSDictionary *_Nullable dictionary)

    Swift

    func ARTSummaryUniqueV1(_ dictionary: [AnyHashable : Any]?) -> [String : ARTSummaryClientIdList]?

    Parameters

    dictionary

    The value of one of the keys of the Message.annotations.summary.

    Return Value

    Map of annotation name to aggregated annotations.

  • A static method that takes the value of one of the keys in the Message.annotations.summary object for the multiple.v1 annotation type, and outputs a strongly-typed summary entry.

    Declaration

    Objective-C

    NSDictionary<NSString *, ARTSummaryClientIdCounts *>
        *_Nullable ARTSummaryMultipleV1(NSDictionary *_Nullable dictionary)

    Swift

    func ARTSummaryMultipleV1(_ dictionary: [AnyHashable : Any]?) -> [String : ARTSummaryClientIdCounts]?

    Parameters

    dictionary

    The value of one of the keys of the Message.annotations.summary.

    Return Value

    Map of annotation name to aggregated annotations.

  • A static factory method that takes the value of one of the keys in the Message.annotations.summary object for the flag.v1 annotation type, and outputs a strongly-typed summary entry.

    Declaration

    Objective-C

    ARTSummaryClientIdList *_Nullable ARTSummaryFlagV1(
        NSDictionary *_Nullable dictionary)

    Swift

    func ARTSummaryFlagV1(_ dictionary: [AnyHashable : Any]?) -> ARTSummaryClientIdList?

    Parameters

    dictionary

    The value of one of the keys of the Message.annotations.summary.

    Return Value

    Aggregated annotations.

  • A static factory method that takes the value of one of the keys in the Message.annotations.summary object for the total.v1 annotation type, and outputs a strongly-typed summary entry.

    Declaration

    Objective-C

    ARTSummaryTotal *_Nullable ARTSummaryTotalV1(NSDictionary *_Nullable dictionary)

    Swift

    func ARTSummaryTotalV1(_ dictionary: [AnyHashable : Any]?) -> ARTSummaryTotal?

    Parameters

    dictionary

    The value of one of the keys of the Message.annotations.summary.

    Return Value

    Aggregated total summary.