Commit 3297fba3 by zhangyunjie

1201

parent d88e42c8
......@@ -364,10 +364,16 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OffcnIMSDKiOS_Example/Pods-OffcnIMSDKiOS_Example-resources.sh",
"${PODS_ROOT}/../../OffcnIMSDKiOS/Resources/OffcnIMSDKiOSIcon.bundle",
"${PODS_ROOT}/../../OffcnIMSDKiOS/Resources/ZYJExpressionKeyboard.bundle",
"${PODS_ROOT}/../../OffcnIMSDKiOS/Resources/ZYJTZImagePickerController.bundle",
"${PODS_ROOT}/../../OffcnIMSDKiOS/Resources/ZYYJMJRefresh.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/OffcnIMSDKiOSIcon.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ZYJExpressionKeyboard.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ZYJTZImagePickerController.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ZYYJMJRefresh.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
......@@ -381,13 +387,27 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-OffcnIMSDKiOS_Example/Pods-OffcnIMSDKiOS_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/IQKeyboardManager/IQKeyboardManager.framework",
"${BUILT_PRODUCTS_DIR}/LMJDropdownMenu/LMJDropdownMenu.framework",
"${PODS_ROOT}/../../OffcnIMSDKiOS/Frameworks/oimcore.framework",
"${BUILT_PRODUCTS_DIR}/YYCache/YYCache.framework",
"${BUILT_PRODUCTS_DIR}/YYCategories/YYCategories.framework",
"${BUILT_PRODUCTS_DIR}/YYImage/YYImage.framework",
"${BUILT_PRODUCTS_DIR}/YYModel/YYModel.framework",
"${BUILT_PRODUCTS_DIR}/YYText/YYText.framework",
"${BUILT_PRODUCTS_DIR}/YYWebImage/YYWebImage.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManager.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LMJDropdownMenu.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/oimcore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYCategories.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYModel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYText.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYWebImage.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
......@@ -542,9 +562,9 @@
INFOPLIST_FILE = "OffcnIMSDKiOS/OffcnIMSDKiOS-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = com.eoffcn.classonline;
PRODUCT_BUNDLE_IDENTIFIER = com.eoffcn.questions;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ClassonlineDev;
PROVISIONING_PROFILE_SPECIFIER = WXQuestionDev;
SWIFT_VERSION = 4.0;
WRAPPER_EXTENSION = app;
};
......@@ -564,9 +584,9 @@
INFOPLIST_FILE = "OffcnIMSDKiOS/OffcnIMSDKiOS-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = com.eoffcn.classonline;
PRODUCT_BUNDLE_IDENTIFIER = com.eoffcn.questions;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ClassonlineDev;
PROVISIONING_PROFILE_SPECIFIER = WXQuestionDev;
SWIFT_VERSION = 4.0;
WRAPPER_EXTENSION = app;
};
......
......@@ -158,6 +158,8 @@
} ProgressPercent:^(NSString *extIndex, NSString *filePath, float percent) {
NSLog(@"extIndex == %@,filePath == %@,percent == %.2f", extIndex,filePath,percent);
} tidStrFinished:^(NSString *extIndex, NSString *tidString) {
}];
}
#pragma mark - 切换环境
......@@ -288,6 +290,8 @@
} ProgressPercent:^(NSString *extIndex, NSString *filePath, float percent) {
NSLog(@"extIndex == %@,filePath == %@,percent == %.2f", extIndex,filePath,percent);
} tidStrFinished:^(NSString *extIndex, NSString *tidString) {
}];
}
- (IBAction)noReadListAction:(UIButton *)sender {
......@@ -494,6 +498,8 @@
} ProgressPercent:^(NSString *extIndex, NSString *filePath, float percent) {
NSLog(@"extIndex == %@,filePath == %@,percent == %.2f", extIndex,filePath,percent);
} tidStrFinished:^(NSString *extIndex, NSString *tidString) {
}];
}
- (IBAction)uploadFile:(UIButton *)sender {
......@@ -510,6 +516,8 @@
} ProgressPercent:^(NSString *extIndex, NSString *filePath, float percent) {
NSLog(@"extIndex == %@,filePath == %@,percent == %.2f", extIndex,filePath,percent);
} tidStrFinished:^(NSString *extIndex, NSString *tidString) {
}];
}
- (IBAction)pressureTest:(UIButton *)sender {
......
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'OffcnIMSDKiOS'
s.version = '1.0.0.23.12'
s.version = '1.2.0.1'
s.summary = 'OffcnIMSDKiOS.'
s.description = <<-DESC
......@@ -42,13 +42,13 @@ TODO: Add long description of the pod here.
s.user_target_xcconfig = {'OTHER_LDFLAGS' => '-ObjC'}
#dependency : 该pod依赖的
# s.dependency 'IQKeyboardManager', '5.0.8'
#
# s.dependency 'YYModel', '~> 1.0.4'
# s.dependency 'YYCache', '~> 1.0.4'
# s.dependency 'YYCategories', '~> 1.0.4'
# s.dependency 'YYImage', '~> 1.0.4'
# s.dependency 'YYWebImage', '~> 1.0.5'
# s.dependency 'YYText', '~> 1.0.7'
s.dependency 'IQKeyboardManager', '5.0.8'
s.dependency 'YYModel', '~> 1.0.4'
s.dependency 'YYCache', '~> 1.0.4'
s.dependency 'YYCategories', '~> 1.0.4'
s.dependency 'YYImage', '~> 1.0.4'
s.dependency 'YYWebImage', '~> 1.0.5'
s.dependency 'YYText', '~> 1.0.7'
end
//
// OffcnIMChatInfoViewController.h
// classonline
//
// Created by HX on 2020/10/14.
// Copyright © 2020 offcn. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
NS_ASSUME_NONNULL_BEGIN
//自己发送消息通知
#define kSendMsgNotification @"kSendMsgNotification"
#define kResultKey @"kResultKey"
#define kObjcKey @"kObjcKey"
//页面显示消失
#define kPageShowNotification @"kPageShowNotification"
@class OffcnIMContactInfoModel;
@interface OffcnIMChatInfoViewController : UIViewController
//联系人model
@property (nonatomic, strong) OffcnIMUserList_listModel *contactInfoModel;
//滑动到底部
- (void)scrollTableToFoot:(BOOL)animated;
@end
NS_ASSUME_NONNULL_END
//
// OffcnIMChatListViewController.h
// classonline
//
// Created by HX on 2020/10/14.
// Copyright © 2020 offcn. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
NS_ASSUME_NONNULL_BEGIN
//消息总数回调
typedef void(^OffcnIMTotal_unread_number)(NSInteger num);
@interface OffcnIMChatListViewController : UIViewController
@property (nonatomic, assign) BOOL isNavBarHidden;//是否隐藏导航
/// 自定义UI
/// @param viewTopHeight (view top的高度,一级子视图传0,二级子视图传0.1或自定义高度)
/// @param viewBottomHeight (view bottom的高度)
/// @param isNeedSearch 是否需要搜索功能
-(void)setUIWithViewTopHeight:(CGFloat)viewTopHeight ViewBottomHeight:(CGFloat)viewBottomHeight isNeedSearch:(BOOL)isNeedSearch;
@property (nonatomic, assign) BOOL isShowNoWifiTip;//显示没网提示
@property (nonatomic, copy) OffcnIMTotal_unread_number total_unread_number;//消息总数回调
//返回联系人信息
-(OffcnIMUserList_listModel *)getContactInfoModelWithUserID:(NSString *)userID;
//清空数据
-(void)clearData;
//刷新
-(void)reloadData;
@end
NS_ASSUME_NONNULL_END
......@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)OffcnIMBodyModel *body;
@end
@class OffcnIMMsgModel;
@class OffcnIMMsgModel,OffcnIMPrivateChatListModel;
@interface OffcnIMBodyModel : NSObject
@property (nonatomic,assign)BOOL is_top;//是否置顶
......@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy)NSString *version;
@property (nonatomic,copy)NSString *send_time;//发送时间
@property (nonatomic,assign)NSInteger msg_seq;//消息时序
@property (nonatomic,assign)NSInteger msg_scope;// 区分单聊:1以及群聊:2
@property (nonatomic,assign)NSInteger msg_scope;// 区分单聊:1以及群聊:2;私聊9
@property (nonatomic,copy)NSString *msg_from;//发送消息的用户id
@property (nonatomic,copy)NSString *msg_to;//接受消息的用户id
@property (nonatomic,copy)NSString *to;//对方Id
......@@ -36,9 +36,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign)BOOL isJoinSession;//
@property (nonatomic,copy)NSString *ext;//im开发者扩展字段,私聊内容
@property (nonatomic,strong)OffcnIMPrivateChatListModel *privateModel;//私聊内容
@property (nonatomic,copy)NSString *extIndex;//开发者扩展字段
@property (nonatomic,copy)NSString *ext;//开发者扩展字段
@property (nonatomic,assign)CGFloat cellH;//扩展字段
@property (nonatomic,copy)NSString *ext_custom;//开发者扩展字段
//以下数据库使用
@property (nonatomic,assign)NSInteger isSentSuccess;//是否发送成功
......@@ -158,5 +161,84 @@ NS_ASSUME_NONNULL_BEGIN
@end
@class OffcnIMUserList_list_classesModel;
@interface OffcnIMUserList_listModel : NSObject
@property (nonatomic, assign) NSInteger cell_type;//1:群发消息,2:单发消息
@property (nonatomic, copy) NSString *key;//群ID
@property (nonatomic, strong) OffcnIMUserList_list_classesModel *classes;//群成员
@property (nonatomic, copy) NSString *room_name;//房间标题
@property (nonatomic, copy) NSString *room_time;//直播时间例如:@"12:00-15:00"
@property (nonatomic, copy) NSString *room_class;//所属班级
@property (nonatomic, copy) NSString *room_num;//房间号
@property (nonatomic, copy) NSString *avatar;//头像地址
@property (nonatomic, copy) NSString *sortChar;//无地址时头像展示一个字(暂无此功能)
@property (nonatomic, copy) NSString *avatar_color;//无地址时头像背景色(暂无此功能)
@property (nonatomic, copy) NSString *name;//名字
@property (nonatomic, copy) NSString *remark;//备注名
@property (nonatomic, copy) NSString *phone;//用户手机号
@property (nonatomic, copy) NSString *name_original;//原始名字
@property (nonatomic, copy) NSString *user_id;//用户ID
@property (nonatomic, copy) NSString *expand;//拓展字段
@property (nonatomic, assign) NSInteger expandH;//拓展字段
@end
@interface OffcnIMUserList_list_classesModel : NSObject
@property (nonatomic, copy) NSString *count;//成员人数
@property (nonatomic, strong) NSMutableArray *name;//成员名字
@end
//私聊
@interface OffcnIMPrivateChatListModel : NSObject
@property (nonatomic,assign)BOOL is_top;//是否置顶
@property (nonatomic,assign)CGFloat cellH;//扩展字段
@property (nonatomic,copy)NSString *ID;
@property (nonatomic,copy)NSString *create_time;
@property (nonatomic,copy)NSString *msg_to;
@property (nonatomic,copy)NSString *msg_to_name;
@property (nonatomic,copy)NSString *msg_to_role;
@property (nonatomic,copy)NSString *msg_from;
@property (nonatomic,copy)NSString *msg_from_name;
@property (nonatomic,copy)NSString *msg_from_role;
@property (nonatomic,assign)NSInteger num;// 未读消息数
@property (nonatomic,assign)NSInteger online;// 是否在线 0:不在线 1:在线
@property (nonatomic,copy)NSString *room_num;
@property (nonatomic,copy)NSString *send_time;
@property (nonatomic,copy)NSString *msg_unique;
@property (nonatomic,strong)NSMutableArray *content;//消息内容
@property (nonatomic,copy)NSMutableAttributedString *attributedS;//文本消息内容
@property (nonatomic,assign)BOOL isPrivating;//在私聊界面
@property (nonatomic,assign)BOOL isHasPrivated;//以前私聊过
@end
@interface OffcnIMPrivateChatContentModel : NSObject
@property (nonatomic,copy)NSString *type;//text/face/image
@property (nonatomic,copy)NSString *data;
@property (nonatomic,copy)NSString *msg;//消息ID
@property (nonatomic,copy)NSString *uuid;//被@人的id
@property (nonatomic,copy)NSString *nickname;//被@人的name
@property (nonatomic,assign)BOOL isDeletBtn;
@end
NS_ASSUME_NONNULL_END
//
// OffcnIMPrivateChatInfoViewController.h
// OffcnIMSDKiOSDemo
//
// Created by vockey on 2021/4/8.
// Copyright © 2021 offcn. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
NS_ASSUME_NONNULL_BEGIN
//自己发送消息通知
#define kSendPrivateMsgNotification @"kSendPrivateMsgNotification"
#define kResultKey @"kResultKey"
#define kObjcKey @"kObjcKey"
//页面显示消失
#define kPrivatePageShowNotification @"kPrivatePageShowNotification"
@class OffcnIMContactInfoModel;
@interface OffcnIMPrivateChatInfoViewController : UIViewController
//联系人model
@property (nonatomic, strong) OffcnIMUserList_listModel *contactInfoModel;
//滑动到底部
- (void)scrollTableToFoot:(BOOL)animated;
@end
NS_ASSUME_NONNULL_END
//
// OffcnIMPrivateChatListViewController.h
// OffcnIMSDKiOSDemo
//
// Created by vockey on 2021/4/8.
// Copyright © 2021 offcn. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
NS_ASSUME_NONNULL_BEGIN
//消息总数回调
typedef void(^OffcnIMPrivateChatTotal_unread_number)(NSInteger num);
@interface OffcnIMPrivateChatListViewController : UIViewController
@property (nonatomic, copy) OffcnIMPrivateChatTotal_unread_number privateChatTotal_unread_number;//消息总数回调
//返回联系人信息
-(OffcnIMUserList_listModel *)getPrivateChatContactInfoModelWithUserID:(NSString *)userID room_num:(NSString *)room_num;
//清空数据
-(void)clearData;
//刷新
-(void)reloadData;
@end
NS_ASSUME_NONNULL_END
File mode changed from 100644 to 100755
......@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
#import "OffcnIMModel.h"
static const NSString *OffcnIMSDKiOSVersion = @"1.0.0.23.12";
static const NSString *OffcnIMSDKiOSVersion = @"1.2.0.1";
typedef NS_ENUM(NSUInteger, OffcnIMSDKReachabilityStatus) {
OffcnIMSDKReachabilityStatusNotReachable = 0,
......@@ -65,6 +65,7 @@ typedef void(^OffcnIMSDKReachabilityStatusCallBack)(OffcnIMSDKReachabilityStatus
/// @param finished 结果回调
-(void)getUserAllUnreadNumberWithAccid:(NSString *)accid Finished:(void(^)(BOOL success,NSInteger total_unread_number,NSString *errorMessage))finished;
/// 发送消息
/// @param msg_fromID 发送人ID
/// @param msg_toID 接收人ID
......@@ -75,7 +76,9 @@ typedef void(^OffcnIMSDKReachabilityStatusCallBack)(OffcnIMSDKReachabilityStatus
/// @param extIndex 开发者扩展字段
/// @param repeatSend_tid 重新发送的tid
/// @param finished 结果回调,最大限制为500字,超过500字报错回调信息:超过500字
-(void)sendMsgWithMsg_fromID:(NSString *)msg_fromID msg_toID:(NSString *)msg_toID msg_type:(OffcnSDKMsgType)msg_type text:(NSString *)text filePath:(NSString *)filePath ext:(NSString *)ext extIndex:(NSString *)extIndex repeatSend_tid:(NSString *)repeatSend_tid Finished:(void(^)(NSString *extIndex,BOOL success,OffcnIMBodyModel *sendMsgModel,NSString *errorMessage))finished ProgressPercent:(void(^)(NSString *extIndex, NSString *filePath, float percent))progressPercent;
/// @param progressPercent 进度回调
/// @param tidStrFinished 发送消息本地tid回调
-(void)sendMsgWithMsg_fromID:(NSString *)msg_fromID msg_toID:(NSString *)msg_toID msg_type:(OffcnSDKMsgType)msg_type text:(NSString *)text filePath:(NSString *)filePath ext:(NSString *)ext extIndex:(NSString *)extIndex repeatSend_tid:(NSString *)repeatSend_tid Finished:(void(^)(NSString *extIndex,BOOL success,OffcnIMBodyModel *sendMsgModel,NSString *errorMessage))finished ProgressPercent:(void(^)(NSString *extIndex, NSString *filePath, float percent))progressPercent tidStrFinished:(void(^)(NSString *extIndex,NSString *tidString))tidStrFinished;
/// 用户信息标记已读
/// @param msg_fromID 发送人ID
......@@ -136,4 +139,45 @@ typedef void(^OffcnIMSDKReachabilityStatusCallBack)(OffcnIMSDKReachabilityStatus
/// 退出账号
-(void)logout;
/// 获取私聊会话列表
/// @param finished 结果回调
-(void)get_privateMessage_listFinished:(void(^)(BOOL success,id response,NSString *errorMessage))finished;
/// 获取私聊会话历史
/// @param msg_to 对方ID
/// @param lastId 最后一条消息ID
/// @param room_num 房间号
/// @param finished 结果回调
-(void)get_privateMessage_historyWithMsg_to:(NSString *)msg_to lastId:(NSString *)lastId room_num:(NSString *)room_num Finished:(void(^)(BOOL success,id response,NSString *errorMessage))finished;
/// 更新私聊会话状态
/// @param msg_to 对方ID
/// @param last_id 最后一条消息ID
/// @param room_num 房间号
/// @param finished 结果回调
-(void)post_privateMessage_statusWithMsg_to:(NSString *)msg_to last_id:(NSString *)last_id room_num:(NSString *)room_num Finished:(void(^)(BOOL success,id response,NSString *errorMessage))finished;
/// 私聊发送消息
/// @param msg_to 对方ID
/// @param content 内容
/// @param room_num 房间号
/// @param finished 结果回调
-(void)post_privateMessageWithMsg_to:(NSString *)msg_to content:(NSMutableArray *)content room_num:(NSString *)room_num Finished:(void(^)(BOOL success,id response,NSString *errorMessage))finished;
/// 发送私聊消息
/// @param msg_to 接收人ID
/// @param room_num 房间号
/// @param msg_type 发送消息类型
/// @param text 文本
/// @param filePath 图片/音频(语音消息格式,只能是aac格式)/视频/文件,沙盒路径
/// @param ext 开发者扩展字段
/// @param extIndex 开发者扩展字段
/// @param repeatSend_tid 重新发送的tid
/// @param finished 结果回调,最大限制为500字,超过500字报错回调信息:超过500字
/// @param progressPercent 进度回调
/// @param tidStrFinished 发送消息本地tid回调
-(void)sendPrivateMsgWithMsg_to:(NSString *)msg_to room_num:(NSString *)room_num msg_type:(OffcnSDKMsgType)msg_type text:(NSMutableAttributedString *)text filePath:(NSString *)filePath ext:(NSString *)ext extIndex:(NSString *)extIndex repeatSend_tid:(NSString *)repeatSend_tid Finished:(void(^)(NSString *extIndex,BOOL success, id response, NSMutableArray *content, NSString *errorMessage))finished ProgressPercent:(void(^)(NSString *extIndex, NSString *filePath, float percent))progressPercent tidStrFinished:(void(^)(NSString *extIndex,NSString *tidString))tidStrFinished;
@end
......@@ -11,6 +11,14 @@
NS_ASSUME_NONNULL_BEGIN
//收到消息通知
#define kRevMsgNotification @"kRevMsgNotification"
//收到消息状态通知
#define kRevMsgStateNotification @"kRevMsgStateNotification"
//收到私聊消息通知
#define kRevPrivateMsgNotification @"kRevPrivateMsgNotification"
typedef NS_ENUM(NSUInteger, OffcnIMConnectStatus) {
OffcnIMConnectStatusMissingParameter = 201019, //缺少参数
OffcnIMConnectStatusInitializing = 201029, //连接初始化中
......@@ -51,6 +59,7 @@ typedef void(^OffcnIMReceiveConnectStatus)(OffcnIMConnectStatus status,NSString
@property (nonatomic, weak) id<OffcnIMSocketDelegate> delegate;
@property (nonatomic, copy) NSString *avatar;//发送消息的用户头像
@property (nonatomic, copy) NSString *msg_fromId;//发送消息的用户id
@property (nonatomic, copy) NSString *token;//发送消息的用户token
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment