  // Headers
  ////////////////////////////////////////////////////////////
  #include <UIKit/UIKit.h>
++#import <StoreKit/StoreKit.h>
  
  
  ////////////////////////////////////////////////////////////
  /// \brief The view controller handles the view's orientation
  ///
  ////////////////////////////////////////////////////////////
+-@interface SFViewController : UIViewController
++@interface SFViewController : UIViewController <SKStoreProductViewControllerDelegate>
  
  ////////////////////////////////////////////////////////////
  /// \brief Tells if the controller supports auto-rotation (iOS < 6)

 - (NSUInteger)supportedInterfaceOrientations;
 
+- (void)viewDidAppear:(bool)animated;
+
 ////////////////////////////////////////////////////////////
 // Member data

+    gr0.delaysTouchesBegan = false;
+    gr1.delaysTouchesBegan = false;
+}
+
+#pragma mark - SFSKStoreProductViewControllerDelegate
+
+- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
+{
+    [self dismissViewControllerAnimated:YES completion:nil];
+}
 
 @end
