title: InApp Purchase - How to detect when Alert 'Confirm Your In App Purchase' is displayed
body: <p>I have my store all setup, everything is working perfectly.</p>
  
  <p>What i'm trying to do now is when they click on a button to buy something from my app, i'm displaying a custom UIActivityIndicator type thing to show the users that things are actually loading (and to stop them from going back in case the alert takes 10+ secs to show up).</p>
  
  <p>I have a timeout set to perform after a 30s delay to hide the ActivityIndicator incase the store isn't responding so the users won't be stuck waiting forever.
  All this is working fine.</p>
  
  <p>The problem is when the 'Confirm Your In App Purchase' Alert is displayed, i'm not sure how to get notified that it appeared so i can hide the ActivityIndicator I have still running in the back.</p>
  
  <p>There are methods to detect when the user hits Cancel or Buy which I have but I would like to hide the ActivityIndicator before they hit one so the users don't see it in the background while they read it.</p>
  
  <p>Did I overlook a delegate that would work for this?
  Or will I have to write something custom to make this work the way I want?</p>
  
  <p>Thanks! </p>
  
  <hr>
  
  <p>I also tried implementing the UIAlertViewDelegate with this method however it doens't catch the In-App Purchase alert views :(</p>
  
  <pre><code>- (void)didPresentAlertView:(UIAlertView *)alertView;
  </code></pre>
  
  <hr>
  
  <p>In case anyone else is interested in a solution I made up.</p>
  
  <p>When you call load and start connecting to your store you can add an  observer to catch when your phone will resign being active. This way  when the In App alert appears the method you choose gets called and you  can cancel your activity monitor.</p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(inAppAlertAppeared:) 
                                               name:UIApplicationWillResignActiveNotification 
                                             object:nil];
  </code></pre>