In the process of developing application based on mPaas iOS framework, you can set the general functions without UI as a service (e.g. login) which can be easily obtained by other micro applications or services through the whole App running period. To add a service, you must add service template codes, and register a service.
Download the service’s Template Codes, which mainly:
Define the service’s protocol and expose the external interface method.
Define the class to implement service interface method.
Similar to the micro application, the newly created services can be managed in a unified way via the framework only when they are registered in
|Name||The unique identifier of a service.|
|Class||The implementation class of a service. When creating a service, the framework utilizes runtime reflection mechanism to create the instances of the service implementation class.|
|lazyLoading||Whether to delay loading. If Yes, the service will not be instantiated when the framework starts. Only when being used can the service be instantiated and launched. If No, the service will be instantiated and launched when the framework starts. It defaults to No.|