Premium Content Network Transition Guide

IMPORTANT: If you have previously sold In-App purchases in the Aviary SDK, please read the following carefully. If not, please disregard.

While enabling dynamic IAPS in the Aviary iOS SDK, we made changes to the way that in-app purchase product identifiers are generated. Previously, the delegate callback of AFInAppPurchaseManager, -inAppPurchaseManager:productIdentifierForProduct:, returned your app's product identifier for a particular product. Beginning with version 2.7.0 of the editor, -inAppPurchaseManager:productIdentifierForProduct: has been deprecated and the default product identifier will be of the form: <Your App's Bundle Identifier>.aviary.<Product Type>.<Pack Type>. If your bundle identifier were com.Company.App, a possible effect pack product identifier might be: com.Company.App.aviary.effectpack.01.

However, to preserve your customer's ability to restore purchases of Content Packs already in your app, you must continue to implement -inAppPurchaseManager:productIdentifierForProduct: .

Here is a sample implementation of the `-inAppPurchaseManager:productIdentifierForProduct:` delegate method:

    - (NSString *)inAppPurchaseManager:(id<AFInAppPurchaseManager>)manager productIdentifierForProduct:(AFPhotoEditorProduct *)product
    {
        NSString *internalID = [product internalProductIdentifier];
        if ([internalID isEqualToString:kAFProductEffectsGrunge]) {
            return @"<Your Grunge Identifier>";
        }
        if ([internalID isEqualToString:kAFProductEffectsNostalgia]) {
            return @"<Your Nostalgia Identifier>";
        }
        if ([internalID isEqualToString:kAFProductEffectsViewfinder]) {
            return @"<Your Viewfinder Identifier>";
        }
        return nil;
    }

The product constants referenced above are defined in `AFPhotoEditorProduct.h`.

It is important that the delegate method return nil if the internalID is not equal to one of the product constants. Otherwise, the automatic product identifier generation will no longer work.