iOS
HumaModel is a core library that provides a set of data structures and repository interfaces for working with them.
Getting Started
- Example
- Installing
We can split the models into the following categories:
Common
RepositoryError
is used to describe failures in repository callbacks.RepositoryResult
represents a result of a repository callback.RepositoryCompletion
represents a repository callback.
User
- The
AnyUser
protocol defines all needed user properties and is used in other libraries. You can use the built-inUser
struct or create your own implementation. - To work with the user models, you have to implement the following protocols:
AnyUserSessionRepository
,AnyUserObserveRepository
, andAnyUserUpdateRepository
.
Modules
- The
AnyPrimitive
protocol describes a value of a module result. - The
ModuleResult
struct represents a generic result of a module. - To work with module results, you have to implement the following protocols:
AnyModuleResultObserveRepository
andAnyModuleResultSubmitRepository
.
Configuration
- The
AnyConfiguration
protocol describes all parameters of a configuration used in the other libraries. Some of the parameters are custom struct types; you can read the documentation in the code. - To work with configuration, you have to implement the following protocols:
AnyConfiguration
andAnyConfigurationRepository
.
Storage
The FileObject
struct contains the location details of a file and is used to upload or download the files.
- To work with storage operations, you have to implement
AnyFileRepository
.
Analytics
- The library includes an extension to
AnyAnalytics
from HumaUtils that allows you to identify analytics with theAnyUser
model.
- Add the dependency to your project. TODO: describe how to install the library via a package manager