CECreditReport 0.0.1

CECreditReport 0.0.1

测试已测试
语种语言 Obj-CObjective C
许可证 MIT
发布最后发布Jul 2016

xuhaiqing维护.



  • xuhaiqing

CECreditReport SDK 接入指南

1. 集成准备

1.1. 联系开发申请商户号 mechId 和 p12文件

无论以何种方式安装SDK,都需要联系开发拿到商户IDp12文件p12密码,将p12文件添加到项目目录中。

1.2 安装SDK

手动导入SDK

下载压缩包,按照以下步骤将 SDK 导入到您的项目中。

  • 解压 CECreditReport-master 压缩文件;
  • CECreditReport 文件夹下的 CECreditReportManager.hlibCECreditReportSDK.aResource.bundle 添加到您的 iOS 工程中

提醒:请记得勾选 "Copy items if needed"。

2. 添加编译参数

在您的工程项目中添加编译参数

1. 在链接设置中,在 Other Linker Flags 中添加 -all_load 参数,请注意大小写。

2. 在 Info.plist 文件中添加:
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

提醒:链接设置位于项目设置 target -> 选项卡 Build Settings,左上角选择 All。

3. 添加初始化函数

在需要显示征信报告页时调用 API

CECreditReportManager *creditReportManager = [CECreditReportManager sharedInstance];
creditReportManager.rootViewController = self;
creditReportManager.userId = @"xxxxxxxxxx";
creditReportManager.merchId = @"xxxxxxxxx";

//*** 必须生成私钥请查看RSA密码生成说明文件 ***//
creditReportManager.p12Path = [[NSBundle mainBundle] pathForResource:@"private_key" ofType:@"p12"]
creditReportManager.p12Password = @"xxxxxxx";

//*** 可自定义导航栏背景色和导航栏title样式***//
[CECreditReportManager sharedInstance].navigationBackgroundColor = [UIColor blueColor];
[CECreditReportManager sharedInstance].navigationTitleAttributes = @{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor colorWithRed:1 green:0 blue:0 alpha:0]};

__weak typeof(self) weakSelf = self;
creditReportManager.dismissBlock = ^(){
    __strong typeof(weakSelf) strongSelf = weakSelf;
  //*** 可选, 征信退出后,处理适配操作,比如导航栏、状态栏等. ***//
};
[creditReportManager startGetCRP];

参数说明

属性 是否必须 描述
rootViewController 设置 rootViewController ,通过 present 方式展示征信报告视图
userId 唯一标识 用户ID
merchId 商户ID
p12Path 私钥本地路径
p12Password 私钥密码
navigationBackgroundColor 设置导航栏背景色,默认蓝色。如果设置为白色,需要更换 Resource 内 “nv_back” 图片资源
navigationTitleAttributes 设置导航栏 title 样式,默认 18 号字,白色

演示项目

查看并运行 CECreditReportDemo/CECreditReportDemo.xcodeproj,效果如下。

CECreditReportDemo

系统要求

此 SDK 需要 iOS 7.0+Xcode 7.0+

许可证

使用 MIT 许可证,详细信息请参阅 LICENSE 文件。

联系我

如有问题请联系我([email protected])