iOS

This page contains an overview of all relevant changes made to the iOS SDK and the latest version releases

Version 6.0.0 (2023-01-13)

New Features

  • Introduced Sub Channel functionality. Now users can create sub channels inside a channel.

Deprecations

  • All deprecated interfaces from AmitySDK v5.x.x has been removed in AmitySDK v6.0.0.

Breaking Changes

  • AmitySDK v6.0.0 has been written in PureSwift. This version has breaking changes in api interfaces. Please refer to the migration guide for more details.

  • Events related to channels of type Community & Conversation are automatically subscribed. To receive events for other type of channels, user needs to subscribe to it explicitly.

  • For subscribing to channel topics, create an instance of the AmityChannelTopic class and use the AmityTopicSubscription class to subscribe to it.

Compatibility

  • Xcode Version: 14.1

  • Realm Version: 10.32.2

  • Realm Swift Version: 10.32.2

  • Minimum Target: iOS 13.0

Version 5.33.0 (2022-12-16)

New Features

AmityClient {
    public func login(userId: String, displayName: String?, authToken: String?, sessionHandler: SessionHandler) async throws
}
  • Added sesionState API to AmityClient

  • Added issuedAt, expiresAt API to AmityUserToken

Fixes

  • Fixed issue where the user could not send a reply to image messages

  • Fixed issue where the user could not see the existing message when editing it

Deprecations

  • Deprecated connectionState API

  • Deprecated old login API

AmityClient {
    @available(*, deprecated) 
    @objc public func login(userId: String, displayName: String?, authToken: String?, completion: AmityRequestCompletion?)
}

Compatibility

  • Xcode Version: 14.1

  • Realm Version: 10.28.3

  • Minimum Target: iOS 13.0

Version 5.32.0 (2022-12-02)

Fixes

  • SDK Upgrade

Compatibility

  • Xcode Version: 14.1

  • Realm Version: 10.28.3

  • Minimum Target: iOS 13.0

Version 5.31.0 (2022-11-18)

New Features

  • Upgraded the post settings feature. When a moderator role is demoted to a user role, post creation must be approved by a moderator.

  • Introduced the ability to get video thumbnail image data from video messages using the AmityMessage.getVideoThumbnailImageInfo() function.

Fixes

  • Fixed issue where the application crashes when a globally banned user sends a message in a channel.

Compatibility

  • Xcode Version: 14.1

  • Realm Version: 10.28.3

  • Minimum Target: iOS 13.0

Version 5.30.0 (2022-11-04)

New Features

  • Introduced the ability for User roles to create community with “Admin can post only” settings.

Fixes

  • Fixed issue where the global feed is not updated after creating a post in the community feed or user feed.

Compatibility

  • Xcode Version: 14.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 13.0

Version 5.29.0 (2022-10-21)

New Features

  • Introduced the ability to query poll type.

  • Introduced the ability to query message by type.

Fixes

  • Fixed issue where channels with a certain ID were not retrieved correctly.

Compatibility

  • Xcode Version: 14.0.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 13.0

Version 5.28.1 (2022-10-18)

Fixes

  • Fixed issue where the application crashes with errorCannot register notification blocks from within write transactions when fetching Live Object or Live Collection within observe block.

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.28.0 (2022-10-07)

New Features

  • Introduced the ability to create video messgaes in Live, Broadcast, Community and Chat channels.

  • When creating a poll post, the setTimeToClosePoll value is set to 30 days by default if the user does not set any value.

Fixes

  • Fixed issue where the application crashes when the user adds a reaction to a message.

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.27.0 (2022-09-23)

Fixes

  • Fixed issue where SDK tries to query the current user after logging in.

  • Fixed issue where the isJoined property for AmityCommunity is not updated properly when a user leaves the community.

  • Fixed issue where the URL of the downloaded file is the same for multiple downloads.

  • Non-members with the User role can no longer be able to get information about the conversation channel.

  • Non-members with the User role can no longer query messages within the conversation channel.

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.26.1 (2022-09-15)

Fixes

  • Fixed issue where reaction count was incorrect

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.26.0 (2022-09-09)

