Skip to content

Commit 05ffd35

Browse files
committed
* Added the class to represent a thumbnail max size.
1 parent cde4f28 commit 05ffd35

File tree

6 files changed

+32
-23
lines changed

6 files changed

+32
-23
lines changed

CHANGELOG.md

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

3+
### v3.0.27(Jan 4, 2017)
4+
* Added the class to represent a thumbnail max size.
5+
36
### v3.0.26(Jan 3, 2017)
47
* Fixed the bug of the group channel's data.
58
* Added the feature for generating the thumbnail of the image file message.

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.26-green.svg)](https://cocoapods.org/pods/SendBirdSDK)
6+
[![CocoaPods](https://img.shields.io/badge/pod-v3.0.27-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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#import "SBDError.h"
1717

1818
@class SBDPreviousMessageListQuery;
19+
@class SBDThumbnailSize;
1920
@class SBDThumbnail;
2021
@class SBDFileMessage;
2122
@class SBDUserMessage;
@@ -380,15 +381,15 @@
380381
* @param filename File<span>name</span>.
381382
* @param type The mime type of file.
382383
* @param size File size.
383-
* @param thumbnailSizes Thumbnail sizes. This parameter works for image file only.
384+
* @param thumbnailSizes Thumbnail sizes. This parameter is the array of `SBDThumbnailSize` object and works for image file only.
384385
* @param data Custom <span>data</span>.
385386
* @param customType Custom message type.
386387
* @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).
387388
* @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.
388389
*
389390
* @return Returns the temporary file message with a request ID. It doesn't have a message ID and an URL.
390391
*/
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+
- (nonnull SBDFileMessage *)sendFileMessageWithBinaryData:(NSData * _Nonnull)file filename:(NSString * _Nonnull)filename type:(NSString * _Nonnull)type size:(NSUInteger)size thumbnailSizes:(NSArray<SBDThumbnailSize *> * _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;
392393

393394
#pragma mark - Load message list
394395
/**

SendBirdSDK.framework/Headers/SBDFileMessage.h

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,49 @@
1010
#import "SBDBaseMessage.h"
1111
#import "SBDBaseChannel.h"
1212

13+
@interface SBDThumbnailSize : NSObject
1314

1415
/**
15-
The `SBDThumbnail` class represents the thumbnail in the file message.
16+
The max size of the thumbnail.
1617
*/
17-
@interface SBDThumbnail : NSObject
18-
18+
@property (nonatomic, readonly) CGSize maxSize;
1919

2020
/**
21-
The url of the thumbnail.
21+
Makes `SBDThumbnailSize` object with `CGSize`.
22+
23+
@param size The max size of the thumbnail.
24+
@return `SBDThumbnailSize` object.
2225
*/
23-
@property (strong, nonatomic, readonly, nonnull) NSString *url;
26+
+ (nullable instancetype)makeWithMaxCGSize:(CGSize)size;
2427

2528

2629
/**
27-
The maximum size of the thumbnail.
30+
Makes `SBDThumbnailSize` object with width and height.
31+
32+
@param width The max width of the thumbnail.
33+
@param height The max height of the thumbnail.
34+
@return `SBDThumbnailSize` object.
2835
*/
29-
@property (nonatomic, readonly) CGSize maxSize;
36+
+ (nullable instancetype)makeWithMaxWidth:(CGFloat)width maxHeight:(CGFloat)height;
37+
38+
@end
3039

3140

3241
/**
33-
Initializes the object for sending file message.
42+
The `SBDThumbnail` class represents the thumbnail in the file message.
43+
*/
44+
@interface SBDThumbnail : NSObject
3445

35-
@param maxWidth The maximum width of the thumbnail.
36-
@param maxHeight the maximum height of the thumbnail.
37-
@return The `SBDThumbnail` object.
46+
/**
47+
The url of the thumbnail.
3848
*/
39-
- (nullable instancetype)initWithMaxWidth:(CGFloat)maxWidth maxHeight:(CGFloat)maxHeight;
49+
@property (strong, nonatomic, readonly, nonnull) NSString *url;
4050

4151

4252
/**
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.
53+
The maximum size of the thumbnail.
4954
*/
50-
- (nullable instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height url:(NSString * _Nonnull)url;
55+
@property (nonatomic, readonly) CGSize maxSize;
5156

5257
@end
5358

SendBirdSDK.framework/SendBirdSDK

24.1 KB
Binary file not shown.

SendBirdSDK.podspec

Lines changed: 1 addition & 1 deletion
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.26"
3+
s.version = "3.0.27"
44
s.summary = "SendBird iOS Framework"
55
s.description = "Messaging and Chat API for Mobile Apps and Websites"
66
s.homepage = "https://sendbird.com"

0 commit comments

Comments
 (0)