Skip to content

Commit

Permalink
* Fixed the bug of the group channel's data.
Browse files Browse the repository at this point in the history
* Added the feature for generating the thumbnail of the image file message.
  • Loading branch information
sf-jed-kyung committed Jan 3, 2017
1 parent addb97a commit cde4f28
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

### v3.0.26(Jan 3, 2017)
* Fixed the bug of the group channel's data.
* Added the feature for generating the thumbnail of the image file message.

### v3.0.25(Dec 23, 2016)
* Added a feature that sets a push notification template.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

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

Expand Down
28 changes: 24 additions & 4 deletions SendBirdSDK.framework/Headers/SBDBaseChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
//

#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>

#import "SBDUser.h"
#import "SBDUserMessage.h"
#import "SBDAdminMessage.h"
#import "SBDFileMessage.h"
#import "SBDError.h"

@class SBDPreviousMessageListQuery;
@class SBDThumbnail;
@class SBDFileMessage;
@class SBDUserMessage;
@class SBDMessageListQuery;
Expand Down Expand Up @@ -288,7 +291,7 @@
*
* @param file File <span>data</span>.
* @param filename File<span>name</span>.
* @param type The type of file.
* @param type The mime type of file.
* @param size File size.
* @param data Custom <span>data</span>.
* @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.
Expand All @@ -302,7 +305,7 @@
*
* @param file File <span>data</span>.
* @param filename File<span>name</span>.
* @param type The type of file.
* @param type The mime type of file.
* @param size File size.
* @param data Custom <span>data</span>.
* @param customType Custom message type.
Expand Down Expand Up @@ -344,7 +347,7 @@
*
* @param file File <span>data</span>.
* @param filename File<span>name</span>.
* @param type The type of file.
* @param type The mime type of file.
* @param size File size.
* @param data Custom <span>data</span>.
* @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).
Expand All @@ -359,7 +362,7 @@
*
* @param file File <span>data</span>.
* @param filename File<span>name</span>.
* @param type The type of file.
* @param type The mime type of file.
* @param size File size.
* @param data Custom <span>data</span>.
* @param customType Custom message type.
Expand All @@ -370,6 +373,23 @@
*/
- (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;

/**
* 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.
*
* @param file File <span>data</span>.
* @param filename File<span>name</span>.
* @param type The mime type of file.
* @param size File size.
* @param thumbnailSizes Thumbnail sizes. This parameter works for image file only.
* @param data Custom <span>data</span>.
* @param customType Custom message type.
* @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).
* @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.
*
* @return Returns the temporary file message with a request ID. It doesn't have a message ID and an URL.
*/
- (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;

#pragma mark - Load message list
/**
* Creates `SBDPreviousMessageListQuery` instance for getting the previous messages list of the channel.
Expand Down
2 changes: 1 addition & 1 deletion SendBirdSDK.framework/Headers/SBDCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
+ (nullable SBDCommand *)buildEnterChannel:(SBDBaseChannel * _Nonnull)channel;
+ (nullable SBDCommand *)buildExitChannel:(SBDBaseChannel * _Nonnull)aUser;
+ (nullable SBDCommand *)buildUserMessageWithChannelUrl:(NSString * _Nonnull)channelUrl messageText:(NSString * _Nonnull)messageText data:(NSString * _Nullable)data customType:(NSString * _Nullable)customType targetLanguages:(NSArray<NSString *> * _Nullable)targetLanguages;
+ (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;
+ (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;
+ (nullable SBDCommand *)buildPing;
+ (nullable SBDCommand *)buildStartTyping:(SBDGroupChannel * _Nonnull)channel startAt:(long long)startAt;
+ (nullable SBDCommand *)buildEndTyping:(SBDGroupChannel * _Nonnull)channel endAt:(long long)endAt;
Expand Down
47 changes: 47 additions & 0 deletions SendBirdSDK.framework/Headers/SBDFileMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,47 @@
#import "SBDBaseMessage.h"
#import "SBDBaseChannel.h"


/**
The `SBDThumbnail` class represents the thumbnail in the file message.
*/
@interface SBDThumbnail : NSObject


/**
The url of the thumbnail.
*/
@property (strong, nonatomic, readonly, nonnull) NSString *url;


/**
The maximum size of the thumbnail.
*/
@property (nonatomic, readonly) CGSize maxSize;


/**
Initializes the object for sending file message.
@param maxWidth The maximum width of the thumbnail.
@param maxHeight the maximum height of the thumbnail.
@return The `SBDThumbnail` object.
*/
- (nullable instancetype)initWithMaxWidth:(CGFloat)maxWidth maxHeight:(CGFloat)maxHeight;


/**
Initializes the object for the file message which is received.
@param width The width of the thumbnail.
@param height The height of the thumbnail.
@param url The url of the thumbnail.
@return The `SBDThumbnail` object.
*/
- (nullable instancetype)initWithWidth:(CGFloat)width height:(CGFloat)height url:(NSString * _Nonnull)url;

@end

@class SBDBaseChannel;

/**
Expand Down Expand Up @@ -57,6 +98,12 @@
*/
@property (strong, nonatomic, readonly, nullable) NSString *customType;


/**
Image thumbnails.
*/
@property (strong, nonatomic, readonly, nullable) NSArray<SBDThumbnail *> *thumbnails;

- (nullable instancetype)initWithDictionary:(NSDictionary * _Nonnull)dict;

/**
Expand Down
3 changes: 2 additions & 1 deletion SendBirdSDK.framework/Headers/SendBirdSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <UIKit/UIKit.h>
#import <CoreGraphics/CoreGraphics.h>

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

//! Project version string for SendBirdSDK.
FOUNDATION_EXPORT const unsigned char SendBirdSDKVersionString[];
FOUNDATION_EXPORT const unsigned char SendBirdSDKVersionString[];
Binary file modified SendBirdSDK.framework/Info.plist
Binary file not shown.
Binary file modified SendBirdSDK.framework/SendBirdSDK
Binary file not shown.
7 changes: 3 additions & 4 deletions SendBirdSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SendBirdSDK"
s.version = "3.0.25"
s.version = "3.0.26"
s.summary = "SendBird iOS Framework"
s.description = "Messaging and Chat API for Mobile Apps and Websites"
s.homepage = "https://sendbird.com"
Expand All @@ -11,7 +11,6 @@ Pod::Spec.new do |s|
s.platform = :ios, "7.0"
s.documentation_url = 'https://docs.sendbird.com/'
s.ios.vendored_frameworks = 'SendBirdSDK.framework'
s.ios.frameworks = ["UIKit", "QuartzCore", "CFNetwork", "Security", "Foundation", "MobileCoreServices"]
#s.ios.library = "icucore"
s.ios.libraries = ["icucore", "sqlite3"]
s.ios.frameworks = ["UIKit", "QuartzCore", "CFNetwork", "Security", "Foundation", "MobileCoreServices", "CoreGraphics"]
s.ios.library = "icucore"
end

0 comments on commit cde4f28

Please sign in to comment.