New Features

  • Community query is now case-insensitive! You no longer have to match the case sensitivity of the community’s display name when querying for a community.

  • System now displays an error message while uploading HDR video format

Fixes

  • Fixed issue where reaction count becomes deficit

  • Fixed muting channel members issue

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.25.0 (2022-08-26)

New Features

  • Enhanced Video on Demand (VOD) configurations. Videos you upload with our SDK can now be transcoded to 4 different resolutions (from 360p to 1080p) with a maximum file size of 1 GB and a duration of up to 2 hours.

  • New method uploadVideo(with:forFeedType:progress:completion:) is added in AmityFileRepository

Fixes

  • Fixed issue where automatic invalidation of live collections happen once the session is logged out

  • Fixed issue where all SDK async functions are forced to be invoked on the main thread

  • Fixed issue where user cannot view post which has multiple videos

Deprecations

  • Deprecated uploadVideo(with:progress:completion:) method in AmityFileRepository

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.24.0 (2022-08-11)

New Features

  • Enhanced LiveCollections for message reactions. Newly created reactions are now automatically added into the collection. Affected APIs:

AmityReactionRepository
func getReactions(...) -> AmityCollection<AmityReaction>
  • Enhanced LiveCollections for followers/following users. Newly created followed/unfollowed are now automatically added into the collection. Affected APIs:

AmityUserFollowManager
func getMyFollowerList(...) -> AmityCollection<AmityFollowRelationship>
func getMyFollowingList(...) -> AmityCollection<AmityFollowRelationship>
func getUserFollowerList(...) -> AmityCollection<AmityFollowRelationship>
func getUserFollowingList(...) -> AmityCollection<AmityFollowRelationship>

Fixes

  • Fixed realtime events .myFollower and .myFollowing in AmityFollowTopic which subscribes to the wrong path

  • Fixed issue where user cannot submit vote when a poll is closed

  • Fixed issue where user cannot edit caption when a poll is closed

Dependency Changes

  • Updated Realm version to 10.28.3

Deprecations

  • DeprecatedAmityMessageReactor class. Please use AmityReactionRepository instead.

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.28.3

  • Minimum Target: iOS 12.0

Version 5.23.0 (2022-07-29)

New Features

  • Enhanced LiveCollections for users and community post. Newly added comments are now automatically added into the collection. Affected APIs:

AmityCommentRepository
func getCommentsWithReferenceId(...) -> AmityCollection<AmityComment>

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.26.0

  • Minimum Target: iOS 12.0

Version 5.22.0 (2022-07-15)

New Features

  • Enhanced LiveCollections for user and community posts. Newly created posts are now automatically added into the collection. Affected APIs:

AmityFeedRepository
func getUserFeed(...) -> AmityCollection<AmityPost>
func getCommunityFeed(...) -> AmityCollection<AmityPost>
  • Introduced real-time event for channel deletion

Fixes

  • Fixed issue with app crashes when searching members with AmityCommunityRepository

  • Fixed some SDK errors to no longer show empty error messages

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.26.0

  • Minimum Target: iOS 12.0

Version 5.21.0 (2022-07-04)

New Features:

  • Introduced ability to manage community post settings via SDK (i.e. 'Only Admins Can Post' or 'Approve Member Posts')

Fixes:

  • Fixed issue where users who weren't logged in were receiving push notifications.

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.26.0

  • Minimum Target: iOS 12.0

Version 5.20.0 (2022-06-17)

Dependency Changes

  • Updated Realm to 10.26.0

Compatibility

  • Xcode Version: 13.4.0

  • Realm Version: 10.26.0

  • Minimum Target: iOS 12.0

Version 5.19.0 (2022-06-02)

New Features

  • Added channel async/await APIs including create / join / update / leave.

Deprecations

  • Deprecate channel create / join update / leave that returns live object. Please use equivalent channel async/await APIs instead.

Version 5.18.0 (2022-05-20)

New Features

  • Real time update of user deletion

Compatibility

  • Xcode Version: 13.2

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.17.0 (2022-05-09)

New Features

  • Update image and file post by adding/removing them from the existing post

Compatibility

  • Xcode Version: 13.2

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.16.0 (2022-04-22)

New Features

  • Add isDeleted property to AmityUser.

