Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
202453e7
Unverified
提交
202453e7
authored
11月 04, 2024
作者:
Alex Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🎨
Format more
上级
eeacf738
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
15 行增加
和
15 行删除
+15
-15
FluwxPlugin.m
ios/Classes/FluwxPlugin.m
+15
-15
没有找到文件。
ios/Classes/FluwxPlugin.m
浏览文件 @
202453e7
...
@@ -43,7 +43,7 @@ NSUInteger defaultThumbnailSize = 32 * 1024;
...
@@ -43,7 +43,7 @@ NSUInteger defaultThumbnailSize = 32 * 1024;
typedef
void
(
^
FluwxWXReqRunnable
)(
void
);
typedef
void
(
^
FluwxWXReqRunnable
)(
void
);
@implementation
FluwxPlugin
{
@implementation
FluwxPlugin
{
FlutterMethodChannel
*
_channel
;
FlutterMethodChannel
*
_channel
;
WechatAuthSDK
*
_qrauth
;
WechatAuthSDK
*
_qrauth
;
BOOL
_isRunning
;
BOOL
_isRunning
;
...
@@ -134,7 +134,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -134,7 +134,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
[
self
openWeChatInvoice
:
call
result
:
result
];
[
self
openWeChatInvoice
:
call
result
:
result
];
}
else
if
([
@"selfCheck"
isEqualToString
:
call
.
method
])
{
}
else
if
([
@"selfCheck"
isEqualToString
:
call
.
method
])
{
#ifndef __OPTIMIZE__
#ifndef __OPTIMIZE__
[
WXApi
checkUniversalLinkReady
:
^
(
WXULCheckStep
step
,
WXCheckULStepResult
*
result
)
{
[
WXApi
checkUniversalLinkReady
:
^
(
WXULCheckStep
step
,
WXCheckULStepResult
*
result
)
{
NSString
*
log
=
[
NSString
stringWithFormat
:
@"%@, %u, %@, %@"
,
@
(
step
),
result
.
success
,
result
.
errorInfo
,
result
.
suggestion
];
NSString
*
log
=
[
NSString
stringWithFormat
:
@"%@, %u, %@, %@"
,
@
(
step
),
result
.
success
,
result
.
errorInfo
,
result
.
suggestion
];
[
self
logToFlutterWithDetail
:
log
];
[
self
logToFlutterWithDetail
:
log
];
}];
}];
...
@@ -187,7 +187,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -187,7 +187,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
}
}
-
(
void
)
registerApp
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
-
(
void
)
registerApp
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
NSNumber
*
doOnIOS
=
call
.
arguments
[
@"iOS"
];
NSNumber
*
doOnIOS
=
call
.
arguments
[
@"iOS"
];
if
(
!
[
doOnIOS
boolValue
])
{
if
(
!
[
doOnIOS
boolValue
])
{
result
(
@NO
);
result
(
@NO
);
...
@@ -277,7 +277,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -277,7 +277,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
NSString
*
sign
=
call
.
arguments
[
@"sign"
];
NSString
*
sign
=
call
.
arguments
[
@"sign"
];
[
FluwxDelegate
defaultManager
].
extData
=
call
.
arguments
[
@"extData"
];
[
FluwxDelegate
defaultManager
].
extData
=
call
.
arguments
[
@"extData"
];
NSString
*
appId
=
call
.
arguments
[
@"appId"
];
NSString
*
appId
=
call
.
arguments
[
@"appId"
];
PayReq
*
req
=
[[
PayReq
alloc
]
init
];
PayReq
*
req
=
[[
PayReq
alloc
]
init
];
req
.
openID
=
(
appId
==
(
id
)
[
NSNull
null
])
?
nil
:
appId
;
req
.
openID
=
(
appId
==
(
id
)
[
NSNull
null
])
?
nil
:
appId
;
req
.
partnerId
=
partnerId
;
req
.
partnerId
=
partnerId
;
...
@@ -393,7 +393,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -393,7 +393,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
-
(
void
)
handelGetExtMsgWithCall
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
-
(
void
)
handelGetExtMsgWithCall
:(
FlutterMethodCall
*
)
call
result
:(
FlutterResult
)
result
{
result
([
FluwxDelegate
defaultManager
].
extMsg
);
result
([
FluwxDelegate
defaultManager
].
extMsg
);
[
FluwxDelegate
defaultManager
].
extMsg
=
nil
;
[
FluwxDelegate
defaultManager
].
extMsg
=
nil
;
}
}
...
@@ -443,14 +443,14 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -443,14 +443,14 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
}
}
#ifndef SCENE_DELEGATE
#ifndef SCENE_DELEGATE
-
(
BOOL
)
application
:(
UIApplication
*
)
application
continueUserActivity
:(
NSUserActivity
*
)
userActivity
restorationHandler
:(
void
(
^
)(
NSArray
*
_Nonnull
))
restorationHandler
{
-
(
BOOL
)
application
:(
UIApplication
*
)
application
continueUserActivity
:(
NSUserActivity
*
)
userActivity
restorationHandler
:(
void
(
^
)(
NSArray
*
_Nonnull
))
restorationHandler
{
// TODO: (if need) cache userActivity and handle it once WXApi is registered
// TODO: (if need) cache userActivity and handle it once WXApi is registered
return
[
WXApi
handleOpenUniversalLink
:
userActivity
delegate
:
self
];
return
[
WXApi
handleOpenUniversalLink
:
userActivity
delegate
:
self
];
}
}
#endif
#endif
#ifdef SCENE_DELEGATE
#ifdef SCENE_DELEGATE
-
(
void
)
scene
:(
UIScene
*
)
scene
continueUserActivity
:(
NSUserActivity
*
)
userActivity
API_AVAILABLE
(
ios
(
13
.
0
))
{
-
(
void
)
scene
:(
UIScene
*
)
scene
continueUserActivity
:(
NSUserActivity
*
)
userActivity
API_AVAILABLE
(
ios
(
13
.
0
))
{
// TODO: (if need) cache userActivity and handle it once WXApi is registered
// TODO: (if need) cache userActivity and handle it once WXApi is registered
[
WXApi
handleOpenUniversalLink
:
userActivity
delegate
:
self
];
[
WXApi
handleOpenUniversalLink
:
userActivity
delegate
:
self
];
}
}
...
@@ -532,7 +532,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -532,7 +532,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
imageData
=
flutterImageData
.
data
;
imageData
=
flutterImageData
.
data
;
}
}
NSString
*
imageDataHash
=
sourceImage
[
@"imgDataHash"
];
NSString
*
imageDataHash
=
sourceImage
[
@"imgDataHash"
];
FlutterStandardTypedData
*
flutterThumbData
=
call
.
arguments
[
fluwxKeyThumbData
];
FlutterStandardTypedData
*
flutterThumbData
=
call
.
arguments
[
fluwxKeyThumbData
];
NSData
*
thumbData
=
nil
;
NSData
*
thumbData
=
nil
;
...
@@ -1030,7 +1030,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -1030,7 +1030,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
[
result
setValue
:
showMessageFromWXReq
.
country
forKey
:
@"country"
];
[
result
setValue
:
showMessageFromWXReq
.
country
forKey
:
@"country"
];
// Cache extMsg for later use (by calling 'getExtMsg')
// Cache extMsg for later use (by calling 'getExtMsg')
[
FluwxDelegate
defaultManager
].
extMsg
=
wmm
.
messageExt
;
[
FluwxDelegate
defaultManager
].
extMsg
=
wmm
.
messageExt
;
if
(
_isRunning
)
{
if
(
_isRunning
)
{
[
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
[
_channel
invokeMethod
:
@"onWXShowMessageFromWX"
arguments
:
result
];
...
@@ -1053,7 +1053,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -1053,7 +1053,7 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
[
result
setValue
:
launchFromWXReq
.
country
forKey
:
@"country"
];
[
result
setValue
:
launchFromWXReq
.
country
forKey
:
@"country"
];
// Cache extMsg for later use (by calling 'getExtMsg')
// Cache extMsg for later use (by calling 'getExtMsg')
[
FluwxDelegate
defaultManager
].
extMsg
=
wmm
.
messageExt
;
[
FluwxDelegate
defaultManager
].
extMsg
=
wmm
.
messageExt
;
if
(
_isRunning
)
{
if
(
_isRunning
)
{
[
_channel
invokeMethod
:
@"onWXLaunchFromWX"
arguments
:
result
];
[
_channel
invokeMethod
:
@"onWXLaunchFromWX"
arguments
:
result
];
...
@@ -1553,11 +1553,11 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
...
@@ -1553,11 +1553,11 @@ NSObject <FlutterPluginRegistrar> *_fluwxRegistrar;
}
}
-
(
NSString
*
)
fetchWeChatAppId
{
-
(
NSString
*
)
fetchWeChatAppId
{
NSDictionary
*
infoDic
=
[[
NSBundle
mainBundle
]
infoDictionary
];
NSDictionary
*
infoDic
t
=
[[
NSBundle
mainBundle
]
infoDictionary
];
NSArray
*
types
=
infoDic
[
@"CFBundleURLTypes"
];
NSArray
*
types
=
infoDict
[
@"CFBundleURLTypes"
];
for
(
NSDictionary
*
dic
in
types
)
{
for
(
NSDictionary
*
dict
in
types
)
{
if
([
@"weixin"
isEqualToString
:
dic
[
@"CFBundleURLName"
]])
{
if
([
@"weixin"
isEqualToString
:
dic
t
[
@"CFBundleURLName"
]])
{
return
dic
[
@"CFBundleURLSchemes"
][
0
];
return
dic
t
[
@"CFBundleURLSchemes"
][
0
];
}
}
}
}
return
nil
;
return
nil
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论