Profile
Last Updated - Platform 20.0 - SDK 15.0The Profile screen allows a logged in user to view and update their account details and preferences.
Deeplinks
To navigate to the Profile screen use:
app://editMyProfile
To present the Profile screen modally use:
app://editMyProfile?is_modal=true
Builder
Use a ProfileBuilder
to build a ProfileViewController
.
let viewController = ProfileBuilder() .withServiceMiddleware(.customProfileService()) .build() as CustomProfileViewController
Generics
- Replace
ProfileState
using the genericProfileBuilder<CustomState>
constraint. - Replace
ProfileViewController
with a subclass by inferring using.build() as CustomViewController
.
Reducers
- Replace
serviceReducer
or use.withServiceReducer()
to handle all updates to the state. - Add additional reducers using
.withReducer()
.
Middleware
- Replace
serviceMiddleware
or use.withServiceMiddleware()
to handle fetching and updating. - 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.