Skip to content

Commit 55a6e93

Browse files
committed
Updating documents
1 parent ce93952 commit 55a6e93

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<p align="center">
2525
<a href="https://developer.apple.com/swift/" target="_blank">
26-
<img src="https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat" alt="Swift 3.0">
26+
<img src="https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat" alt="Swift 4.0">
2727
</a>
2828
<a href="https://developer.apple.com/swift/" target="_blank">
2929
<img src="https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat" alt="Platforms OS X | Linux">
@@ -43,7 +43,7 @@ This project provides an express OpenLDAP class wrapper which enable access to O
4343

4444
This package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/Perfect) project.
4545

46-
Ensure you have installed and activated the latest Swift 3.0 tool chain.
46+
Ensure you have installed and activated the latest Swift 4.0 tool chain.
4747

4848
*Caution*: for the reason that LDAP is widely using in many different operating systems with variable implementations, API marked with (⚠️EXPERIMENTAL⚠️) indicates that this method might not be fully applicable to certain context. However, as an open source software library, you may modify the source code to meet a specific requirement.
4949

@@ -52,15 +52,23 @@ Ensure you have installed and activated the latest Swift 3.0 tool chain.
5252
Add the following dependency to your project's Package.swift file:
5353

5454
``` swift
55-
.Package(url: "https://github.com/PerfectlySoft/Perfect-LDAP.git", majorVersion: 1)
55+
.package(url: "https://github.com/PerfectlySoft/Perfect-LDAP.git",
56+
from: "3.0.0")
57+
58+
// in the target section:
59+
depedencies: ["PerfectLDAP"]
5660
```
5761

5862
Then import PerfectLDAP to your source code:
5963

64+
6065
``` swift
66+
6167
import PerfectLDAP
68+
6269
```
6370

71+
6472
## Connect to LDAP Server
6573

6674
You can create actual connections as need with or without login credential. The full API is `LDAP(url:String, loginData: Login?, codePage: Iconv.CodePage)`. The `codePage` option is for those servers applying character set other than .UTF8, e.g., set `codePage: .GB2312` to connect to LDAP server in Simplified Chinese.

README.zh_CN.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<p align="center">
2525
<a href="https://developer.apple.com/swift/" target="_blank">
26-
<img src="https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat" alt="Swift 3.0">
26+
<img src="https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat" alt="Swift 4.0">
2727
</a>
2828
<a href="https://developer.apple.com/swift/" target="_blank">
2929
<img src="https://img.shields.io/badge/Platforms-OS%20X%20%7C%20Linux%20-lightgray.svg?style=flat" alt="Platforms OS X | Linux">
@@ -47,7 +47,7 @@
4747

4848
该软件使用SPM进行编译和测试,本软件也是[Perfect](https://github.com/PerfectlySoft/Perfect)项目的一部分。
4949

50-
请确保您已经安装并激活了最新版本的 Swift 3.0 tool chain 工具链。
50+
请确保您已经安装并激活了最新版本的 Swift 4.0 tool chain 工具链。
5151

5252
*注意*: 由于LDAP在很多操作系统上都存在不同的服务器实现,因此本文中凡是标明了 (⚠️试验性质⚠️) 的方法,都以为着可能并不适用于某种场合。但是作为开源软件函数库,您可以随时根据需要修改源代码以达到目标要求。
5353

@@ -56,7 +56,11 @@
5656
首先请在您的项目 Package.swift 文件中增加依存关系:
5757

5858
``` swift
59-
.Package(url: "https://github.com/PerfectlySoft/Perfect-LDAP.git", majorVersion: 1)
59+
.package(url: "https://github.com/PerfectlySoft/Perfect-LDAP.git",
60+
from: "3.0.0")
61+
62+
// 在目标段需要注明
63+
depedencies: ["PerfectLDAP"]
6064
```
6165

6266
然后在源代码中导入 PerfectLDAP 函数库:

0 commit comments

Comments
 (0)