Kamax
Kamax

Reputation: 212

RMStore and simple remove ads

I feel a bit lost after 2 days of reading everything i can about in app purchase. The most easy solution is maybe to use RMStore but i'm unable to feel 100% safe on what i should do or in which order.

For now i have this in AppDelegte.m

#import "RMStore.h"
#import "RMStoreAppReceiptVerificator.h"
#import "RMStoreKeychainPersistence.h"

@implementation AppDelegate{
    id<RMStoreReceiptVerificator> receiptVerificator;
    RMStoreKeychainPersistence *persistence;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    receiptVerificator = [[RMStoreAppReceiptVerificator alloc] init];
    [RMStore defaultStore].receiptVerificator = receiptVerificator;

    persistence = [[RMStoreKeychainPersistence alloc] init];
    [RMStore defaultStore].transactionPersistor = persistence;

    persistence = [RMStore defaultStore].transactionPersistor;
    BOOL purchased = [persistence isPurchasedProductOfIdentifier:INAPPADSREMOVE];
}

Does i have to alloc - init both value, does it not delete the receipt ? And when should i check the receipt, on each app start ?

It's not really clear for me, maybe if someone has a full example i could understand. The example on github show how to buy or restore but not how to manage around it.

Upvotes: 2

Views: 314

Answers (0)

Related Questions