mirror of
https://github.com/WuKongIM/WuKongIMiOSSDK-Framework
synced 2025-02-17 18:03:09 +00:00
fix: 升级到1.0.4
This commit is contained in:
parent
8d0bec3646
commit
ec38d8b53e
18
README.md
18
README.md
@ -6,3 +6,21 @@ https://githubim.com
|
||||
pod spec lint --verbose --allow-warnings
|
||||
|
||||
pod trunk push WuKongIMSDK.podspec --allow-warnings
|
||||
|
||||
|
||||
xcode14.3打包错误临时解决方案
|
||||
|
||||
Go to System Preferences → Security & Privacy → Full Disk Access → Terminal, and do:
|
||||
|
||||
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/
|
||||
|
||||
sudo mkdir arc
|
||||
cd arc
|
||||
sudo git clone https://github.com/kamyarelyasi/Libarclite-Files.git .
|
||||
|
||||
sudo chmod +x *
|
||||
|
||||
https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3/75729977#75729977
|
||||
|
||||
|
||||
正式解决方案等CocoaPods官方(https://github.com/CocoaPods/CocoaPods/issues/11839)
|
@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'WuKongIMSDK'
|
||||
s.version = '1.0.3'
|
||||
s.version = '1.0.4'
|
||||
s.summary = '悟空IM是一款简单,高效,支持完全私有化的即时通讯.'
|
||||
s.license = {"type"=>"MIT", "file"=>"ios/LICENSE"}
|
||||
s.authors = {"tangtaoit"=>"tt@tgo.ai"}
|
||||
|
@ -160,11 +160,22 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
/**
|
||||
查询某个频道最新的消息 (一般是第一次进入会话页面查询首屏消息时调用此方法)
|
||||
@param channel 频道
|
||||
@param endOrderSeq 结束的orderSeq,如果为0表示不约束
|
||||
@param limit 消息数量限制
|
||||
@param complete 查询回调
|
||||
@param alwayRequest 是否总是从服务器请求最新的消息数据
|
||||
*/
|
||||
-(void) pullLastMessages:(WKChannel*)channel limit:(int)limit alwayRequest:(BOOL)alwayRequest complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
-(void) pullLastMessages:(WKChannel*)channel endOrderSeq:(uint32_t)endOrderSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
|
||||
/**
|
||||
查询某个频道最新的消息 (一般是第一次进入会话页面查询首屏消息时调用此方法)
|
||||
@param channel 频道
|
||||
@param endOrderSeq 结束的orderSeq,如果为0表示不约束
|
||||
@param maxMessageSeq 频道最大的messageSeq,也就是服务器最大的messageSeq ,非必填,可为0
|
||||
@param limit 消息数量限制
|
||||
@param complete 查询回调
|
||||
*/
|
||||
-(void) pullLastMessages:(WKChannel*)channel endOrderSeq:(uint32_t)endOrderSeq maxMessageSeq:(uint32_t)maxMessageSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
/**
|
||||
下拉加载消息
|
||||
@ -183,6 +194,8 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
*/
|
||||
-(void) pullUp:(WKChannel*)channel startOrderSeq:(uint32_t)startOrderSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
-(void) pullUp:(WKChannel*)channel startOrderSeq:(uint32_t)startOrderSeq endOrderSeq:(uint32_t)endOrderSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
/**
|
||||
查询指定orderSeq周围的消息 上5条下5条 ,比如 orderSeq 为 20 则查询 16 17 18 19 20 21 22 23 24 25 主要使用在定位消息
|
||||
@param channel 频道
|
||||
@ -190,7 +203,13 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
*/
|
||||
-(void) pullAround:(WKChannel*)channel orderSeq:(uint32_t)orderSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
|
||||
/**
|
||||
查询指定orderSeq周围的消息 上5条下5条 ,比如 orderSeq 为 20 则查询 16 17 18 19 20 21 22 23 24 25 主要使用在定位消息
|
||||
@param channel 频道
|
||||
@param orderSeq 以此OrderSeq查询周围的消息
|
||||
@param maxMessageSeq 目前服务器最大的messageSeq(目前第一屏数据不请求接口)
|
||||
*/
|
||||
-(void) pullAround:(WKChannel*)channel orderSeq:(uint32_t)orderSeq maxMessageSeq:(uint32_t)maxMessageSeq limit:(int)limit complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
/**
|
||||
拉取历史消息
|
||||
@ -201,7 +220,7 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
@param pullMode 拉取方式
|
||||
@param complete 查询回调
|
||||
*/
|
||||
-(void) pullMessages:(WKChannel*)channel startOrderSeq:(uint32_t)startOrderSeq endOrderSeq:(uint32_t)endOrderSeq limit:(int)limit pullMode:(WKPullMode)pullMode complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete DEPRECATED_MSG_ATTRIBUTE("use pullDown or pullUp");
|
||||
-(void) pullMessages:(WKChannel*)channel startOrderSeq:(uint32_t)startOrderSeq endOrderSeq:(uint32_t)endOrderSeq limit:(int)limit pullMode:(WKPullMode)pullMode complete:(void(^)(NSArray<WKMessage*> *messages,NSError *error))complete;
|
||||
|
||||
/**
|
||||
查询消息
|
||||
@ -384,7 +403,8 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
/// 清除所有消息
|
||||
-(void) onMessageAllCleared;
|
||||
|
||||
|
||||
// 流消息
|
||||
-(void) onMessageStream:(WKStream*)stream;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -51,6 +51,9 @@
|
||||
/// @param messages <#messages description#>
|
||||
- (void)callRecvMessagesDelegate:(NSArray<WKMessage*>*)messages;
|
||||
|
||||
// 调用流式消息委托
|
||||
- (void)callStreamDelegate:(NSArray<WKStream*>*)streams;
|
||||
|
||||
/// 获取所有消息存储之前的拦截器
|
||||
-(NSArray<MessageStoreBeforeIntercept>*) getMessageStoreBeforeIntercepts;
|
||||
|
||||
|
@ -66,8 +66,7 @@ typedef enum : uint8_t {
|
||||
|
||||
// 协议类型
|
||||
typedef enum : NSUInteger {
|
||||
WK_PROTO_WKAO,
|
||||
WK_PROTO_MOS
|
||||
WK_PROTO_WK,
|
||||
} WKProto;
|
||||
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
//消息表
|
||||
#define TB_MESSAGE @"message"
|
||||
|
||||
#define TB_STREAM @"stream"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WKDB : NSObject
|
||||
|
@ -15,6 +15,8 @@
|
||||
#import "WKSetting.h"
|
||||
#import "WKMessageExtra.h"
|
||||
#import "WKReaction.h"
|
||||
#import "WKStream.h"
|
||||
#import "WKRecvPacket.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface WKMessageHeader : NSObject
|
||||
@ -39,6 +41,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property(nonatomic,copy) NSString *clientMsgNo; /// 客户端消息唯一编号(相同clientMsgNo被认为是重复消息)
|
||||
|
||||
@property(nonatomic,copy) NSString *streamNo; // 流式编号
|
||||
|
||||
@property(nonatomic,assign) WKStreamFlag streamFlag; // 流式标记
|
||||
|
||||
@property(nonatomic,assign) uint64_t streamSeq; // 流式序号
|
||||
|
||||
@property(nonatomic,assign) uint64_t messageId; // 消息ID(全局唯一)
|
||||
|
||||
@property(nonatomic,assign) uint32_t messageSeq; // 消息序列号(用户唯一,有序)
|
||||
@ -85,18 +93,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,assign) NSInteger viewedAt; // 查看时间戳
|
||||
|
||||
@property(nonatomic,strong) WKMessageExtra *remoteExtra; // 消息远程扩展
|
||||
//
|
||||
//@property(nonatomic,assign) BOOL revoke; // 消息是否被撤回
|
||||
//@property(nonatomic,copy) NSString *revoker; // 撤回者的uid
|
||||
//@property(nonatomic,assign) NSInteger unreadCount; // 未读数量
|
||||
//@property(nonatomic,assign) NSInteger readedCount; // 已读数量
|
||||
//@property(nonatomic,assign) NSInteger extraVersion; // 扩展消息版本
|
||||
//@property(nonatomic,assign) BOOL readed; // 消息是否已读(“我”是否已读)
|
||||
//@property(nonatomic,strong,nullable) NSData *contentEditData; // 消息编辑后的正文data数据
|
||||
//@property(nonatomic,strong,nullable) WKMessageContent *contentEdit; // 消息编辑后的正文
|
||||
//@property(nonatomic,assign) NSInteger editedAt; // 消息编辑时间 (0表示消息未被编辑)
|
||||
//@property(nonatomic,assign) BOOL isEdit; // 是否编辑
|
||||
//@property(nonatomic,assign) BOOL needUpload; // 编辑内容是否需要上传
|
||||
|
||||
@property(nonatomic,assign) BOOL syncStreamsFromDB; // 是否从db同步流数据
|
||||
@property(nonatomic,strong) NSMutableArray<WKStream*> *streams; // 流式消息内容
|
||||
@property(nonatomic,assign) BOOL streamOn; // 是否开启了stream
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
@ -289,6 +289,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(uint32_t) getChannelAroundFirstMessageSeq:(WKChannel*)channel messageSeq:(uint32_t)messageSeq;
|
||||
|
||||
-(WKMessageContent*) decodeContent:(NSInteger)contentType data:(NSData *)contentData db:(FMDatabase*)db;
|
||||
|
||||
// 保存流
|
||||
-(void) saveOrUpdateStreams:(NSArray<WKStream*>*)streams;
|
||||
|
||||
// 获取流
|
||||
-(NSArray<WKStream*>*) getStreams:(NSString*)streamNo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -34,8 +34,6 @@ typedef WKConnectInfo*_Nonnull(^WKConnectInfoCallback)(void);
|
||||
@property(nonatomic,assign) uint16_t port;
|
||||
|
||||
|
||||
/// IM模式
|
||||
@property(nonatomic,assign) WKMode mode;
|
||||
/**
|
||||
连接信息回调
|
||||
*/
|
||||
@ -129,7 +127,6 @@ typedef WKConnectInfo*_Nonnull(^WKConnectInfoCallback)(void);
|
||||
/// 协议类型
|
||||
@property(nonatomic,assign) WKProto proto;
|
||||
|
||||
@property(nonatomic,assign) BOOL mosConvertOn; // 是否开启mos的content转换(临时参数)
|
||||
|
||||
@property(nonatomic,assign) NSInteger messageExtraSyncLimit; // 同步扩展消息每次数量限制
|
||||
|
||||
|
@ -11,6 +11,12 @@
|
||||
#import "WKSetting.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
WKStreamFlagStart,
|
||||
WKStreamFlagIng,
|
||||
WKStreamFlagEnd,
|
||||
} WKStreamFlag;
|
||||
|
||||
@interface WKRecvPacket : WKPacket<WKPacketBodyCoder>
|
||||
|
||||
// 消息设置
|
||||
@ -21,6 +27,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,assign) uint32_t messageSeq;
|
||||
// 客户端消息唯一编号(用于消息去重)
|
||||
@property(nonatomic,copy) NSString *clientMsgNo;
|
||||
// 流式编号
|
||||
@property(nonatomic,copy) NSString *streamNo;
|
||||
// 流式标记
|
||||
@property(nonatomic,assign) WKStreamFlag streamFlag;
|
||||
// 流式序号
|
||||
@property(nonatomic,assign) uint64_t streamSeq;
|
||||
// 服务器时间
|
||||
@property(nonatomic,assign) uint32_t timestamp;
|
||||
// 发送者UID
|
||||
|
@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property(nonatomic,assign) BOOL topic; // 是否存在话题
|
||||
|
||||
@property(nonatomic,assign) BOOL streamOn; // 是否开启流式消息
|
||||
|
||||
|
||||
-(uint8_t) toUint8;
|
||||
|
25
ios/WuKongIMSDK.framework/Headers/WKStream.h
Normal file
25
ios/WuKongIMSDK.framework/Headers/WKStream.h
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// WKStream.h
|
||||
// WuKongIMSDK
|
||||
//
|
||||
// Created by tt on 2023/7/3.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WKChannel.h"
|
||||
#import "WKMessageContent.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WKStream : NSObject
|
||||
|
||||
@property(nonatomic,strong) WKChannel *channel;
|
||||
@property(nonatomic,copy) NSString *clientMsgNo;
|
||||
@property(nonatomic,copy) NSString *streamNo;
|
||||
@property(nonatomic,assign) uint64_t streamSeq;
|
||||
|
||||
@property(nonatomic,strong) WKMessageContent *content; // 消息正文
|
||||
@property(nonatomic,strong) NSData *contentData; // 消息正文data数据
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -13,7 +13,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property(nonatomic,assign) uint32_t startMessageSeq; // 开始消息序列号
|
||||
@property(nonatomic,assign) uint32_t endMessageSeq; // 结束消息序列号
|
||||
@property(nonatomic,assign) BOOL more; // 是否还有更多数据
|
||||
@property(nonatomic,strong) NSArray<WKMessage*> *messages; // 消息集合
|
||||
|
||||
@end
|
||||
|
@ -88,6 +88,7 @@
|
||||
#import "WKReaction.h"
|
||||
#import "WKReminder.h"
|
||||
#import "WKRobot.h"
|
||||
#import "WKStream.h"
|
||||
#import "WKSyncChannelMessageModel.h"
|
||||
#import "WKSyncConversationModel.h"
|
||||
#import "WKTaskOperator.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user