Fixes

  • Fix issue where message unread count indicates incorrect value.

Compatibility

  • Xcode Version: 13.2

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.15.0 (2022-03-31)

New Features

  • Update video post by adding/removing the video from the existing post

  • Realtime events for comments and posts in the user feed

Fixes

  • Fix a channel member list sorting issue

  • Fix issue where querying channels with empty result doesn’t trigger completion block

  • Fix issue where targetUser and sourceUser from AmityFollowRelationship are always null when querying following/follower list

Compatibility

  • Xcode Version: 13.2

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.14.0 (2022-03-17)

New Features

Fix

  • Fix channel member list sorting issue

Breaking Changes

  • Deprecate getMyFollowInfo:completion and getUserFollowInfo:completion API

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.13.1 (2022-03-11)

Fixes

  • Fix issue where unreadCount in AmityChannel class isn’t updated and miscalculated

  • Fix issue where new messages sent by another user don't appear while observing AmityMessageListScreenViewModel.getMessages(:)

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.13.0 (2022-03-03)

Fixes

  • Fix crash related to mqtt realtime events on SDK

  • Fix issue where community category did not update when realtime event is received

  • Fix unregister notification issue

  • Fix mention highlight issue for reply

  • Framework installation via Cocoapods doesn’t support running on M1 natively

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.12.0 (2022-02-17)

New Features

  • Create a livestream post with mentions

  • Add push notification log menu in the sample app

Fixes

  • Fix mention selection issue in editing mode for a message

  • Fix comment reply mention highlight issue after editing

  • Fix crash issue when fetching channel with certain filter

Compatibility Xcode

  • Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.11.0 (2022-02-04)

New Features

  • Create a poll post with mentions

Fixes

  • Fix mention highlight issue after editing a message

  • Fix channel filter issue

  • Fix compose bar appearance issue after mentioning in a comment

  • Fix mentioned user remove issue on edit message page

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.10.0 (2022-01-25)

New Features

  • Hard delete post and comment

  • Old mentions in a message will not be removed after editing the message

  • Custom post ranking global feed to support a score-sorting mechanism

  • User level notification error

  • Live collection allObjects API

Fix

  • Compose bar text wrapping issue when creating a message, post, and comment

Breaking Changes

  • Add hardDelete parameter to Post and Comment deletion API

AmityPostRepository.deletePost(withPostId:, parentId:, hardDelete:, completion:)

AmityCommentRepository.deleteComment(withId:, hardDelete:, completion:)

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.21.1

  • Minimum Target: iOS 12.0

Version 5.9.0 (2021-12-24)

New Features

  • Add properties createdAt, updatedAt, rateLimit to AmityChannel.

  • Add AmityClient.disconnect() API

  • Add support for real time events for social module

  • Create/Update comment/reply with mention

Fix

  • Update many functions documentation in SDK

