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
93cb161a
Commit
93cb161a
authored
Aug 20, 2020
by
zhangyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
连接失败处理
parent
c8ef178a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
+7
-19
AppDelegate.m
OffcnIMSDKiOS/AppDelegate.m
+0
-2
ViewController.mm
OffcnIMSDKiOS/ViewController.mm
+7
-17
No files found.
OffcnIMSDKiOS/AppDelegate.m
View file @
93cb161a
...
...
@@ -32,8 +32,6 @@
NSLog
(
@"changeEnvironment---%@"
,
changeEnvironment
);
[
OffcnIMSDKiOS
defaultService
].
isTest
=
[
changeEnvironment
boolValue
];
[
OffcnIMSDKiOS
defaultService
].
isTest
=
YES
;
//获取网络状态和内部初始化处理
[[
OffcnIMSDKiOS
defaultService
]
startNotifierUseRealReachability
];
...
...
OffcnIMSDKiOS/ViewController.mm
View file @
93cb161a
...
...
@@ -63,17 +63,18 @@
//Z_CONN_IM_SRV_BROKEN,连接断开
//Z_DISCONN_IM_SRV_OK,手动断开成功
-
(
void
)
OnOImCoreEventWithCode
:(
int
)
code
context
:(
const
char
*
)
context
{
if
(
code
==
1
||
code
==
2
)
{
[
self
.
adapter
DisConnectImServer
];
}
}
-
(
IBAction
)
disconnectAction
:(
UIButton
*
)
sender
{
[
self
.
adapter
DisConnectImServer
];
}
-
(
IBAction
)
sendMegAction
:(
UIButton
*
)
sender
{
// NSString *meg = @"qwe";
// [self.adapter SendUserMessage:meg length:(int)meg.length type:kMsg_Type_Normal];
}
}
//发送本地通知
-
(
IBAction
)
sendLocalNotiAction
:(
UIButton
*
)
sender
{
...
...
@@ -167,19 +168,6 @@
self
.
msg_type
=
OffcnSDKMsgTypeText
;
self
.
dataDic
=
[
NSMutableDictionary
dictionaryWithObject
:
@"我是一只小青龙"
forKey
:
@"msg"
];
}
-
(
NSString
*
)
getAllCurrentTimes
{
NSDateFormatter
*
formatter
=
[[
NSDateFormatter
alloc
]
init
];
[
formatter
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
NSDate
*
datenow
=
[
NSDate
date
];
NSString
*
currentTimeString
=
[
formatter
stringFromDate
:
datenow
];
return
currentTimeString
;
}
-
(
NSString
*
)
documentPath
{
NSString
*
docDir
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
firstObject
];
docDir
=
[
docDir
stringByAppendingPathComponent
:
@"test"
];
return
docDir
;
}
#pragma mark UIImagePickerControllerDelegate
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
UIImagePickerControllerInfoKey
,
id
>
*
)
info
{
...
...
@@ -203,6 +191,8 @@
//访问图片库错误
}
}
//可旋转屏幕
-
(
BOOL
)
shouldAutorotate
{
return
NO
;
...
...
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