AQSEventAggregator 0.1.0

AQSEventAggregator 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by kaiinui.



  • By
  • kaiinui

An aggregator for AQSEvent

Usage

At first, subclass AQSEventAggregator,

@interface AppEventAggregator
@end

@implementation

// @override
- (NSArray *)whiteListForEvents {
    return @{
        @"app/run_at_first",
        @"app/did_become_active",
        @"app/permission/photo_library/granted"
    };
}

- (void)didReceiveEvent:(NSString *)eventName args:(NSDictionary *)eventArgs {
    // Do something when it receives AQSEvent.
    // Typically, send the event to tracking services such as Google Analytics, MixPanel etc.
}

@end

Then as follows to start aggregation.

[[AQSEventAggregator sharedAggregator] startAggregation];

To handle events more finely, override following methods. (These features are currently not supported.)

// @optional
- (NSArray *)blackListForEvents;
// @optional
- (BOOL)testForEvent:(NSString *)eventName args:(NSDictionary *)eventArgs;