Skip to content

Commit cde4f28

Browse files
committed
* Fixed the bug of the group channel's data.
* Added the feature for generating the thumbnail of the image file message.
1 parent addb97a commit cde4f28

File tree

9 files changed

+82
-11
lines changed

9 files changed

+82
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
### v3.0.26(Jan 3, 2017)
4+
* Fixed the bug of the group channel's data.
5+
* Added the feature for generating the thumbnail of the image file message.
6+
37
### v3.0.25(Dec 23, 2016)
48
* Added a feature that sets a push notification template.
59

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Platform](https://img.shields.io/badge/platform-iOS-orange.svg)](https://cocoapods.org/pods/SendBirdSDK)
55
[![Languages](https://img.shields.io/badge/language-Objective--C%20%7C%20Swift-orange.svg)](https://github.com/smilefam/sendbird-ios-framework)
6-
[![CocoaPods](https://img.shields.io/badge/pod-v3.0.25-green.svg)](https://cocoapods.org/pods/SendBirdSDK)
6+
[![CocoaPods](https://img.shields.io/badge/pod-v3.0.26-green.svg)](https://cocoapods.org/pods/SendBirdSDK)
77
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
88
[![Commercial License](https://img.shields.io/badge/license-Commercial-brightgreen.svg)](https://github.com/smilefam/sendbird-ios-framework/blob/master/LICENSE.md)
99

SendBirdSDK.framework/Headers/SBDBaseChannel.h

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
//
88

99
#import <Foundation/Foundation.h>
10+
#import <CoreGraphics/CoreGraphics.h>
11+
1012
#import "SBDUser.h"
1113
#import "SBDUserMessage.h"
1214
#import "SBDAdminMessage.h"
1315
#import "SBDFileMessage.h"
1416
#import "SBDError.h"
1517

1618
@class SBDPreviousMessageListQuery;
19+
@class SBDThumbnail;
1720
@class SBDFileMessage;
1821
@class SBDUserMessage;
1922
@class SBDMessageListQuery;
@@ -288,7 +291,7 @@
288291
*
289292
* @param file File <span>data</span>.
290293
* @param filename File<span>name</span>.
291-
* @param type The type of file.
294+
* @param type The mime type of file.
292295
* @param size File size.
293296
* @param data Custom <span>data</span>.
294297
* @param completionHandler The handler block to execute. `fileMessage` is a user message which is returned from the SendBird server. The message has a message ID and an URL.
@@ -302,7 +305,7 @@
302305
*
303306
* @param file File <span>data</span>.
304307
* @param filename File<span>name</span>.
305-
* @param type The type of file.
308+
* @param type The mime type of file.
306309
* @param size File size.
307310
* @param data Custom <span>data</span>.
308311
* @param customType Custom message type.
@@ -344,7 +347,7 @@
344347
*
345348
* @param file File <span>data</span>.
346349
* @param filename File<span>name</span>.
347-
* @param type The type of file.
350+
* @param type The mime type of file.
348351
* @param size File size.
349352
* @param data Custom <span>data</span>.
350353
* @param progressHandler The handler block to monitor progression. `bytesSent` is the number of bytes sent since the last time this method was called. `totalBytesSent` is the total number of bytes sent so far. `totalBytesExpectedToSend` is the expected length of the body <span>data</span>. These parameters are the same to the declaration of [`URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`](https://developer.apple.com/reference/foundation/nsurlsessiontaskdelegate/1408299-urlsession?language=objc).
@@ -359,7 +362,7 @@
359362
*
360363
* @param file File <span>data</span>.
361364
* @param filename File<span>name</span>.
362-
* @param type The type of file.
365+
* @param type The mime type of file.
363366
* @param size File size.
364367
* @param data Custom <span>data</span>.
365368
* @param customType Custom message type.
@@ -370,6 +373,23 @@
370373
*/
371374
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData * _Nonnull)file filename:(NSString * _Nonnull)filename type:(NSString * _Nonnull)type size:(NSUInteger)size data:(NSString * _Nullable)data customType:(NSString * _Nullable)customType progressHandler:(nullable void (^)(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))progressHandler completionHandler:(nullable void (^)(SBDFileMessage * _Nullable fileMessage, SBDError * _Nullable error))completionHandler;
372375

376+
/**
377+
* Sends a file message with binary <span>data</span>. The binary <span>data</span> is uploaded to SendBird file storage and a URL of the file will be generated. The uploading progress callback can be implemented.
378+
*
379+
* @param file File <span>data</span>.
380+
* @param filename File<span>name</span>.
381+
* @param type The mime type of file.
382+
* @param size File size.
383+
* @param thumbnailSizes Thumbnail sizes. This parameter works for image file only.
384+
* @param data Custom <span>data</span>.
385+
* @param customType Custom message type.
386+
* @param progressHandler The handler block to monitor progression. `bytesSent` is the number of bytes sent since the last time this method was called. `totalBytesSent` is the total number of bytes sent so far. `totalBytesExpectedToSend` is the expected length of the body <span>data</span>. These parameters are the same to the declaration of [`URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`](https://developer.apple.com/reference/foundation/nsurlsessiontaskdelegate/1408299-urlsession?language=objc).
387+
* @param completionHandler The handler block to execute. `fileMessage` is a user message which is returned from the SendBird server. The message has a message ID and an URL.
388+
*
389+
* @return Returns the temporary file message with a request ID. It doesn't have a message ID and an URL.
390+
*/
391+
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData * _Nonnull)file filename:(NSString * _Nonnull)filename type:(NSString * _Nonnull)type size:(NSUInteger)size thumbnailSizes:(NSArray<SBDThumbnail *> * _Nullable)thumbnailSizes data:(NSString * _Nullable)data customType:(NSString * _Nullable)customType progressHandler:(nullable void (^)(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))progressHandler completionHandler:(nullable void (^)(SBDFileMessage * _Nullable fileMessage, SBDError * _Nullable error))completionHandler;
392+
373393
#pragma mark - Load message list
374394
/**
375395
* Creates `SBDPreviousMessageListQuery` instance for getting the previous messages list of the channel.

SendBirdSDK.framework/Headers/SBDCommand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
+ (nullable SBDCommand *)buildEnterChannel:(SBDBaseChannel * _Nonnull)channel;
5353
+ (nullable SBDCommand *)buildExitChannel:(SBDBaseChannel * _Nonnull)aUser;
5454
+ (nullable SBDCommand *)buildUserMessageWithChannelUrl:(NSString * _Nonnull)channelUrl messageText:(NSString * _Nonnull)messageText data:(NSString * _Nullable)data customType:(NSString * _Nullable)customType targetLanguages:(NSArray<NSString *> * _Nullable)targetLanguages;
55-
+ (nullable SBDCommand *)buildFileMessageWithFileUrl:(NSString * _Nonnull)fileUrl name:(NSString * _Nullable)name type:(NSString * _Nullable)type size:(NSUInteger)size data:(NSString * _Nullable)data requestId:(NSString * _Nullable)requestId channel:(SBDBaseChannel * _Nonnull)channel customType:(NSString * _Nullable)customType;
55+
+ (nullable SBDCommand *)buildFileMessageWithFileUrl:(NSString * _Nonnull)fileUrl name:(NSString * _Nullable)name type:(NSString * _Nullable)type size:(NSUInteger)size data:(NSString * _Nullable)data requestId:(NSString * _Nullable)requestId channel:(SBDBaseChannel * _Nonnull)channel customType:(NSString * _Nullable)customType thumbnails:(NSArray * _Nullable)thumbnails;
5656
+ (nullable SBDCommand *)buildPing;
5757
+ (nullable SBDCommand *)buildStartTyping:(SBDGroupChannel * _Nonnull)channel startAt:(long long)startAt;
5858
+ (nullable SBDCommand *)buildEndTyping:(SBDGroupChannel * _Nonnull)channel endAt:(long long)endAt;

SendBirdSDK.framework/Headers/SBDFileMessage.h

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,47 @@
1010
#import "SBDBaseMessage.h"
1111
#import "SBDBaseChannel.h"
1212

13+
14+
/**
15+
The `SBDThumbnail` class represents the thumbnail in the file message.
16+
*/
17+
@interface SBDThumbnail : NSObject
18+
19+
20+
/**
21+
The url of the thumbnail.
22+
*/
23+
@property (strong, nonatomic, readonly, nonnull) NSString *url;
24+
25+
26+
/**
27+
The maximum size of the thumbnail.
28+
*/
29+
@property (nonatomic, readonly) CGSize maxSize;
30+
31+
32+
/**
33+
Initializes the object for sending file message.
34+
35+
@param maxWidth The maximum width of the thumbnail.
36+
@param maxHeight the maximum height of the thumbnail.
37+
@return The `SBDThumbnail` object.
38+
*/
39+
- (nullable instancetype)initWithMaxWidth:(CGFloat)maxWidth maxHeight:(CGFloat)maxHeight;
40+
41+
42+
/**
43+
Initializes the object for the file message which is received.
44+
45+
@param width The width of the thumbnail.
46+
@param height The height of the thumbnail.
47+
@param url The url of the thumbnail.
48+
@return The `SBDThumbnail` object.
49+
*/
50+
- (nullable instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height url:(NSString * _Nonnull)url;
51+
52+
@end
53+
1354
@class SBDBaseChannel;
1455

1556
/**
@@ -57,6 +98,12 @@
5798
*/
5899
@property (strong, nonatomic, readonly, nullable) NSString *customType;
59100

101+
102+
/**
103+
Image thumbnails.
104+
*/
105+
@property (strong, nonatomic, readonly, nullable) NSArray<SBDThumbnail *> *thumbnails;
106+
60107
- (nullable instancetype)initWithDictionary:(NSDictionary * _Nonnull)dict;
61108

62109
/**

SendBirdSDK.framework/Headers/SendBirdSDK.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <UIKit/UIKit.h>
10+
#import <CoreGraphics/CoreGraphics.h>
1011

1112
// In this header, you should import all the public headers of your framework using statements like #import "PublicHeader"
1213
// v3.0
@@ -40,4 +41,4 @@
4041
FOUNDATION_EXPORT double SendBirdSDKVersionNumber;
4142

4243
//! Project version string for SendBirdSDK.
43-
FOUNDATION_EXPORT const unsigned char SendBirdSDKVersionString[];
44+
FOUNDATION_EXPORT const unsigned char SendBirdSDKVersionString[];

SendBirdSDK.framework/Info.plist

0 Bytes
Binary file not shown.

SendBirdSDK.framework/SendBirdSDK

262 KB
Binary file not shown.

SendBirdSDK.podspec

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SendBirdSDK"
3-
s.version = "3.0.25"
3+
s.version = "3.0.26"
44
s.summary = "SendBird iOS Framework"
55
s.description = "Messaging and Chat API for Mobile Apps and Websites"
66
s.homepage = "https://sendbird.com"
@@ -11,7 +11,6 @@ Pod::Spec.new do |s|
1111
s.platform = :ios, "7.0"
1212
s.documentation_url = 'https://docs.sendbird.com/'
1313
s.ios.vendored_frameworks = 'SendBirdSDK.framework'
14-
s.ios.frameworks = ["UIKit", "QuartzCore", "CFNetwork", "Security", "Foundation", "MobileCoreServices"]
15-
#s.ios.library = "icucore"
16-
s.ios.libraries = ["icucore", "sqlite3"]
14+
s.ios.frameworks = ["UIKit", "QuartzCore", "CFNetwork", "Security", "Foundation", "MobileCoreServices", "CoreGraphics"]
15+
s.ios.library = "icucore"
1716
end

0 commit comments

Comments
 (0)