1 min read

Content

Last Updated - Platform 20.0 - SDK 15.0

account

The Account (or Account Content) screen is the landing screen of the Account feature.

Different content can be presented to logged in vs guest users. This can be configured on the CMS through the My Profile tab which is only available to users with account, and should be enabled through MB.

account overview

To navigate to the Account tab use:

myprofile

Builder

Use a AccountBuilder to build a AccountViewController.

let viewController = AccountBuilder()
.withServiceMiddleware(.customAccountService())
.build() as CustomLoginViewController

Generics

  • Replace AccountState using the generic AccountBuilder<CustomState> constraint.
  • Replace AccountViewController with a subclass by inferring using .build() as CustomViewController.

Reducers

  • Replace serviceReducer or use .withServiceReducer() to all updates to the state.
  • Add additional reducers using .withReducer().

Middleware

  • Replace serviceMiddleware or use .withServiceMiddleware() to handle fetching content.
  • Replace routerMiddleware or use .withRouterMiddleware() to handle navigation.
  • Replace analyticsMiddleware or use .withAnalyticsMiddleware() to handle analytics.
  • Add additional middleware using .withMiddleware().

Presentation

  • Replace view, use .withView() or use containers to replace the view.
  • Replace viewDataMapper, use .withViewDataMapper() or use containers to replace the mapper.

Building

  • Use .build() to return the view controller.
  • Use .build(with:) to customise the initial state.

Injection

Use Container.shared to customise services, mappers, views and more. Put this code at the beginning of setUpAccount, or (for shared dependencies) in setUpDependencies. See the full list of Login dependencies below.