4504
|
1 |
/*
|
|
2 |
This file is part of Appirater.
|
|
3 |
|
|
4 |
Copyright (c) 2010, Arash Payan
|
|
5 |
All rights reserved.
|
|
6 |
|
|
7 |
Permission is hereby granted, free of charge, to any person
|
|
8 |
obtaining a copy of this software and associated documentation
|
|
9 |
files (the "Software"), to deal in the Software without
|
|
10 |
restriction, including without limitation the rights to use,
|
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12 |
copies of the Software, and to permit persons to whom the
|
|
13 |
Software is furnished to do so, subject to the following
|
|
14 |
conditions:
|
|
15 |
|
|
16 |
The above copyright notice and this permission notice shall be
|
|
17 |
included in all copies or substantial portions of the Software.
|
|
18 |
|
|
19 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26 |
OTHER DEALINGS IN THE SOFTWARE.
|
|
27 |
*/
|
|
28 |
/*
|
|
29 |
* Appirater.h
|
|
30 |
* appirater
|
|
31 |
*
|
|
32 |
* Created by Arash Payan on 9/5/09.
|
|
33 |
* http://arashpayan.com
|
|
34 |
* Copyright 2010 Arash Payan. All rights reserved.
|
|
35 |
*/
|
|
36 |
|
|
37 |
#import <Foundation/Foundation.h>
|
|
38 |
|
|
39 |
extern NSString *const kAppiraterLaunchDate;
|
|
40 |
extern NSString *const kAppiraterLaunchCount;
|
|
41 |
extern NSString *const kAppiraterCurrentVersion;
|
|
42 |
extern NSString *const kAppiraterRatedCurrentVersion;
|
|
43 |
extern NSString *const kAppiraterDeclinedToRate;
|
|
44 |
|
|
45 |
/*
|
|
46 |
Place your Apple generated software id here.
|
|
47 |
*/
|
|
48 |
#define APPIRATER_APP_ID 391234866
|
|
49 |
|
|
50 |
/*
|
|
51 |
Your app's name.
|
|
52 |
*/
|
|
53 |
#define APPIRATER_APP_NAME [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey]
|
|
54 |
|
|
55 |
/*
|
|
56 |
This is the message your users will see once they've passed the day+launches
|
|
57 |
threshold.
|
|
58 |
*/
|
|
59 |
#define APPIRATER_MESSAGE [NSString stringWithFormat:@"If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!", APPIRATER_APP_NAME]
|
|
60 |
|
|
61 |
/*
|
|
62 |
This is the title of the message alert that users will see.
|
|
63 |
*/
|
|
64 |
#define APPIRATER_MESSAGE_TITLE [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
|
|
65 |
|
|
66 |
/*
|
|
67 |
The text of the button that rejects reviewing the app.
|
|
68 |
*/
|
|
69 |
#define APPIRATER_CANCEL_BUTTON NSLocalizedString(@"No thanks",@"")
|
|
70 |
|
|
71 |
/*
|
|
72 |
Text of button that will send user to app review page.
|
|
73 |
*/
|
|
74 |
#define APPIRATER_RATE_BUTTON [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
|
|
75 |
|
|
76 |
/*
|
|
77 |
Text for button to remind the user to review later.
|
|
78 |
*/
|
|
79 |
#define APPIRATER_RATE_LATER NSLocalizedString(@"Remind me later",@"")
|
|
80 |
|
|
81 |
/*
|
|
82 |
Users will need to have the same version of your app installed for this many
|
|
83 |
days before they will be prompted to rate it.
|
|
84 |
*/
|
|
85 |
#define DAYS_UNTIL_PROMPT 5 // double
|
|
86 |
|
|
87 |
/*
|
|
88 |
Users will need to launch the same version of the app this many times before
|
|
89 |
they will be prompted to rate it.
|
|
90 |
*/
|
|
91 |
#define LAUNCHES_UNTIL_PROMPT 10 // integer
|
|
92 |
|
|
93 |
/*
|
|
94 |
'YES' will show the Appirater alert everytime. Useful for testing how your message
|
|
95 |
looks and making sure the link to your app's review page works.
|
|
96 |
*/
|
|
97 |
#define APPIRATER_DEBUG NO // bool
|
|
98 |
|
|
99 |
@interface Appirater : NSObject <UIAlertViewDelegate> {
|
|
100 |
|
|
101 |
}
|
|
102 |
|
|
103 |
+(void) appLaunched;
|
|
104 |
|
|
105 |
@end
|