File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
ios/RNNeteaseIm/RNNeteaseIm Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 88
99#import " DWCustomAttachmentDecoder.h"
1010
11-
1211@implementation DWCustomAttachmentDecoder
1312
1413- (id <NIMCustomAttachment>)decodeAttachment : (NSString *)content
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ - (void)onLogin:(NIMLoginStep)step{
8080 default :
8181 break ;
8282 }
83- NSLog (@" --------------------%@ " ,strStatus);
83+ // NSLog(@"--------------------%@",strStatus);
8484 [NIMModel initShareMD ].NetStatus = strStatus;
8585}
8686// 删除一行
Original file line number Diff line number Diff line change 99#import " RNNeteaseIm.h"
1010#import " RCTUtils.h"
1111#import " RNNotificationCenter.h"
12+
1213@implementation RNNeteaseIm
1314
15+ - (instancetype )init {
16+ if (self = [super init ]) {
17+
18+ }
19+ [self initController ];
20+ return self;
21+ }
22+
1423@synthesize bridge = _bridge;
1524- (dispatch_queue_t )methodQueue
1625{
@@ -26,10 +35,6 @@ - (dispatch_queue_t)methodQueue
2635RCT_EXPORT_METHOD(login:(nonnull NSString *)account token:(nonnull NSString *)token
2736 resolve:(RCTPromiseResolveBlock)resolve
2837 reject:(RCTPromiseRejectBlock)reject){
29- [self setSendState ];
30- [[NIMViewController initWithController ] addDelegate ];
31- [[NoticeViewController initWithNoticeViewController ]initWithDelegate];
32- [[RNNotificationCenter sharedCenter ] start ];
3338 // 请将 NIMMyAccount 以及 NIMMyToken 替换成您自己提交到此App下的账号和密码
3439 [[NIMSDK sharedSDK ].loginManager login: account token: token completion: ^(NSError *error) {
3540 if (!error) {
@@ -567,6 +572,12 @@ - (void)removAllRecentSessions{
567572
568573}
569574
575+ - (void )initController {
576+ [self setSendState ];
577+ [[NIMViewController initWithController ] addDelegate ];
578+ [[NoticeViewController initWithNoticeViewController ]initWithDelegate];
579+ [[RNNotificationCenter sharedCenter ] start ];
580+ }
570581
571582-(void )setSendState {
572583 NIMModel *mod = [NIMModel initShareMD ];
You can’t perform that action at this time.
0 commit comments