project_files/HedgewarsMobile/Classes/Appirater.h
author koda
Thu, 27 Jun 2013 12:02:40 +0200
changeset 9268 8a9075ed0aab
parent 8441 a00b0fa0dbd7
permissions -rw-r--r--
use add_flag_append more, correctly set a few flags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     1
/*
6832
fae8fd118da9 dates are no more!
koda
parents: 5486
diff changeset
     2
 This file is part of Appirater, http://arashpayan.com
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
     3
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     4
 Copyright (c) 2010, Arash Payan
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     5
 All rights reserved.
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
     6
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     7
 Permission is hereby granted, free of charge, to any person
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     8
 obtaining a copy of this software and associated documentation
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     9
 files (the "Software"), to deal in the Software without
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    10
 restriction, including without limitation the rights to use,
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    11
 copy, modify, merge, publish, distribute, sublicense, and/or sell
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    12
 copies of the Software, and to permit persons to whom the
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    13
 Software is furnished to do so, subject to the following
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    14
 conditions:
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
    15
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    16
 The above copyright notice and this permission notice shall be
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    17
 included in all copies or substantial portions of the Software.
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
    18
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    19
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    20
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    21
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    22
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    23
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    24
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    25
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    26
 OTHER DEALINGS IN THE SOFTWARE.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    27
 */
6832
fae8fd118da9 dates are no more!
koda
parents: 5486
diff changeset
    28
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    29
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    30
#import <Foundation/Foundation.h>
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    31
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    32
extern NSString *const kAppiraterLaunchDate;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    33
extern NSString *const kAppiraterLaunchCount;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    34
extern NSString *const kAppiraterCurrentVersion;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    35
extern NSString *const kAppiraterRatedCurrentVersion;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    36
extern NSString *const kAppiraterDeclinedToRate;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    37
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    38
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    39
 Place your Apple generated software id here.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    40
 */
5486
e75f7c3c6275 ios: this should prevent at least one of the crashes zorg spotted; also added some callbacks in SDLh; also polished project file (from -O2 to -Os)
koda
parents: 4504
diff changeset
    41
#define APPIRATER_APP_ID                391234866
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    42
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    43
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    44
 Your app's name.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    45
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    46
#define APPIRATER_APP_NAME              [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    47
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    48
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    49
 This is the message your users will see once they've passed the day+launches
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    50
 threshold.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    51
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    52
#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]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    53
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    54
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    55
 This is the title of the message alert that users will see.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    56
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    57
#define APPIRATER_MESSAGE_TITLE         [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    58
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    59
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    60
 The text of the button that rejects reviewing the app.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    61
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    62
#define APPIRATER_CANCEL_BUTTON         NSLocalizedString(@"No thanks",@"")
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    63
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    64
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    65
 Text of button that will send user to app review page.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    66
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    67
#define APPIRATER_RATE_BUTTON           [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    68
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    69
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    70
 Text for button to remind the user to review later.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    71
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    72
#define APPIRATER_RATE_LATER            NSLocalizedString(@"Remind me later",@"")
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    73
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    74
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    75
 Users will need to have the same version of your app installed for this many
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    76
 days before they will be prompted to rate it.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    77
 */
5486
e75f7c3c6275 ios: this should prevent at least one of the crashes zorg spotted; also added some callbacks in SDLh; also polished project file (from -O2 to -Os)
koda
parents: 4504
diff changeset
    78
#define DAYS_UNTIL_PROMPT               3       // double
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    79
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    80
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    81
 Users will need to launch the same version of the app this many times before
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    82
 they will be prompted to rate it.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    83
 */
5486
e75f7c3c6275 ios: this should prevent at least one of the crashes zorg spotted; also added some callbacks in SDLh; also polished project file (from -O2 to -Os)
koda
parents: 4504
diff changeset
    84
#define LAUNCHES_UNTIL_PROMPT           5      // integer
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    85
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    86
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    87
 'YES' will show the Appirater alert everytime. Useful for testing how your message
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    88
 looks and making sure the link to your app's review page works.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    89
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    90
#define APPIRATER_DEBUG                 NO      // bool
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    91
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    92
@interface Appirater : NSObject <UIAlertViewDelegate> {
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    93
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    94
}
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    95
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    96
+(void) appLaunched;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    97
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    98
@end