The Agora Real-time Messaging (RTM) SDK provides a streamlined and stable messaging mechanism for you to quickly implement real-time messaging for various scenarios. See product overview for more information.
As of v1.4.6, the SDK supports iOS 15. For the SDK versions v1.4.4 and v1.4.5, crashes occur on iOS 15. To fix this issue, upgrade the SDK to v1.4.6 or later.
v1.4.10 was released on March 01, 2022.
This release adds supports for running the iOS simulator on devices with M1 chips.
Fixed some rich media related crashes.
v1.4.9 was released on November 19, 2021.
Improved the login success rate and connection stability under the IPv4/IPv6 dual-stack network.
This release fixed the following issues:
v1.4.8 was released on July 23, 2021.
This release update the SDK version in the Info.plist file to the latest version.
v1.4.7 was released on July 19, 2021.
v1.4.6 was released on June 21, 2021. This release supports iOS 15.
v1.4.5 was released on April 30, 2021.
As of v1.4.4, the SDK has been upgraded from a static library to a dynamic library, and the format of all dynamic libraries changes from framework to XCFramework. See Upgrade to v1.4.5 on iOS/macOS.
If you are using a build tool that does not support the dynamic library in XCFramework format, Agora provides the following scripts to help you integrate:
Fixed some issues that might cause crashes to improve stability.
The iOS app integrated with the SDK v1.4.4 cannot be published on the App Store due to review issues.
v1.4.4 was released on April 20, 2021.
This release replaces the static library with a dynamic library for the following reasons:
To upgrade the RTM Native SDK, you must re-integrate the dynamic library, AgoraRtmKit.xcframework. And there is no need to integrate dependent libraries.
The format of all dynamic libraries changes from Framework to XCFramework. A dynamic library in XCFramework format supports running a project on both physical devices and simulators.
Improved the success rate of logins and message delivery for the RTM SDK in poor network conditions.
This release fixed the following issues:
v1.4.3 was released on February 10, 2021.
This release fixed the following issues:
AgoraAreaCode
constant of the Agora RTC SDK and the AgoraRtmAreaCode
constant of the Agora RTM SDK when using Swift. As of v1.4.3, Agora Objective-C SDK for iOS/macOS provides AgoraRtmKit_swift.h
, which updates the constant values of AgoraRtmAreaCode
, to avoid this naming conflict.v1.4.2 was released on November 23, 2020.
AGORA_SDK_BOTH_RTM_AND_RTC
macro for the AgoraRtmAreaCode
enum type. You can use the macro to resolve naming conflicts when using RTC and RTM together.v1.4.1 was released on September 30, 2020.
Improved the log file.
Fixed the pop up issue in iOS 14. See this FAQ.
v1.4.0 was released on September 1, 2020.
setLogFileSize
, the default log file size increases from 512 KB to 10 MB. The maximum log file size increases from 10 MB to 1 GB.AgoraRtmKit
instance, you must call destroyChannelWithId
to destroy all existing AgoraRtmChannel
instances. Otherwise, the SDK may crash.setRtmServiceContext
to set the region of the Agora RTM SDK. The RTM SDK can only connect to Agora RTM servers within the specified region.New methods
v1.3.0 was released on May 8, 2020.
Compatibility changes
New features
v1.3.0 supports downloading non-empty files that are smaller than 30 MB. You can cancel an ongoing upload or download process at any time. Each file you upload to the Agora server corresponds to a media ID. The file stays on the Agora server for seven days. You can use the media ID to download the file as long as it is is still on the Agora server.
v1.3.0 adds the AgoraRtmFileMessage
interface for saving and transferring a media ID. The AgoraRtmFileMessage
interface inherits from the AgoraRtmMessage
interface, so you can use existing peer-to-peer or channel messaging methods to transfer the AgoraRtmFileMessage
instance. You can use the AgoraRtmFileMessage
interface to complete the following tasks:
v1.3.0 supports downloading non-empty image files that are smaller than 30 MB. You can cancel an ongoing upload or download process at any time. Each image file you upload to the Agora server corresponds to a media ID. The image file stays on the Agora server for seven days. You can use media ID to download the image file as long as the image file is still on the Agora server.
v1.3.0 adds the AgoraRtmImageMessage
interface for saving and transferring a media ID. The AgoraRtmImageMessage
interface inherits from the AgoraRtmMessage
interface, so you can use existing peer-to-peer or channel messaging methods to transfer the AgoraRtmImageMessage
instance. You can use the AgoraRtmImageMessage
interface to complete the following tasks:
SDK returns the progress of an upload or download by callback every second during a task in progress. If the upload or download task pauses, the SDK ceases to return any further callback until the task continues.
Bug fixes
API changes
createFileMessageByUploading:withRequest:completion:
createImageMessageByUploading:withRequest:completion:
cancelMediaUpload:completion:
cancelMediaDownload:completion:
createFileMessageByMediaId:
createImageMessageByMediaId:
downloadMediaToMemory:withRequest:completion:
downloadMedia:toFile:withRequest:completion:
rtmKit:media:uploadingProgress:
rtmKit:media:downloadingProgress:
AgoraRtmUploadFileMediaBlock
AgoraRtmUploadImageMediaBlock
AgoraRtmCancelMediaBlock
AgoraRtmDownloadMediaToMemoryBlock
AgoraRtmDownloadMediaToFileBlock
rtmKit:fileMessageReceived:fromPeer:
rtmKit:imageMessageReceived:fromPeer:
channel:fileMessageReceived:fromMember:
channel:imageMessageReceived:fromMember:
sendMessage:completion:
is deprecated. Use sendMessage:sendMessageOptions:completion:
instead.
v1.2.2 was released on December 13, 2019.
Issues Fixed
Occasionally fails to receive any callback after a channel attribute operation.
v1.2.1 was released on November 29, 2019.
New Feature
Compatible with the endCall method of the Agora Signaling SDK
If you use the sendMessageToPeer
method to send a text message in the format of AgoraRTMLegacyEndcallCompatibleMessagePrefix_<channelId>_<your additional information>, then this method is compatible with the endCall method of the legacy Agora Signaling SDK. Replace <channelId> with the channel ID from which you want to leave (end call), and replace <your additional information> with any additional information. Note that you must not put any "_" (underscore) in your additional information but you can set <your additional information> as empty "".
Issues Fixed
MemberJoined
twice. v1.2.0 was released on November 6, 2019.
Compatibility Changes
Deprecated the isOnline
property of the AgoraRtmPeerOnlineStatus
. Use state
instead.
New Features
When the method call succeeds, the SDK returns the PeersOnlineStatusChanged callback to report the online status of peers, to whom you subscribe.
When the online status of the peers, to whom you subscribe, changes, the SDK returns the PeersOnlineStatusChanged callback to report whose online status has changed.
If the online status of the peers, to whom you subscribe, changes when the SDK is reconnecting to the server, the SDK returns the PeersOnlineStatusChanged callback to report whose online status has changed when successfully reconnecting to the server.
Allows you to unsubscribe from the online status of the specified user(s).
Allows you to get a list of the peers, to whose specific status you have subscribed.
Creates and initializes a raw message to be sent.
If you set a text description, ensure that the size of the raw message and the description combined does not exceed 32 KB.
v1.1.0 is released on September 18, 2019. It adds the following features:
Compatibility Changes
New Features
You can now get the member count of specified channel(s) without the need to join, by calling the getChannelMemberCount method. You can get the member counts of a maximum of 32 channels in one method call.
If you are already in a channel, you do not have to call the getChannelMemberCount
method to get the member count of the current channel. We also do not recommend using onMemberJoined
and onMemberLeft
to keep track of the member counts. As of this release, the SDK returns to the channel members memberCount the latest channel member count when the number of channel members changes. Note that:
Please treat this callback and the AgoraRtmGetMembersBlock callback separately:
- The former is an automatic callback. It returns the current numer of channel members;
- The latter is triggered by the getMembersWithCompletion method. It returns a member list of the current channel. If the number of channel members exceeds 512, the SDK only returns a list of 512 randomly-selected channel members.
Supports setting or getting the attribute(s) of a specified channel. You can use this feature to create group anouncement.
Each channel attribute comes as a key-value pair. See AgoraRtmChannelAttribute. Where:
Specific features:
When updating attributes of a channel, you can use the enableNotificationToChannelMembers flag to decide whether or not to notify all members of the channel about this attribute change.
The SDK caches the channel attributes. If multiple users have the privilege to update the channel attributes, then we recommend calling the getChannelAllAttributes to update the cache before updating the channel attributes.
Improvements
This release improves the resending mechanism of peer-to-peer messages, and extends the timeout for sending a peer-to-peer message from five to 10 seconds, greatly improving the success rate of peer-to-peer message sending under weak network conditions.
The Agora RTM system will resend a maximum of 32 channel messages of up to 30 seconds to channel members, when they manage to reconnect to the system from poor network conditions. This greatly improves the overall arrival rate of channel messages under weak network conditions.
API Changes
v1.0.1 is released on August 1st, 2019.
connectionStateChanged
callback. v1.0.0 is released on July 24th, 2019.
v1.0.0 implements the channelId
property in the AgoraRtmLocalInvitation
class.
- To intercommunicate with the legacy Agora Signaling SDK, you MUST set the channel ID. However, even if the callee successfully accepts the call invitation, the Agora RTM SDK does not join the channel of the specified channel ID.
- If your App does not involve the legacy Agora Signaling SDK, we recommend using the
content
property of theAgoraRtmLocalInvitation
class or theresponse
property of theAgoraRtmRemoteInvitation
class to set customized contents.
Supports changing the default path to the SDK log file using the setLogFile
method. To avoid creating an incomplete log file, we recommend calling this method once you have created and initialized an AgoraRtmKit
instance.
Supports setting the output log level of the SDK using the setLogFilter
method. The log level follows the sequence of OFF, CRITICAL, ERROR, WARNING, and INFO. Choose a level to see the logs preceding that level. If, for example, you set the log level to WARNING, you see the logs within levels CRITICAL, ERROR, and WARNING. See also AgoraRtmLogFilter.
You can call this method once you have created and initializd an
AgoraRtmKit
instance. You do not have to call this method after calling theloginByToken
method.
Supports setting the log file size using the setLogFileSize
method. The log file has a default size of 512 KB. File size settings of less than 512 KB or greater than 10 MB will not take effect.
You can call this method once you have created and initializd an
AgoraRtmKit
instance. You do not have to call this method after calling theloginByToken
method.
Adds error codes based on the following scenarios:
loginByToken
method or the method call of loginByToken
does not succeed before calling any of the RTM core APIs. v0.9.3 is released on June 7th, 2019.
This version allows you to send a message to a specified user when he/she is offline. If you set a message as an offline message and the specified user is offline when you send it, the RTM server caches it. Please note that for now we only cache 200 offline messages for up to seven days for each receiver. When the number of the cached messages reaches this limit, the newest message overrides the oldest one.
This version allows you to set or update a user's attributes. You can:
- Only after you successfully loggin in the Agora RTM system can you execute user attribute-related operations. Otherwise, the SDK triggers the
AgoraRtmAttributeOperationErrorNotReady
error code.- The attributes you set will be clears when you log out of the RTM system.
- You can only set a maximum of 16 KB attributes in a single method call. Otherwise, the SDK triggers the
AgoraRtmAttributeOperationErrorSizeOverflow
error code.
AgoraRtmJoinChannelErrorFailure
error code. v0.9.2 is released on May 5th, 2019.
This release does not support creating an RtmChannel instance before logging in the Agora RTM system
This release introduces a new concept: online and offline.
This release adds the function of querying the online status of the specified users. After logging in the Agora RTM system, you can get the online status of a maximum of 256 specified users. See queryPeersOnlineStatus.
- The sequence of the returned user IDs is identical to the input sequence.
- The call frequency of this method is 10 times every five seconds. See Limitations.
In the production environment, you need to use a token to log in the Agora RTM system. Each token expires 24 hours after it is created. This release allows you to renew a token.
- The renewToken method must be called before creating an RtmClient.
- The call frequency of the renewToken method is two times every second. See Limitations.
userId
that starts with a space.Adds the following error code for when a user sends a call invitation without logging in the Agora RTM system.
v0.9.1 is released on April 4th, 2019.
This release adds the call invitation feature, allowing you to create, send, cancel, accept, and decline a call invitation in a one-to-one or one-to-many voice/video call.
This version does not come with the
setLogFile
orsetLogFilter
method.
- For iOS platforms, all log information is kept at /Library/Caches/agorartm.log by default.
- For macOS platforms, all log information is kept at ~/Library/Logs/agorartm.log by default.
AgoraRtmSendMessageErrorCode
constants, uses AgoraRtmSendPeerMessageErrorCode and AgoraRtmSendChannelMessageErrorCode instead.channelDelegate
as a property so that developers can freely update it. AgoraRtmChannelDelegate
.v0.9.0 is released on February 4th, 2019.
Initial version.
Key features: