-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLFSAskForReviewService.h
More file actions
70 lines (50 loc) · 1.49 KB
/
LFSAskForReviewService.h
File metadata and controls
70 lines (50 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//
// LFSAskForRewiewService.h
// FXStreet
//
// Created by Lluís Gómez Hernando on 18/12/13.
// Copyright (c) 2013 Lafosca. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol LFSAskForReviewServiceDataSource <NSObject>
@required
/**
For a given action, returns the number of repetitions that must happen before showing the alert asking for a review.
*/
- (NSUInteger)necessaryRepetitionsForAction:(NSString *)action;
/**
Returns the message to be displayed in the alert.
*/
- (NSString *)message;
/**
Returns the title to be displayed in the alert.
*/
- (NSString *)title;
/**
Returns the title for the positive answer button of the alert.
*/
- (NSString *)positiveButtonTitle;
/**
Returns the title for the negative answer button of the alert.
*/
- (NSString *)negativeButtonTitle;
@end
@protocol LFSAskForReviewServiceDelegate <NSObject>
@required
/**
Handles user's positive response to the ask for review alert.
*/
- (void)userResponseWasPositive;
/**
Handles user's negative response to the ask for review alert.
*/
- (void)userResponseWasNegative;
@end
@interface LFSAskForReviewService : NSObject
@property (strong, nonatomic) id<LFSAskForReviewServiceDataSource>dataSource;
@property (strong, nonatomic) id<LFSAskForReviewServiceDelegate>delegate;
//Singleton
+ (LFSAskForReviewService *)sharedService;
//Method to call when the user action that could trigger the ask for review alert happened.
- (void)askIfNecessaryAfterUserAction:(NSString *)action;
@end