CLASS
HaapiUIKitApplicationBuilder
Contents
- Methods
init(haapiUIKitConfiguration:)setThemingPlistFileName(_:and:)setDataMapper(_:)setOAuthDataMapper(_:)setGenericClientOperationHandler(_:)setViewControllerFactoryRegistry(registry:)buildOrThrow()build()
public class HaapiUIKitApplicationBuilder
A builder-pattern class, designed to build an HaapiUIKitApplication.
- Note:
HaapiUIKitApplicationBuilder.build()must be invoked indidFinishLaunchingWithOptionsmethod.
Methods
init(haapiUIKitConfiguration:)
public init(haapiUIKitConfiguration: HaapiUIKitConfiguration)
Initializes the Builder with the mandatory parameter.
- Parameters:
- haapiUIKitConfiguration: An
HaapiUIKitConfiguration.
- haapiUIKitConfiguration: An
Parameters
| Name | Description |
|---|---|
| haapiUIKitConfiguration | An HaapiUIKitConfiguration. |
setThemingPlistFileName(_:and:)
public func setThemingPlistFileName(_ plistFileName: String,
and bundle: Bundle = .main) -> HaapiUIKitApplicationBuilder
Sets the theming plist file name and the bundle.
- Parameters:
- plistFileName: The plist file name which contains the configuration for the theming.
- bundle: The bundle.
Parameters
| Name | Description |
|---|---|
| plistFileName | The plist file name which contains the configuration for the theming. |
| bundle | The bundle. |
setDataMapper(_:)
public func setDataMapper(_ dataMapper: DataMapper) -> HaapiUIKitApplicationBuilder
Sets a custom data mapper. The default value uses an internal data mapper.
- Experiment: This is an experimental API. It may be changed or removed in the future.
setOAuthDataMapper(_:)
public func setOAuthDataMapper(_ oAuthDataMapper: OAuthDataMapper) -> HaapiUIKitApplicationBuilder
Sets a custom OAuth data mapper. The default value uses an internal data mapper.
- Experiment: This is an experimental API. It may be changed or removed in the future.
setGenericClientOperationHandler(_:)
public func setGenericClientOperationHandler(_ value: GenericClientOperationHandler) -> HaapiUIKitApplicationBuilder
Sets a custom GenericClientOperationHandler. The default value uses an internal implementation that always executes the failure behaviour.
setViewControllerFactoryRegistry(registry:)
public func setViewControllerFactoryRegistry(
registry: ViewControllerFactoryRegistry
) -> HaapiUIKitApplicationBuilder
Sets a custom ViewControllerFactoryRegistry.
- Parameters:
- registry: The
ViewControllerFactoryRegistryin which the custom factories have been registered.
- registry: The
- Experiment: This is an experimental API. It may be changed or removed in the future.
Parameters
| Name | Description |
|---|---|
| registry | The ViewControllerFactoryRegistry in which the custom factories have been registered. |
buildOrThrow()
public func buildOrThrow() throws -> HaapiUIKitApplication
Builds an Haapi UIKit application.
- Returns: An instance conforming to
HaapiUIKitApplication. - Throws: If the theme configuration was not properly configured, an
HaapiErroris thrown.
build()
public func build() -> HaapiUIKitApplication
Builds an Haapi UIKit application.
- Returns: An instance conforming to
HaapiUIKitApplication. - Warning: If the theme configuration was not properly configured, a
fatalErroris thrown.