project_files/HedgewarsMobile/Classes/Appirater.h
branchios-revival
changeset 11309 402baa6d4f64
parent 11308 92b023095153
child 11310 9671c2bfce41
equal deleted inserted replaced
11308:92b023095153 11309:402baa6d4f64
     1 /*
       
     2  This file is part of Appirater, http://arashpayan.com
       
     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 
       
    30 #import <Foundation/Foundation.h>
       
    31 
       
    32 extern NSString *const kAppiraterLaunchDate;
       
    33 extern NSString *const kAppiraterLaunchCount;
       
    34 extern NSString *const kAppiraterCurrentVersion;
       
    35 extern NSString *const kAppiraterRatedCurrentVersion;
       
    36 extern NSString *const kAppiraterDeclinedToRate;
       
    37 
       
    38 /*
       
    39  Place your Apple generated software id here.
       
    40  */
       
    41 #define APPIRATER_APP_ID                391234866
       
    42 
       
    43 /*
       
    44  Your app's name.
       
    45  */
       
    46 #define APPIRATER_APP_NAME              [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleNameKey]
       
    47 
       
    48 /*
       
    49  This is the message your users will see once they've passed the day+launches
       
    50  threshold.
       
    51  */
       
    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]
       
    53 
       
    54 /*
       
    55  This is the title of the message alert that users will see.
       
    56  */
       
    57 #define APPIRATER_MESSAGE_TITLE         [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
       
    58 
       
    59 /*
       
    60  The text of the button that rejects reviewing the app.
       
    61  */
       
    62 #define APPIRATER_CANCEL_BUTTON         NSLocalizedString(@"No thanks",@"")
       
    63 
       
    64 /*
       
    65  Text of button that will send user to app review page.
       
    66  */
       
    67 #define APPIRATER_RATE_BUTTON           [NSString stringWithFormat:@"Rate %@", APPIRATER_APP_NAME]
       
    68 
       
    69 /*
       
    70  Text for button to remind the user to review later.
       
    71  */
       
    72 #define APPIRATER_RATE_LATER            NSLocalizedString(@"Remind me later",@"")
       
    73 
       
    74 /*
       
    75  Users will need to have the same version of your app installed for this many
       
    76  days before they will be prompted to rate it.
       
    77  */
       
    78 #define DAYS_UNTIL_PROMPT               3       // double
       
    79 
       
    80 /*
       
    81  Users will need to launch the same version of the app this many times before
       
    82  they will be prompted to rate it.
       
    83  */
       
    84 #define LAUNCHES_UNTIL_PROMPT           5      // integer
       
    85 
       
    86 /*
       
    87  'YES' will show the Appirater alert everytime. Useful for testing how your message
       
    88  looks and making sure the link to your app's review page works.
       
    89  */
       
    90 #define APPIRATER_DEBUG                 NO      // bool
       
    91 
       
    92 @interface Appirater : NSObject <UIAlertViewDelegate> {
       
    93 
       
    94 }
       
    95 
       
    96 +(void) appLaunched;
       
    97 
       
    98 @end