Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OffcnIMSDKiOS
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
opensource
OffcnIMSDKiOS
Commits
0b96ac09
Commit
0b96ac09
authored
Sep 08, 2020
by
zhangyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待处理
parent
b1724dd9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
AppDelegate.m
OffcnIMSDKiOS/AppDelegate.m
+1
-0
AppDelegate+OffcnIMPush.h
...MSDKiOS/ExposedInterface-(外放接口)/AppDelegate+OffcnIMPush.h
+4
-1
AppDelegate+OffcnIMPush.m
...MSDKiOS/ExposedInterface-(外放接口)/AppDelegate+OffcnIMPush.m
+19
-1
OffcnNetworkExecutor.m
...IMSDKiOS/Tools-(工具)/NetworkManager/OffcnNetworkExecutor.m
+2
-2
No files found.
OffcnIMSDKiOS/AppDelegate.m
View file @
0b96ac09
...
...
@@ -127,6 +127,7 @@
-
(
void
)
application
:(
UIApplication
*
)
application
didReceiveRemoteNotification
:(
NSDictionary
*
)
userInfo
{
NSLog
(
@"接收到远程推送通知 ---- %@"
,
userInfo
);
[
self
didReceiveRemoteNotification
:
userInfo
];
/*
"name" : "YFPushTest",
...
...
OffcnIMSDKiOS/ExposedInterface-(外放接口)/AppDelegate+OffcnIMPush.h
View file @
0b96ac09
//
//
...
...
@@ -17,6 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
//解析deviceToken
-
(
NSString
*
)
hexStringForData
:(
NSData
*
)
data
;
//收到通知
-
(
void
)
didReceiveRemoteNotification
:(
NSDictionary
*
)
userInfo
;
@end
NS_ASSUME_NONNULL_END
...
...
OffcnIMSDKiOS/ExposedInterface-(外放接口)/AppDelegate+OffcnIMPush.m
View file @
0b96ac09
//
//
...
...
@@ -7,6 +7,10 @@
//
#import "AppDelegate+OffcnIMPush.h"
#import "OffcnIMModel.h"
#import "ZYJMJExtension.h"
#import "DataSafe.h"
#import "OffcnIMZYJFMDBHandler.h"
@implementation
AppDelegate
(
OffcnIMPush
)
...
...
@@ -40,4 +44,18 @@
}
return
hexString
;
}
-
(
void
)
didReceiveRemoteNotification
:(
NSDictionary
*
)
userInfo
{
NSString
*
revStr
=
@""
;
OffcnIMModel
*
IMModel
=
[
OffcnIMModel
mj_ZYJobjectWithKeyValues
:
revStr
];
//存数据库
OffcnIMBodyModel
*
body
=
IMModel
.
body
;
body
.
isSentSuccess
=
1
;
body
.
bymyself
=
0
;
body
.
isRead
=
0
;
[[
OffcnIMZYJFMDBHandler
sharedInstance
]
insertChatInfoToFMDBWithModel
:
body
];
[[
OffcnIMZYJFMDBHandler
sharedInstance
]
chatlistCacheInfo
:
body
callback
:
nil
];
}
@end
OffcnIMSDKiOS/Tools-(工具)/NetworkManager/OffcnNetworkExecutor.m
View file @
0b96ac09
//
//
...
...
@@ -191,7 +191,7 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@?accid=%@"
,
getRecentSessionsURL
,
accid
];
[
OffcnBaseNetworking
getFromURL
:
url
params
:
nil
finished
:^
(
BaseResponse
*
baseResponse
)
{
if
(
baseResponse
.
isSuccess
)
{
//接口缺少返回msg_from,然后解析存数据库
OffcnIMRecentMsgModel
*
recentMsgModel
=
[
OffcnIMRecentMsgModel
mj_ZYJobjectWithKeyValues
:
baseResponse
.
responseObject
];
for
(
int
i
=
0
;
i
<
recentMsgModel
.
sessions
.
count
;
i
++
)
{
...
...
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