Implementing trial period for auto-renewing subscriptions

I need a guide for adding trial period option for iOS app auto-renewing subscription without using separate server.

The thing is that different time period options inside one auto-renewing group of items have separate IDs, however there is no ID for trial period. How can I request it from out my app after user presses "Trial period" button.

There are no descriptions on Developer Forums and on other websites, no examples as well, so I don't know how to implement this.


P.S.: I use RMStore to cover transaction APIs.

Here is how the code approximately looks:


- (void)performRequestForProduct:(NSString *)productID completionBlock:(void(^)(BOOL success))func {
    NSSet *productIdentifiers = [NSSet setWithObjects:kInAppIDUltimate, kInAppIDPremium1Year, kInAppIDPremium1Month, kInAppDonationBundleID, nil];
   
    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
    [[RMStore defaultStore] requestProducts:productIdentifiers success:^(NSArray *products, NSArray *invalidProducts) {
        if (invalidProducts.count)
            NSLog(@"Products invalid requested are %@", invalidProducts);
        if (DEBUGGING)
            for (SKProduct *product in products)
                NSLog(@"Product valid is %@ (%@, %@)", product.localizedTitle, product.localizedDescription, product.price);
       
       
        [[RMStore defaultStore] addPayment:productID success:^(SKPaymentTransaction *transaction) {
           
            [[RMStore defaultStore].receiptVerificator verifyTransaction:transaction success:^ {
                    if ([productID isEqualToString:kInAppIDUltimate]) {
                        [GLOBAL_DEFAULTS_CONTAINER setObject:@"1" forKey:kNSUserDefaultInAppPurchaseExpirationDate];
                    } else if ([productID isEqualToString:kInAppIDPremium1Month] || [productID isEqualToString:kInAppIDPremium1Year]) {
                        [GLOBAL_DEFAULTS_CONTAINER setObject:[FORMATTER_DATE stringFromDate:expirationDate] forKey:kNSUserDefaultInAppPurchaseExpirationDate];
                    }
                    [GLOBAL_DEFAULTS_CONTAINER synchronize];
                    [self reloadData];
                }];
                [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];

            } failure:^(NSError *error) {
                [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
                PRINT_ERROR(error);
            }];
           
        } failure:^(SKPaymentTransaction *transaction, NSError *error) {
            [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
        }];
       
    } failure:^(NSError *error) {
        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
    }];   
};

I can't really help you regarding autorenewables but the question of a free trial period is much easier if you use non-renewing subscriptions. The simplest approach is to write the install date into the keychain and grant rights for a period of time after that install date. Use the keychain because the keychain survives deletion and reinstallation of the app.

Implementing trial period for auto-renewing subscriptions
 
 
Q