应用内购买 RMStore

RMStore是一个轻量级的iOS框架,用于实现应用内购买。它为StoreKit添加了块和通知功能,支持收据验证和购买管理。通过简单的步骤,如添加RMStore到项目、设置支付,即可实现购买功能。此外,RMStore还提供产品请求、支付交易、恢复交易的通知,以及非消耗品和消耗品的管理。
摘要由CSDN通过智能技术生成
下载链接:https://github.com/robotmedia/RMStore


Build Status
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

  1. Add RMStore.h and RMStore.m
  2. Link StoreKit.framework
  3. Profit!

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", @"");
}];

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值