iOS Developer Library

Developer

StoreKit Framework Reference SKStoreProductViewControllerDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

SKStoreProductViewControllerDelegate

An object implementing the SKStoreProductViewControllerDelegate protocol is called when the user dismisses the store screen. Typically, this protocol is implemented by the view controller in your application that originally displayed the store screen.

Inheritance


Not Applicable

Import Statement


Swift

import StoreKit

Objective-C

@import StoreKit;

Availability


Available in iOS 6.0 and later.
  • Called when the user dismisses the store screen. (required)

    Declaration

    Swift

    optional func productViewControllerDidFinish(_ viewController: SKStoreProductViewController!)

    Objective-C

    - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController

    Parameters

    viewController

    The store view controller whose interface was dismissed by the user.

    Discussion

    Your delegate should call the dismissModalViewControllerAnimated: method on the view controller that originally presented the store screen. If your app paused any other activities before presenting the store, it can restart those services in this method.

    Import Statement

    Objective-C

    @import StoreKit;

    Swift

    import StoreKit

    Availability

    Available in iOS 6.0 and later.