Git Product home page Git Product logo

fgiapservice's Introduction

FGIAPService

CI Status Version License Platform

一套用于解决苹果IAP的解决方案,适用于希望自己架设服务器进行验证的开发者, 能够非常简单快速地接入到项目中

更详细的介绍

已解决问题

  • 窜单(订单映射)
  • 漏单
  • 账号切换
  • apple验证
  • 票据异常
  • 数据丢失

安装

CocoaPods

  1. 在 Podfile 中添加 pod 'FGIAPService'
  2. 执行 pod installpod update
  3. 导入 <FGIAPService/FGIAPService.h>

若搜索不到库,可使用 rm ~/Library/Caches/CocoaPods/search_index.json 移除本地索引然后再执行安装,或者更新一下 CocoaPods 版本。

手动导入

  1. 下载 FGIAPService 文件夹所有内容并且拖入你的工程中。
  2. 导入 FGIAPService.h

用法

基本使用


配置服务器校验代理对象
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ···
    [[FGIAPManager shared] setConfigureWith: id<FGIAPVerifyTransaction>];

    ···
}

通过productId获取苹果商品列表
[[[FGIAPProductsFilter alloc] init] requestProductsWith:[[NSSet alloc] initWithArray:@[product.productId]] completion:^(NSArray<SKProduct *> * _Nonnull products) {
    ///
}];

通过商品信息和对应的tradeNo进行支付
[[FGIAPManager shared].FGIAPService buyProduct:product tradeNo:tradeNo onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
    ///        
}];

问题交流

如果大家发现bug或者需求,请在GitHub提issue
好用的话,请路过的朋友们给点个star 🙏🙏🙏🙏🙏

fgiapservice's People

Contributors

foneg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.