应用许可证密钥
如果您还没有获取许可证密钥,请查看如何获取许可证密钥。
ComPDFKit 转换 SDK 目前支持离线认证的方式验证许可证密钥。
了解关于:
复制许可证密钥
正确获取许可证密钥,是许可证应用的关键。
- 在您收到的邮件中,找到包含许可证密钥的XML文件
- 打开 XML 文件,通过
<type>
字段判断许可证类型,<type>offline</type>
或无该字段为离线许可证。
离线许可证:
xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license version="1">
<platform>ios</platform>
<starttime>xxxxxxxx</starttime>
<endtime>xxxxxxxx</endtime>
<key>LICENSE_KEY</key>
</license>
- 复制
<key>LICENSE_KEY</key>
字段中的LICENSE_KEY
应用许可证密钥
您可以使用以下方法进行离线身份验证:
在您的项目中使用 ComPDFKit 转换 SDK 的类和方法之前,您需要使用有效的许可证密钥初始化该 SDK。如果您还没有许可证密钥,欢迎联系 ComPDFKit 团队 获取。
objective-c
#import <Foundation/Foundation.h>
#import "conversion.h"
#import "common.h"
// Verify the license
NSInteger licenseResult = [LibraryManager licenseVerify:@"<your_license_string>" deviceId:@"" appId:@"<your_app_id>"];
if (licenseResult != 0) {
// Handle license error
}