Latest 1.2.6
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit


module and service management of ios app

add to your project

management by cocoapods, use:

pod    'AppLord'


what is module? every business or task could be module.

when the module init? when app launch or after app launch

how to impl?

first, create class:

#import <AppLord/AppLord.h>
@interface MyModule : NSObject <ALModule>

then, impl like this:

@AppLordModule(MyModule) // Annotation for regist the module, required
@implementation MyModule

// module object init
- (void)moduleDidInit:(ALContext *)context
    // do some init thing



we can receive events from other modules in a module, but it does not always meet the demand. we can’t notify back to the sender. so we provide another way to transfer event between modules: service.

How to use?

Define your custom service

@protocol MyService <ALService>

- (void)doSomething;


Impl it

@interface MyServiceImpl : NSObject <MyService>


@AppLordService(MyService, MyServiceImpl) // regist MyService's Impl class: MyServiceImpl
@implementation MyServiceImpl

- (void)doSomething


// optional
+ (BOOL)globalVisible
    // if return YES, service will be always in the memory


How to get the instance of service?

id<MyService> service = [[ALContext sharedContext] findServiceByName:@"MyService"];
// or
id<MyService> service = [[ALContext sharedContext] findService:@protocol(MyService)];

Latest podspec

    "name": "AppLord-fork",
    "version": "1.2.6",
    "summary": "The lord of iOS app modules",
    "description": "* Module: module managementn* Service Between modulesn* Task manage global tasks",
    "platforms": {
        "ios": "6.0"
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "fengnianji": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.2.6"
    "source_files": "AppLord/**/*.{h,m}",
    "frameworks": [
    "requires_arc": true

Pin It on Pinterest

Share This