Skip to content

nori0620/SRGEventDateRecorder

Repository files navigation

SRGEventDateRecorder

CI Status Version License Platform

SRGEventDateRecorder record event date and count persistently.

Anrdoid project is here.

Installation

Add the following line to your podfile and run pod update.

pod 'SRGEventDateRecorder'

Usage

At first you need to include header file.

#import "SRGEventDateRecorder.h"

You can record event.

SRGEventDateRecorder *eventRecorder = [SRGEventDateRecorder recorderWithKey:@"my_event"];
[eventRecorder record];

You can access to recorded data.

SRGEventDateRecorder *eventRecorder = [SRGEventDateRecorder recorderWithKey:@"my_event"];

// return: BOOL
eventRecorder.didRecorded;

// return: NSUInteger
eventRecorder.recordedCount;

// return NSDate
eventRecorder.recordedDate;

// return: BOOL
[eventRecorder didElapsedSinceLastRecordedDateWithSeconds:60];
                    

You can clear data.

SRGEventDateRecorder *eventRecorder = [SRGEventDateRecorder recorderWithKey:@"my_event"];
[eventRecorder clear];

LICENSE

SRGEventDateRecorder is released under the MIT license. See LICENSE for details.

About

SRGEventDateRecorder record event date and count persistently

Resources

License

Stars

Watchers

Forks

Packages

No packages published