HBTSProvider

@interface HBTSProvider : NSObject

HBTSProvider is the class used to represent a provider. You should subclass HBTSProvider in your provider bundle, and then set it as the principal class in the Info.plist. A provider class is required even if it doesn’t implement any methods on its own.

  • The bundle identifier of the app corresponding to this provider. This typically does not need to be set, and will be populated by the HBTSApplicationBundleIdentifier value provided in the provider’s Info.plist.

    Declaration

    Objective-C

    @property (readwrite, retain, nonatomic, nullable) NSString *appIdentifier;

    Swift

    var appIdentifier: String? { get set }
  • Custom Preferences list controller bundle.

    If nil, a switch will be shown in Settings, and enabled/disabled state is handled by TypeStatus Plus. Otherwise, tapping the cell will push your list controller, and enabled state is handled by your code.

    See

    preferencesClass

    See

    isEnabled

    Declaration

    Objective-C

    @property (readwrite, retain, nonatomic, nullable) NSBundle *preferencesBundle;

    Swift

    var preferencesBundle: Bundle? { get set }
  • Custom Preferences list controller class.

    Refer to preferencesBundle for more details. If this is nil, the principal class of the bundle will be used.

    See

    preferencesBundle

    See

    isEnabled

    Declaration

    Objective-C

    @property (readwrite, retain, nonatomic, nullable) NSString *preferencesClass;

    Swift

    var preferencesClass: String? { get set }
  • Indicates whether the user has enabled the provider.

    If TypeStatus is disabled by the user, this property is set to NO. If a custom preference list controller is used, this property is set to YES and you are expected to handle enabled state separately from TypeStatus. Otherwise, this property is the enabled state of this provider as configured by the user.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) BOOL isEnabled;

    Swift

    var isEnabled: Bool { get }

    Return Value

    As described above.

  • Post a notification to be displayed to the user.

    See

    HBTSNotification

    Declaration

    Objective-C

    - (void)showNotification:(nonnull HBTSNotification *)notification;

    Swift

    func show(_ notification: HBTSNotification)

    Parameters

    notification

    An HBTSNotification to be displayed.

  • Hide the currently displayed TypeStatus notification, if any.

    This hides any notification, including ones that originated from another provider.

    Declaration

    Objective-C

    - (void)hideNotification;

    Swift

    func hideNotification()