title: Initiate an UIalert View monthly
body: <p>I would like to make a alert view every month (e.g. 1st of Every month) for reminding users to rating my app. I searched the methods for opening up the alert view in the first time opening the app, but there is no answer on solving my problem. Could anyone help me with the following codes. </p>
  
  <p>Many thanks. </p>
  
  <pre><code>- (void)viewDidLoad{
      [super viewDidLoad];
  
      NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
      NSString *alreadyRun = @"already-run";
      if ([prefs boolForKey:alreadyRun])
          return;
      [prefs setBool:YES forKey:alreadyRun];
      UIAlertView *alert = [[UIAlertView alloc]
                            initWithTitle:@"Rate and Comment" message:@"Thank you for choosing Art of Codes, your support could make this app better. Please rate and comment and tell us what you think."delegate:self cancelButtonTitle:@"Done" otherButtonTitles:@"Rate it!", nil];
      [alert show];
   }
  
  - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
      // the user clicked one of the OK/Cancel buttons
      if (buttonIndex == 0)
      {
          NSLog(@"ok");
      }
      else
      {
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/"]];
      }
  }   
  </code></pre>