title: applicationWillResignActive is invoked in inAppPurchase
body: <p>I have an iOS application and I am doing in this way: in the app delegate I call a method:</p>
  
  <pre><code>- (void)applicationWillResignActive:(UIApplication *)application
  {
     [self performSelector:@selector(myFunction) withObject:self afterDelay:0.0];
     .... 
  }
  </code></pre>
  
  <p>The problem is, when I implement the inAppPurchase in one of my controllers and when the user confirms the payment or cancels it, the: <code>- (void)applicationWillResignActive:(UIApplication *)application</code> is invoked and <code>myFunction</code> is called. I would like to not invoke <code>myFunction</code> when the user accepts or cancels the payment, rather invoke it when the user lunches the app.</p>
  
  <p>How i can do this ? Thanks</p>