CoinQPay-iOS 0.1.0

CoinQPay-iOS 0.1.0

dushiling 维护。



 
依赖
Masonry= 1.1.0
OpenSSL-Universal= 1.0.2.13
Protobuf= 3.13.0
 

  • dslAnna

CoinQPay-iOS

CI Status Version License Platform

示例

要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install

要求

  • 平台: iOS
  • 语言: Objective-C
  • 操作系统环境: iphone

安装

CoinQPay-iOS 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile

pod 'CoinQPay-iOS'

构建开发者环境

  1. 设置您的 URL 方案: 项目->TARGETS->info->URL 类型->添加 URL 方案;
  2. 在 info.plist 中添加 LSApplicationQueriesSchemes,值使用 tpoutside

使用方法

AppDelegate.m 中添加头文件

#import <CoinQPay/CoinQPay.h>

在方法 application:didFinishLaunchingWithOptions: 中注册您的方案

[CPayApi registerAppID:@"demoapp"];

在方法 application:openURL: 中观察回调

[CPayApi handleURL:url options:options result:^(TPRespObj *respObj) {
    respObj.result;     // TPRespResultCanceled = 0,TPRespResultSuccess, TPRespResultFailure,
    respObj.message;    // Result message
    respObj.data;       // Json details
    /* Json details:
    {
         action = pushTransaction;
         actionId = "";
         onlySign = 0;
         publickey = 0x58806D167911019Cf86a39944830aBd791922883;
         ref = TokenPocket;
         result = 1; 
         transaction = 0xe486a3440274a793391a02a2ba860ee692ca82fdfd5aac4b7c96be541296fb37;
         txId = 0xe486a3440274a793391a02a2ba860ee692ca82fdfd5aac4b7c96be541296fb37;
         wallet = "ETH-1";
    }
    */
}];

解释

该 SDK 旨在提供多种主流的去中心化钱包支付选项,目前已连接到 TokenPocket,接下来是 MetaMask、Biget、ApLink..... 将逐步接入

作者

dslAnna,[email protected]

许可协议

CoinQPay-iOS 可在 MIT 许可协议下使用。有关更多信息,请参阅 LICENSE 文件。