下载链接:https://github.com/robotmedia/RMStore
RMStore
A lightweight iOS framework for In-App Purchases.
RMStore adds blocks and notifications to StoreKit, plus receipt verification and purchase management. All in one class without external dependencies. Purchasing a product is as simple as:
[[RMStore defaultStore] addPayment:productID success:^(SKPaymentTransaction *transaction) {
NSLog(@"Purchased!", @"");
} failure:^(SKPaymentTransaction *transaction, NSError *error) {
NSLog(@"Something went wrong", @"");
}];
Add RMStore to your project
StoreKit with blocks
RMStore adds blocks to all asynchronous StoreKit operations.
Requesting products
NSSet *products = [NSSet setWithArray:@[@"fabulousIdol", @"rootBeer", @"rubberChicken"]];
[[RMStore defaultStore] requestProducts:products success:^(NSArray *products, NSArray *invalidProductIdentifiers) {
NSLog(@"Products loaded", @"");
} failure:^(NSError *error) {
NSLog(@"Something went wrong", @"");
}];