Other Functions

The following functions are available globally.

  • Use the default PTAnalyticsManager to log the given exception.

    Declaration

    Objective-C

    extern void PTLogException(NSException *_Nonnull exception,
                               NSDictionary<id, id> *_Nullable extraData)

    Swift

    func PTLogException(_ exception: NSException, _ extraData: [AnyHashable : Any]?)

    Parameters

    exception

    the exception to log

    extraData

    extra information to pass along with the exception

  • Returns a localized version of a string, using the PTTools.toolsBundle bundle.

    Declaration

    Objective-C

    extern NSString *_Nonnull PTLocalizedString(NSString *_Nonnull key,
                                                NSString *_Nullable comment)

    Swift

    func PTLocalizedString(_ key: String, _ comment: String?) -> String
  • Returns a localized version of a string from the specified table, using the PTTools.toolsBundle bundle.

    Declaration

    Objective-C

    extern NSString *_Nonnull PTLocalizedStringFromTable(
        NSString *_Nonnull key, NSString *_Nullable table,
        NSString *_Nullable comment)

    Swift

    func PTLocalizedString(key: String, table: String?, comment: String?) -> String