Skip to content

Commit d9020a8

Browse files
committed
SPM Support (#823)
1 parent 915fc46 commit d9020a8

File tree

2 files changed

+44
-12
lines changed

2 files changed

+44
-12
lines changed

Package.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// swift-tools-version:5.3
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "MJExtension",
7+
products: [
8+
.library(name: "MJExtension", targets: ["MJExtension"]),
9+
],
10+
dependencies: [],
11+
targets: [
12+
.target(
13+
name: "MJExtension",
14+
dependencies: [],
15+
path: "MJExtension",
16+
exclude: ["Info.plist"],
17+
publicHeadersPath: ".",
18+
cxxSettings: [
19+
.headerSearchPath("."),
20+
]
21+
),
22+
// Mixed languages are not supported now. Go MJExtension project to see tests.
23+
// .testTarget(
24+
// name: "MJExtensionTests",
25+
// dependencies: ["MJExtension"],
26+
// path: "MJExtensionTests",
27+
// exclude: ["Info.plist"]
28+
// )
29+
]
30+
)

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
MJExtension
22
===
3+
[![SPM supported](https://img.shields.io/badge/SPM-supported-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)
34
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
45
![podversion](https://img.shields.io/cocoapods/v/MJExtension.svg)
56
![Platform](https://img.shields.io/cocoapods/p/MJExtension.svg?style=flat)
7+
68
- A fast, convenient and nonintrusive conversion framework between JSON and model.
79
- 转换速度快、使用简单方便的字典转模型框架
810

@@ -48,27 +50,27 @@ MJExtension
4850

4951
### <a id="Installation"></a> Installation【安装】
5052

51-
#### From CocoaPods【使用CocoaPods】
53+
#### CocoaPods【使用CocoaPods】
5254

5355
```ruby
5456
pod 'MJExtension'
5557
```
5658

59+
#### Carthage
60+
61+
```ruby
62+
github "CoderMJLee/MJExtension"
63+
```
64+
65+
#### Swift Package Manager
66+
67+
Released from [`3.4.0`](https://github.com/CoderMJLee/MJExtension/releases/)
68+
5769
#### Manually【手动导入】
70+
5871
- Drag all source files under folder `MJExtension` to your project.【将`MJExtension`文件夹中的所有源代码拽入项目中】
5972
- Import the main header file:`#import "MJExtension.h"`【导入主头文件:`#import "MJExtension.h"`
6073

61-
```objc
62-
MJExtension.h
63-
MJConst.h MJConst.m
64-
MJFoundation.h MJFoundation.m
65-
MJProperty.h MJProperty.m
66-
MJType.h MJType.m
67-
NSObject+MJCoding.h NSObject+MJCoding.m
68-
NSObject+MJProperty.h NSObject+MJProperty.m
69-
NSObject+MJKeyValue.h NSObject+MJKeyValue.m
70-
```
71-
7274
## <a id="Examples"></a> Examples【示例】
7375

7476
**Add `MJKeyValue` protocol to your model if needed【如果有需要, 请在模型中加入 `MJKeyValue` 协议】**

0 commit comments

Comments
 (0)