Breaking Changes

  • Rename AmityClient functions

    Before SDK 5.9.0SDK 5.9.0

    registerDevice(...)

    login(...)

    unregisterDevice()

    logout()

  • Rename AmityMessageMentionMetadata to AmityMentionMapper

  • Change AmityClient initializer to throwable initializer

    class AmityClient {
        public init(...) throws
    }

  • Change all message creation API in AmityMessageRepository to callback-style Before SDK 5.9.0

    let messageLiveObject = messageRepository.createTextMessage(...)
    token = messageLiveObject.observe(...) {
        // 1. Handle message creation response.
        // 2. Observe message data changes.
    }

    SDK 5.9.0

    let messageId = messageRepository.createTextMessage(...) { message, error in
        // 1. Handle message creation response.
    }
    token = messageRepository.getMessage(messageId).observe {
        // 2. Observe message data changes.
    }

  • Simplify channel creation API Before SDK 5.9.0: The API requires chaining .channelType(with:) after calling .createChannel()

    token = channelRepository.createChannel().community(with: builder).observe { channel, error in
        /// ...
    }

    SDK 5.9.0: The builder can be passed to createChannel(with:) directly

    token = channelRepository.createChannel(with: builder).observe { channel, error in
        /// ...
    }

  • Simplify channel update API Before SDK 5.9.0: Developers need to create an updater and call updater.update()

    let updater = channelRepository.updateChannel(channelId)
    token = updater.update().observe { channel, error in
        // ...
    }

    SDK 5.9.0: Developers can call updateChannel(with:) directly

    token = channelRepository.updateChannel(with: builder).observe { channel, error in
        // ...
    }

  • Simplify channels query API Before SDK 5.9.0: Developers need to create a query builder for a specific channel type. To pass the query builder, developers need to pick the correct channel type function after .getChannel() call

    let builder = AmityCommunityChannelQueryBuilder(...)
    
    let collection = repository.getChannels().communityType(with: builder).query()
    token = collection.observe { collection, error in
        // ...
    }

    SDK 5.9.0: Developers can create a generic AmityChannelQuery and pass it to .getChannels(with:) directly. To filter channel types, developers can set query.types which the value can be found in AmityChannelQueryType.

    let query = AmityChannelQuery()
    query.types = [AmityChannelQueryType.conversation]
    query.filter = .all
    query.includingTags = ["dog"]
    query.excludingTags = ["cat"]
    query.includeDeleted = false
    
    token = channelRepository.getChannels(with: query).observe { collection, error in
        // ...
    }

  • Deprecate the following methods:

    • AmityClient(apiKey:_, httpUrl:_, socketUrl:_)

    • AmityClient(apiKey:_, url:_) Use the following methods instead:

    • Use AmityClient(apiKey:_, region:_)

    • AmityClient(apiKey:_, endpoint:_) methods instead.

  • AmityRegionalEndpoint is now deprecated. Use AmityRegion instead.

    // New Way:
    let client = AmityClient(apiKey: "api-key", region: .global)

  • clientErrorDelegate in AmityClient is now deprecated. A new delegate property is introduced in AmityClient. Now you can observe connection status change through delegate itself.

    let client = AmityClient(...)
    client.delegate = self
    
    
    extension MyClass: AmityClientDelegate { 
            
            func didChangeConnectionStatus(status: AmityConnectionStatus) { 
                    // Observe connection status change here
            }
            
            func didReceiveError(error: Error) { 
                    // Handle Error
            }
    }

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.20.0

  • Minimum Target: iOS 12.0

Version 5.8.0 (2021-12-09)

New Features

  • Create/Update text, image, video and file post with mention

  • New addRoles and removeRoles functions to add and remove roles respectively in AmityCommunityModeration

  • Add isGlobalBan property in AmityUser to show whether user is globally banned or not

  • New AmityCommunityMembershipFilterOption filter option for community membership

  • New buildForPostUpdate method in AmityPostBuilder protocol to update post

  • New buildForPostUpdate method in AmityImagePostBuilder and AmityFilePostBuilder

Breaking Changes

  • addRole and removeRole methods are deprecated in AmityCommunityModeration

  • filter parameter is removed and a new membershipOptions parameter is provided for getMembers function to filter community members in AmityCommunityParticipation

  • setFileData is renamed to setFiles method in AmityFilePostBuilder

  • setImageData is renamed to setImages method in AmityImagePostBuilder

Compatibility

  • Xcode Version: 13.1

  • Realm Version: 10.20.0

  • Minimum Target: iOS 12.0

Version 5.7.2 (2021-11-15)

Fix

  • App crashes when calling getMyFollowerList() or getMyFollowingList() of AmityUserFollowManager

Compatibility

  • Xcode Version: 12.5

  • Realm Version: 10.12.0

  • Minimum Target: iOS 12.0

Version 5.7.1 (2021-11-02)

Fixes

  • Fix community search issue

  • Fix realm crash by checking if realm session object is still valid before accessing it

Compatibility

  • Xcode Version: 12.5

  • Realm Version: 10.12.0

  • Minimum Target: iOS 12.0

Version 5.7.0 (2021-10-14)

New Feature

  • Remove mentionedUsers array from AmityMessage model and provide mentionees (AmityMentionees) array instead

Fixes

  • Do not mention banned users

  • Do not mention user who left the channel

Breaking Changes

