Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
GMShareSDK
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMShareSDK
Commits
01a81f1d
Commit
01a81f1d
authored
Dec 04, 2020
by
王伟明
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lwq7.37.0' into 'master'
fix 分享一张图片时添加客户端安装检查 See merge request
!6
parents
4717a01e
ba05d8b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
GMShareSDK.m
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
+28
-1
No files found.
GMShareSDK/Classes/ShareSDK/GMShareSDK.m
View file @
01a81f1d
...
...
@@ -45,7 +45,9 @@
+
(
BOOL
)
isClientInstalled
:
(
GMSharePlatform
)
platformType
{
if
(
platformType
==
GMSharePlatformQQ
)
{
if
(
platformType
==
GMSharePlatformQQ
||
platformType
==
GMSharePlatformQQSpace
||
platformType
==
GMSharePlatformQQFriend
)
{
return
[
QQApiInterface
isQQInstalled
]
?
YES
:
NO
;
}
else
if
((
platformType
==
GMSharePlatformWechatTimeline
)
|
(
platformType
==
GMSharePlatformWechatSession
)
|
(
platformType
==
GMSharePlatformWechat
))
{
return
[
WXApi
isWXAppInstalled
]
?
YES
:
NO
;
...
...
@@ -218,6 +220,13 @@
只分享一张图片
*/
-
(
void
)
shareImage
:
(
UIImage
*
)
image
platform
:
(
GMSharePlatform
)
platformType
{
if
(
!
[
GMShareSDK
isClientInstalled
:
platformType
])
{
NSString
*
platfomName
=
[
self
getPlatformNameWithType
:
platformType
];
if
(
platfomName
)
{
[
UIAlertController
showgm_OKAlertWithTitle
:
@"提示"
message
:[
NSString
stringWithFormat
:
@"未安装%@"
,
platfomName
]
actionTitle
:
@"取消"
actionHandler
:^
{}];
return
;
}
}
switch
(
platformType
)
{
case
GMSharePlatformQQFriend
:
{
[
self
QQFriendShareWithImage
:
image
];
...
...
@@ -641,5 +650,23 @@
// req.mpInfo = [DouyinOpenSDKMPInfo mpInfoWithIdentifier:@"you_mp_identifier" title:@"title" desc:@"desc" startPageURL:nil];
}
-
(
NSString
*
)
getPlatformNameWithType
:
(
GMSharePlatform
)
platformType
{
switch
(
platformType
)
{
case
GMSharePlatformSinaWeibo
:
return
@"微博客户端"
;
case
GMSharePlatformQQSpace
:
return
@"QQ客户端"
;
case
GMSharePlatformQQFriend
:
return
@"QQ客户端"
;
case
GMSharePlatformWechatSession
:
return
@"微信客户端"
;
case
GMSharePlatformWechatTimeline
:
return
@"微信客户端"
;
default
:
break
;
}
return
nil
;
}
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment