提交 b599ee27 authored 作者: JarvanMo's avatar JarvanMo

update swift doc'

上级 614e3efd
......@@ -15,9 +15,10 @@ We have to make the headers in `WeChatOpenSDK` public in order to support swift:
## Response
override the following functions in `AppDelegate.swift`:
```swift
//swift4.1
import fluwx
override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
......@@ -27,4 +28,23 @@ override the following functions in `AppDelegate.swift`:
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
```
```swift
//swift4.2
import fluwx
// Converted to Swift 4 by Swiftify v4.1.6841 - https://objectivec2swift.com/
override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
// NOTE: 9.0以后使用新API接口
override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
```
......@@ -15,9 +15,10 @@
## 回调监听
在你的`AppDelegate.swift`文件中重写以下方法:
```swift
//swift4.1
import fluwx
override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
......@@ -27,4 +28,23 @@
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
```
```swift
//swift4.2
import fluwx
// Converted to Swift 4 by Swiftify v4.1.6841 - https://objectivec2swift.com/
override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
// NOTE: 9.0以后使用新API接口
override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
return WXApi.handleOpen(url, delegate: FluwxResponseHandler.defaultManager())
}
```
......@@ -28,7 +28,9 @@
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array/>
<array>
<string>wxd930ea5d5a258f4f</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论