SBDFileMessage Class Reference

Inherits from SBDBaseMessage : NSObject
Declared in SBDFileMessage.h

Overview

The SBDFileMessage class represents the file message which is generated by a user via sendFileMessageWithBinaryData:filename:type:size:data:completionHandler:, sendFileMessageWithUrl:size:type:data:completionHandler: or sendFileMessageWithBinaryData:filename:type:size:data:progressHandler:completionHandler: in SBDBaseChannel or Platform API. This class doesn’t include a binary data for the file. It is just a URL.

  sender

Sender of the message. This is represented by SBDSender class.

@property (strong, nonatomic, nullable, getter=sender) SBDSender *sender

Declared In

SBDFileMessage.h

  url

The file URL.

@property (strong, nonatomic, readonly, nonnull, getter=url) NSString *url

Declared In

SBDFileMessage.h

  name

The name of file.

@property (strong, nonatomic, readonly, nonnull) NSString *name

Declared In

SBDFileMessage.h

  size

The size of file.

@property (atomic, readonly) NSUInteger size

Declared In

SBDFileMessage.h

  type

The type of file.

@property (strong, nonatomic, readonly, nonnull) NSString *type

Declared In

SBDFileMessage.h

  requestId

Request ID for ACK.

@property (strong, nonatomic, readonly, nullable) NSString *requestId

Declared In

SBDFileMessage.h

  thumbnails

Image thumbnails.

@property (strong, nonatomic, readonly, nullable) NSArray<SBDThumbnail*> *thumbnails

Declared In

SBDFileMessage.h

  requestState

Represents the dispatch state of the message. If message is not dispatched completely to the SendBird server, the value is SBDMessageRequestStatePending. If failed to send the message, the value is SBDMessageRequestStateFailed. And if success to send the message, the value is SBDMessageRequestStateSucceeded.

@property (assign, nonatomic, readonly) SBDMessageRequestState requestState

Availability

3.0.141

Declared In

SBDFileMessage.h

  requestedMentionUserIds

Represents target user ids to mention when success to send the message. This value is valid only when the message is a pending message or failed message. If the message is a succeeded message, see mentionedUserIds

@property (strong, nonatomic, readonly, nonnull) NSArray<NSString*> *requestedMentionUserIds

Availability

3.0.147

Declared In

SBDFileMessage.h

+ buildWithFileUrl:name:size:type:data:requestId:sender:channel:customType:

Builds file message with the information which is releated to file. (Deprecated: in 3.0.116 DO NOT USE THIS METHOD.)

+ (nullable NSMutableDictionary<NSString*,NSObject*> *)buildWithFileUrl:(NSString *_Nonnull)url name:(NSString *_Nullable)name size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data requestId:(NSString *_Nullable)requestId sender:(SBDUser *_Nonnull)sender channel:(SBDBaseChannel *_Nonnull)channel customType:(NSString *_Nullable)customType

Parameters

url

The file URL.

name

The name of file.

size

The size of file.

type

The type of file.

data

The custom data for file.

requestId

Request ID for ACK.

sender

Sender of the message.

channel

The channel which the file message is sent.

customType

Custom message type.

Return Value

File message object with request ID.

Declared In

SBDFileMessage.h

+ buildWithFileUrl:name:size:type:data:requestId:sender:channel:customType:thumbnailSizes:

Builds file message with the information which is releated to file. (Deprecated: in 3.0.116 DO NOT USE THIS METHOD.)

+ (nullable NSMutableDictionary<NSString*,NSObject*> *)buildWithFileUrl:(NSString *_Nonnull)url name:(NSString *_Nullable)name size:(NSUInteger)size type:(NSString *_Nonnull)type data:(NSString *_Nullable)data requestId:(NSString *_Nullable)requestId sender:(SBDUser *_Nonnull)sender channel:(SBDBaseChannel *_Nonnull)channel customType:(NSString *_Nullable)customType thumbnailSizes:(NSArray<SBDThumbnailSize*> *_Nullable)thumbnailSizes

Parameters

url

The file URL.

name

The name of file.

size

The size of file.

type

The type of file.

data

The custom data for file.

requestId

Request ID for ACK.

sender

Sender of the message.

channel

The channel which the file message is sent.

customType

Custom message type.

thumbnailSizes

Thumbnail sizes to require.

Return Value

File message object with request ID.

Declared In

SBDFileMessage.h

– url

Returns url

- (nonnull NSString *)url

Return Value

Image url.

Declared In

SBDFileMessage.h

– serialize

Serializes message object.

- (nullable NSData *)serialize

Return Value

Serialized data.

Declared In

SBDFileMessage.h

– sender

Returns sender.

- (nonnull SBDSender *)sender

Return Value

Sender of the message.

Declared In

SBDFileMessage.h