Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
81b90978
提交
81b90978
authored
9月 27, 2018
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add swift docs & demo
上级
f6717bfc
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
93 行增加
和
4 行删除
+93
-4
USING_SWIFT.md
doc/USING_SWIFT.md
+17
-2
USING_SWIFT_CN.md
doc/USING_SWIFT_CN.md
+17
-2
AppDelegate.swift
example/ios_swift/AppDelegate.swift
+30
-0
GeneratedPluginRegistrant.h
example/ios_swift/GeneratedPluginRegistrant.h
+14
-0
GeneratedPluginRegistrant.m
example/ios_swift/GeneratedPluginRegistrant.m
+14
-0
Runner-Bridging-Header.h
example/ios_swift/Runner-Bridging-Header.h
+1
-0
没有找到文件。
doc/USING_SWIFT.md
浏览文件 @
81b90978
...
@@ -11,4 +11,19 @@ We have to make the headers in `WeChatOpenSDK` public in order to support swift:
...
@@ -11,4 +11,19 @@ We have to make the headers in `WeChatOpenSDK` public in order to support swift:


##
## Response
\ No newline at end of file
override the following functions in
`AppDelegate.swift`
:
```
swift
import
fluwx
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
:
[
UIApplication
.
OpenURLOptionsKey
:
Any
]
=
[:])
->
Bool
{
return
WXApi
.
handleOpen
(
url
,
delegate
:
FluwxResponseHandler
.
defaultManager
())
}
```
\ No newline at end of file
doc/USING_SWIFT_CN.md
浏览文件 @
81b90978
...
@@ -11,4 +11,19 @@
...
@@ -11,4 +11,19 @@


##
## 回调监听
\ No newline at end of file
在你的
`AppDelegate.swift`
文件中重写以下方法:
```
swift
import
fluwx
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
:
[
UIApplication
.
OpenURLOptionsKey
:
Any
]
=
[:])
->
Bool
{
return
WXApi
.
handleOpen
(
url
,
delegate
:
FluwxResponseHandler
.
defaultManager
())
}
```
\ No newline at end of file
example/ios_swift/AppDelegate.swift
0 → 100644
浏览文件 @
81b90978
import
UIKit
import
Flutter
import
fluwx
@UIApplicationMain
@objc
class
AppDelegate
:
FlutterAppDelegate
{
override
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?
)
->
Bool
{
GeneratedPluginRegistrant
.
register
(
with
:
self
)
return
super
.
application
(
application
,
didFinishLaunchingWithOptions
:
launchOptions
)
}
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
:
[
UIApplication
.
OpenURLOptionsKey
:
Any
]
=
[:])
->
Bool
{
return
WXApi
.
handleOpen
(
url
,
delegate
:
FluwxResponseHandler
.
defaultManager
())
}
}
example/ios_swift/GeneratedPluginRegistrant.h
0 → 100644
浏览文件 @
81b90978
//
// Generated file. Do not edit.
//
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
@interface
GeneratedPluginRegistrant
:
NSObject
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
;
@end
#endif
/* GeneratedPluginRegistrant_h */
example/ios_swift/GeneratedPluginRegistrant.m
0 → 100644
浏览文件 @
81b90978
//
// Generated file. Do not edit.
//
#import "GeneratedPluginRegistrant.h"
#import <fluwx/FluwxPlugin.h>
@implementation
GeneratedPluginRegistrant
+
(
void
)
registerWithRegistry
:(
NSObject
<
FlutterPluginRegistry
>*
)
registry
{
[
FluwxPlugin
registerWithRegistrar
:[
registry
registrarForPlugin
:
@"FluwxPlugin"
]];
}
@end
example/ios_swift/Runner-Bridging-Header.h
0 → 100644
浏览文件 @
81b90978
#import "GeneratedPluginRegistrant.h"
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论