project_files/HedgewarsMobile/Classes/Appirater.h
author koda
Sun, 19 Feb 2012 00:39:44 +0100
changeset 6717 080e716e6990
parent 5486 e75f7c3c6275
child 6832 fae8fd118da9
permissions -rw-r--r--
missions page rotates correctly
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
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     2
 This file is part of Appirater.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     3
 
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.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
     6
 
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:
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    15
 
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.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    18
 
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
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    28
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    29
 * Appirater.h
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    30
 * appirater
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
 * Created by Arash Payan on 9/5/09.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    33
 * http://arashpayan.com
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    34
 * Copyright 2010 Arash Payan. All rights reserved.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    35
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    36
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    37
#import <Foundation/Foundation.h>
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
extern NSString *const kAppiraterLaunchDate;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    40
extern NSString *const kAppiraterLaunchCount;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    41
extern NSString *const kAppiraterCurrentVersion;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    42
extern NSString *const kAppiraterRatedCurrentVersion;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    43
extern NSString *const kAppiraterDeclinedToRate;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    44
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
 Place your Apple generated software id here.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    47
 */
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
    48
#define APPIRATER_APP_ID                391234866
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    49
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    50
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    51
 Your app's name.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    52
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    53
#define APPIRATER_APP_NAME              [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey]
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
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    56
 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
    57
 threshold.
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
#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
    60
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
 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
    63
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    64
#define APPIRATER_MESSAGE_TITLE         [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    65
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
 The text of the button that rejects reviewing the app.
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
#define APPIRATER_CANCEL_BUTTON         NSLocalizedString(@"No thanks",@"")
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    70
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
 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
    73
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    74
#define APPIRATER_RATE_BUTTON           [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    75
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    76
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    77
 Text for button to remind the user to review later.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    78
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    79
#define APPIRATER_RATE_LATER            NSLocalizedString(@"Remind me later",@"")
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
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    82
 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
    83
 days before they will be prompted to rate it.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    84
 */
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
    85
#define DAYS_UNTIL_PROMPT               3       // double
4504
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
/*
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    88
 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
    89
 they will be prompted to rate it.
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    90
 */
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
    91
#define LAUNCHES_UNTIL_PROMPT           5      // integer
4504
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    92
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
 '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
    95
 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
    96
 */
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    97
#define APPIRATER_DEBUG                 NO      // bool
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    98
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
    99
@interface Appirater : NSObject <UIAlertViewDelegate> {
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   100
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   101
}
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   102
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   103
+(void) appLaunched;
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   104
8906b2409d97 add the appirater class for getting more positive reviews
koda
parents:
diff changeset
   105
@end