Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
e299ec07
Commit
e299ec07
authored
Sep 18, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化APNS推送配置正式或测试环境
parent
f630176a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
bootstrap/src/test/java/io/geekidea/springbootplus/test/IosApnsPushTest.java
+1
-1
common/src/main/java/com/wecloud/im/ws/sender/IosPush.java
+1
-1
common/src/main/java/com/wecloud/im/ws/sender/PushTask.java
+10
-1
No files found.
bootstrap/src/test/java/io/geekidea/springbootplus/test/IosApnsPushTest.java
View file @
e299ec07
...
@@ -12,7 +12,7 @@ public class IosApnsPushTest {
...
@@ -12,7 +12,7 @@ public class IosApnsPushTest {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// * @param apnsCertificatePath 证书
// * @param apnsCertificatePath 证书
// * @param productFlag 环境
// * @param productFlag 环境
,测试=Boolean.FALSE,正式=Boolean.TRUE
// * @param deviceToken 设备token
// * @param deviceToken 设备token
// * @param alertTitle 标题
// * @param alertTitle 标题
// * @param alertBody 副标题
// * @param alertBody 副标题
...
...
common/src/main/java/com/wecloud/im/ws/sender/IosPush.java
View file @
e299ec07
...
@@ -67,7 +67,7 @@ public class IosPush {
...
@@ -67,7 +67,7 @@ public class IosPush {
/**
/**
* @param inputStream 证书输入流
* @param inputStream 证书输入流
* @param productFlag 环境
* @param productFlag 环境
,测试=Boolean.FALSE,正式=Boolean.TRUE
* @param deviceToken 设备token
* @param deviceToken 设备token
* @param alertTitle 标题
* @param alertTitle 标题
* @param alertBody 副标题
* @param alertBody 副标题
...
...
common/src/main/java/com/wecloud/im/ws/sender/PushTask.java
View file @
e299ec07
...
@@ -216,7 +216,16 @@ public class PushTask {
...
@@ -216,7 +216,16 @@ public class PushTask {
// 解码
// 解码
byte
[]
decode
=
Base64
.
decode
(
apns
.
getApnsFileValue
());
byte
[]
decode
=
Base64
.
decode
(
apns
.
getApnsFileValue
());
InputStream
inputStream2
=
new
ByteArrayInputStream
(
decode
);
InputStream
inputStream2
=
new
ByteArrayInputStream
(
decode
);
IosPush
.
push
(
certificatePassword
,
inputStream2
,
Boolean
.
FALSE
,
deviceToken
,
alertTitle
,
alertBody
,
// productFlag 环境,测试=Boolean.FALSE,正式=Boolean.TRUE
Boolean
productFlag
=
Boolean
.
FALSE
;
// 正式1,测试0
if
(
apns
.
getEnv
()
==
1
)
{
productFlag
=
Boolean
.
TRUE
;
}
IosPush
.
push
(
certificatePassword
,
inputStream2
,
productFlag
,
deviceToken
,
alertTitle
,
alertBody
,
contentAvailable
,
customProperty
,
badge
contentAvailable
,
customProperty
,
badge
,
DeliveryPriority
.
IMMEDIATE
,
PushType
.
ALERT
,
topicBundleId
,
,
DeliveryPriority
.
IMMEDIATE
,
PushType
.
ALERT
,
topicBundleId
,
sound
);
sound
);
...
...
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