In the process of developing an 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.
Procedure
Add service template codes.
Define the service’s protocol and expose the external interface method.
Define the class to implement the service interface method.
Register a service.
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
MobileRuntime.plist
.Field
Description
Name
The unique identifier of a service.
Class
The implementation class of service. When creating a service, the framework utilizes a run-time 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.