Api:

  • AmityMessageFlagger class requires id of the message in init method

    let flagger = AmityMessageFlagger(client: <client>, messageId: <message-id>)
  • AmityUserFlagger class requires user id in init method

    let flagger = AmityUserFlagger(client: <client>, userId: <user-id>)
  • AmityCommentEditor class requires id of the comment in init method

    let editor = AmityCommentEditor(client: <client>, commentId: <comment-id>)
  • AmityMessageReactor class requires id of the message in init method

    let editor = AmityMessageReactor(client: <client>, messageId: <message-id>)

Compatibility

  • Xcode Version: 12.5

  • Realm Version: 10.12.0

  • Minimum Target: iOS 12.0

Version 5.6.1 (2021-09-16)

Fix

  • Realm exception in release 5.6.0

Compatibility

  • Xcode Version: 12.5

  • Realm Version: 10.12.0

  • Minimum Target: iOS 12.0

Version 5.6.0 (2021-09-14)

New features

Mention

Compatibility

  • Xcode Version: 12.5

  • Realm Version: 10.12.0

  • Minimum Target: iOS 12.0

Version 5.5.0 (2021-08-17)

Fix

  • Upgrade realm to version 10.12.0

Version 5.4.1 (2021-08-13)

Fix

  • Updated channel cache data when ban event is received, while joining channel, and querying messages

Version 5.4.0 (2021-08-3)

Fixes

  • Fixed issue where category values are incorrect for community

  • Fixed issue where comment count does not reflect the correct value after removing comments

Breaking Changes

  • Introduce AmityPostRepository

    • Added getPosts(:_) method for querying post by filter options

  • Deprecated post related functions in AmityFeedRepository. All equivalent functions are moved to AmityPostRepository.

Version 5.3.1 (2021-07-21)

Fixes

  • Feed type querying improvements

  • Fix issue where create post does not return proper data in the completion

Breaking Changes

  • Revise a completion block of createPost: and updatePostWithPostId: methods in AmityFeedRepository from AmityRequestCompletion to AmityPostRequestCompletion

    • AmityPostRequestCompletion represents to (AmityPost?, Error?) -> Void

Version 5.3.0 (2021-07-8)

New Features

  • Add a function for getting post count by feed type to the AmityCommunity model.

  • Add a function for getting isPostReviewEnabled function to the AmityCommunity model.

  • Add new permission AmityPermission.reviewCommunityPost type

  • Add api for setting isPostReviewEnabled value on create and update community builder.

Follow

  • Add a property followManager to AmityUserRepository to provide follow feature functionalities

  • Add a method to create a Follow request.

  • Add a method to withdraw a Follow request.

  • Add a method to accept a Follow request.

  • Add a method to decline a Follow request.

  • Add a method to get a Follow status.

  • Add a method to get a Follower user list.

  • Add a method to get a Following user list.

  • Add a method to get a Follow request list.

  • Add AmityFeedType enum

  • Add a function for getting feed type to the AmityPost model.

  • Add api for community feed query by feed type.

  • Add api for post approval.

Breaking Changes

  • Introduce feedType parameter to getCommunityFeed(:_) function in AmityCommunityRepository . Set a parameter .published to support a usual behavior.

  • A live object ofAmityUser where provides by AmityCommunityMember and AmityChannelMember are changed to normal object.

Others

  • Introduce a completion parameter to registerDeviceWithUserId(:_) in AmityClient

  • Fix socket connection state that causes feed cannot be loaded

  • Fix issue where token does not update correctly

  • Fix issue where collection is not triggered when there is empty result

  • Fix edited date does changed after the comment get updated

Fixes

  • Fix no response issue when uploading multiple images

  • Fix crash when fetching user

Fixes

  • Fix issue where custom messages are not parsed correctly

  • Fix crash when setting up custom avatar for in AmityClient class.

Fixes

  • All public methods and classes which contained Eko prefix renamed to Amity: EkoClient renamed to AmityClient , EkoChat renamed to AmitySDK

  • Some classes and methods are modified or removed:

    Remove classes: EkoMessageReactor, EkoMediaRepository.

    Rename method: messages to getMessages in AmityMessageRepository class. Add class: AmityUserUpdateBuilder- to build updates for user Add method: setAvatar(avatar: AmityImageData?) - to set user avatar The full description can be found here

Last updated