UAComponent

@interface UAComponent : NSObject

Base class for main SDK components.

  • UAComponent initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDataStore:
        (nonnull UAPreferenceDataStore *)dataStore;

    Swift

    init(dataStore: UAPreferenceDataStore)

    Parameters

    dataStore

    The component’s preference data store.

  • Called when the shared UAirship instance is ready. Subclasses can override this method to perform additional setup after initialization.

    Note

    This method should not be used externally.

    Declaration

    Objective-C

    - (void)airshipReady:(nonnull UAirship *)airship;

    Swift

    func airshipReady(_ airship: UAirship)

    Parameters

    airship

    The shared UAirship instance.

  • Determines whether the component is currently enabled.

    Declaration

    Objective-C

    - (BOOL)componentEnabled;

    Swift

    func componentEnabled() -> Bool

    Return Value

    YES if the component is enabled, otherwise NO.