Skip to content

Commit

Permalink
feat: Initialize SDK and add systemType.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett committed Aug 7, 2024
1 parent 020582d commit e08fb76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions OpenIMSDK/Interface/OIMManager+Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL compression;
// Log output to local, default is YES
@property (nonatomic, assign) BOOL isLogStandardOutput;

@property (nonatomic, copy, nullable) NSString *logFilePath;

// for log
@property (nonatomic, copy) NSString *systemType;

@end

@interface OIMManager (Connection)
Expand Down
4 changes: 3 additions & 1 deletion OpenIMSDK/Interface/OIMManager+Connection.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ - (instancetype)init {
self.isLogStandardOutput = YES;
self.logLevel = 6;
self.compression = NO;
self.systemType = @"native_iOS";
}

return self;
Expand Down Expand Up @@ -55,6 +56,7 @@ - (BOOL)initSDKWithConfig:(OIMInitConfig *)config
param[@"isCompression"] = @(config.compression);
param[@"logFilePath"] = config.logFilePath;
param[@"isLogStandardOutput"] = @(config.isLogStandardOutput);
param[@"systemType"] = config.systemType;

return Open_im_sdkInitSDK([self class].callbacker, [self operationId], param.mj_JSONString);
}
Expand All @@ -72,6 +74,6 @@ - (void)uploadLogsWithProgress:(OIMUploadProgressCallback)onProgress

UploadLogsCallbackProxy *progress = [[UploadLogsCallbackProxy alloc] initWithOnProgress:onProgress];

Open_im_sdkUploadLogs(callback, [self operationId], @(line), ex, progress);
Open_im_sdkUploadLogs(callback, [self operationId], line, ex, progress);
}
@end

0 comments on commit e08fb76

Please sign in to comment.