内购 - iOS 内购的快速实现
变更记录
序号 | 录入时间 | 录入人 | 备注 |
---|---|---|---|
1 | 2015-04-25 | Alfred Jiang | - |
2 | 2015-12-23 | Alfred Jiang | - |
方案名称
内购 - iOS 内购的快速实现
关键字
内购 \ Purchase \ 应用内购买 \ In-App Purchases
需求场景
- 需要实现应用内购买需求时
参考链接
- Cocos2d应用内购买及IAP
- GitHub - MKStoreKit
- 博客园 - In App Purchases 入门[译](原文)
- 51CTO - iOS应用内置付费:In-App Purchases完全攻略(1)
- 51CTO - iOS应用内置付费:In-App Purchases完全攻略(2)
- Apple documentation - In-App Purchase Programming Guide
- MKStoreKit小记
详细内容
#####1. 初始化
1 | [[MKStoreKit sharedKit] startProductRequest]; |
#####2. 获取 IAP 列表
1 | [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitProductsAvailableNotification |
#####3. 购买 IAP
1 | [[MKStoreKit sharedKit] initiatePaymentRequestForProductWithIdentifier:productIdentifier]; |
#####4. 恢复 IAP
1 | [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitRestoredPurchasesNotification |
效果图
(无)
备注
(无)
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 宁静至远,博雅多通!