11# SKGenerateModelTool
22
3- [ ![ ] ( https://img.shields.io/badge/.dmg-4.2MB-brightgreen )] ( https://github.com/Xcoder1011/SKGenerateModelTool/blob/master/SKGenerateModelTool.dmg ) ![ ] ( https://img.shields.io/badge/Dart-flutter-blue )
4- ![ ] ( https://img.shields.io/badge/TypeScript-interface-brightgreen )
5- ![ ] ( https://img.shields.io/badge/Swift-91.7%25-brightgreen )
6- ![ ] ( https://img.shields.io/badge/license-MIT-green )
7-
3+ [ ![ ] ( https://img.shields.io/badge/.dmg-4.2MB-brightgreen )] ( https://github.com/Xcoder1011/SKGenerateModelTool/blob/master/SKGenerateModelTool.dmg ) ![ ] ( https://img.shields.io/badge/Dart-flutter-blue )
4+ ![ ] ( https://img.shields.io/badge/TypeScript-interface-brightgreen )
5+ ![ ] ( https://img.shields.io/badge/Swift-91.7%25-brightgreen )
6+ ![ ] ( https://img.shields.io/badge/license-MIT-green )
87
98- 支持` Objective-C ` / ` Swift ` / ` Dart ` / ` TypeScript `
10- - 支持通过` URL ` 链接或` json ` 字符串一键生成model文件
9+ - 支持通过` URL ` 链接或` json ` 字符串一键生成 model 文件
1110- 兼容` YYModel ` / ` MJExtension ` / ` HandyJSON ` 解析
12- - 支持字符串加密(可设置不同的密钥,开发者可自行修改加密算法)
13- - 支持自定义model父类名、自定义model前缀、自定义作者名、添加注释
11+ - Swift 模型默认使用` Codable ` 协议
12+ - 支持字符串加密及可扩展的自定义加密算法实现
13+ - 支持自定义模型基类、命名前缀、作者信息及注释
1414- 支持代码高亮(使用[ highlight.js] ( https://highlightjs.org/ ) )
1515- 支持导出` TypeScript Interfaces `
1616- 支持自定义导出文件路径
1717- ` Flutter Model ` 解析兼容了服务端返回` string/int/double ` 时数据类型混用的情况
18- - 兼容服务端返回“id”字段
19- - 支持类驼峰命名
20-
18+ - 兼容服务端字段类型混用场景
19+ - 支持驼峰命名
2120
2221- Support ` Objective-C ` / ` Swift ` / ` Dart ` / ` TypeScript `
2322- Supports one-click generation of model files through ` URL ` links or ` json ` strings
2423- Compatible with ` YYModel ` / ` MJExtension ` / ` HandyJSON ` analysis
24+ - Swift models use the Codable protocol by default
2525- Support string encryption (different keys can be set, developers can modify the encryption algorithm)
2626- Support custom model superclass name, custom model prefix, custom author name, add comments
2727- Support code highlighting(It uses [ highlight.js] ( https://highlightjs.org/ ) as it core)
3333
3434### Usage
3535
36- > * 方式一:直接下载软件安装 [ 点击下载] ( https://github.com/Xcoder1011/SKGenerateModelTool/blob/master/SKGenerateModelTool.dmg )
37- > * 方式二:下载代码运行
38-
36+ > - 方式一:直接下载软件安装 [ 点击下载] ( https://github.com/Xcoder1011/SKGenerateModelTool/blob/master/SKGenerateModelTool.dmg )
37+ > - 方式二:下载代码运行
3938
4039### Objective-C
4140
5756
5857![ 字符串加密示例] ( ../master/images/encrypt.png )
5958
60- 加密后的内容添加到项目中(声明和定义可以分别放.h和 .m),因为代码依赖SKEncryptString结构体 ,所以需要导入头文件** SKEncryptHeader.h** 引用。
59+ 加密后的内容添加到项目中(声明和定义可以分别放.h 和 .m),因为代码依赖 SKEncryptString 结构体 ,所以需要导入头文件** SKEncryptHeader.h** 引用。
6160
62- > 只需把此头文件(SKEncryptHeader.h)加入到项目,并在pch文件中导入该头文件即可使用 ;
63- Just add this header file (SKEncryptHeader.h) to the project and import the header file in the pch file to use;
61+ > 只需把此头文件(SKEncryptHeader.h)加入到项目,并在 pch 文件中导入该头文件即可使用 ;
62+ > Just add this header file (SKEncryptHeader.h) to the project and import the header file in the pch file to use;
6463
6564![ SKEncryptHeader.h] ( ../master/images/SKEncryptHeader.png )
6665
@@ -78,6 +77,7 @@ extern const SKEncryptString * const _3908173925;
7877```
7978
8079定义:
80+
8181```
8282/** 需要加密的重要字符,比如AppKey、AppSecret、AppID、数据库密码等 */
8383const SKEncryptString * const _3596508958 = &(SKEncryptString){
@@ -118,6 +118,4 @@ const SKEncryptString * const _3908173925 = &(SKEncryptString){
118118
119119![ encrypt_result] ( ../master/images/encrypt_result.png )
120120
121- Tip:本工具仅用到简单的XOR加密算法,开发者可自行下载项目进行加密算法修改,另外也可直接下载项目里的dmg文件进行安装使用。
122-
123- - 简书地址:[ https://www.jianshu.com/p/a2ee31a04252 ] ( https://www.jianshu.com/p/a2ee31a04252 )
121+ Tip:本工具仅用到简单的 XOR 加密算法,开发者可自行下载项目进行加密算法修改,另外也可直接下载项目里的 dmg 文件进行安装使用。
0 commit comments