Skip to content

Commit

Permalink
Merge branch 'fixBuild'
Browse files Browse the repository at this point in the history
  • Loading branch information
ownikss committed Jun 22, 2021
2 parents c27cc16 + c496d4b commit 7e7be75
Show file tree
Hide file tree
Showing 16 changed files with 165 additions and 145 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ iOS
- add to PodFile
```
use_frameworks!
pod 'WebimClientLibrary', :git => 'https://github.com/webim/webim-client-sdk-ios.git', :tag => '3.29.0'
pod 'WebimClientLibrary', :git => 'https://github.com/webim/webim-client-sdk-ios.git', :tag => '3.34.4'
```
- pod install

Expand Down
10 changes: 5 additions & 5 deletions ios/Department.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ public final class _ObjCDepartment: NSObject {
@objc(getDepartmentOnlineStatus)
func getDepartmentOnlineStatus() -> _ObjCDepartmentOnlineStatus {
switch department.getDepartmentOnlineStatus() {
case .BUSY_OFFLINE:
case .busyOffline:
return .BUSY_OFFLINE
case .BUSY_ONLINE:
case .busyOnline:
return .BUSY_ONLINE
case .OFFLINE:
case .offline:
return .OFFLINE
case .ONLINE:
case .online:
return .ONLINE
case .UNKNOWN:
case .unknown:
return .UNKNOWN
}
}
Expand Down
Empty file modified ios/FatalErrorHandler.swift
100755 → 100644
Empty file.
49 changes: 26 additions & 23 deletions ios/Message.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class _ObjCMessage: NSObject {

@objc(getAttachment)
public func getAttachment() -> _ObjCMessageAttachment? {
if let attachment = message.getAttachment() {
if let attachment = message.getData()?.getAttachment() {
return _ObjCMessageAttachment(messageAttachment: attachment)
}

Expand All @@ -55,7 +55,7 @@ public final class _ObjCMessage: NSObject {

@objc(getData)
public func getData() -> [String: Any]? {
if let data = message.getData() {
if let data = message.getRawData() {
var objCData = [String: Any]()
for key in data.keys {
if let value = data[key] {
Expand Down Expand Up @@ -92,9 +92,9 @@ public final class _ObjCMessage: NSObject {
@objc(getSendStatus)
public func getSendStatus() -> _ObjCMessageSendStatus {
switch message.getSendStatus() {
case .SENDING:
case .sending:
return .SENDING
case .SENT:
case .sent:
return .SENT
}
}
Expand All @@ -112,26 +112,28 @@ public final class _ObjCMessage: NSObject {
@objc(getType)
public func getType() -> _ObjCMessageType {
switch message.getType() {
case .ACTION_REQUEST:
case .actionRequest:
return .ACTION_REQUEST
case .CONTACTS_REQUEST:
case .contactInformationRequest:
return .CONTACTS_REQUEST
case .FILE_FROM_OPERATOR:
case .fileFromOperator:
return .FILE_FROM_OPERATOR
case .FILE_FROM_VISITOR:
case .fileFromVisitor:
return .FILE_FROM_VISITOR
case .INFO:
case .info:
return .INFO
case .OPERATOR:
case .operatorMessage:
return .OPERATOR
case .OPERATOR_BUSY:
case .operatorBusy:
return .OPERATOR_BUSY
case .VISITOR:
case .visitorMessage:
return .VISITOR
case .KEYBOARD:
case .keyboard:
return .KEYBOARD
case .KEYBOARD_RESPONSE:
case .keyboardResponse:
return .KEYBOARD_RESPONSE
case .stickerVisitor:
return .STICKER_VISITOR
}
}

Expand Down Expand Up @@ -169,18 +171,18 @@ public final class _ObjCMessageAttachment: NSObject {
// MARK: - Methods

@objc(getContentType)
public func getContentType() -> String {
return messageAttachment.getContentType()
public func getContentType() -> String? {
return messageAttachment.getFileInfo().getContentType()
}

@objc(getFileName)
public func getFileName() -> String {
return messageAttachment.getFileName()
return messageAttachment.getFileInfo().getFileName()
}

@objc(getImageInfo)
public func getImageInfo() -> _ObjCImageInfo? {
if let imageInfo = messageAttachment.getImageInfo() {
if let imageInfo = messageAttachment.getFileInfo().getImageInfo() {
return _ObjCImageInfo(imageInfo: imageInfo)
}

Expand All @@ -189,12 +191,12 @@ public final class _ObjCMessageAttachment: NSObject {

@objc(getSize)
public func getSize() -> NSNumber? {
return messageAttachment.getSize() as NSNumber?
return messageAttachment.getFileInfo().getSize() as NSNumber?
}

@objc(getURL)
public func getURL() -> URL {
return messageAttachment.getURL()
public func getURL() -> URL? {
return messageAttachment.getFileInfo().getURL()
}

}
Expand Down Expand Up @@ -241,11 +243,12 @@ public enum _ObjCMessageType: Int {
case FILE_FROM_OPERATOR
case FILE_FROM_VISITOR
case INFO
case KEYBOARD
case KEYBOARD_RESPONSE
case OPERATOR
case OPERATOR_BUSY
case VISITOR
case KEYBOARD
case KEYBOARD_RESPONSE
case STICKER_VISITOR
}

// MARK: - MessageSendStatus
Expand Down
Empty file modified ios/MessageListener.swift
100755 → 100644
Empty file.
Loading

0 comments on commit 7e7be75

Please sign in to comment.