What Changed in v8
SDK v8 is a major release focused on three goals:- Remove Realm — the cache layer is now powered by Core Data, restoring Xcode forward compatibility and removing a heavyweight dependency from your project.
- Modernise the API surface — constructors, async methods, and model objects follow consistent, Swift-idiomatic patterns.
- Expand product tagging and room capabilities — new APIs for product tags, room management, and co-host permissions.
Installation
SDK
Realm and RealmSwift are no longer required as of v8.| Method | Steps |
|---|---|
| Swift Package Manager | No changes needed. Install using the v8 release tag. Realm is not installed by default. |
| Manual (xcframework) | Remove Realm.xcframework and RealmSwift.xcframework from your project. Embed the new AmitySDK.xcframework as usual. |
UIKit
| Method | Steps |
|---|---|
| Swift Package Manager | No changes needed. Install using the v8 UIKit release tag. |
| Manual (xcframework) | Remove Realm.xcframework and RealmSwift.xcframework. Embed the new AmitySDK.xcframework as usual. |
| Open Source | Realm.xcframework and RealmSwift.xcframework are no longer installed through the SharedFrameworks Package.swift file. |
Global Breaking Changes
These patterns apply across the entire SDK. Per-class sections below only document changes beyond these rules.1. Client removed from constructors
All repositories and managers no longer accept anAmityClient parameter. The SDK manages the client internally.
2. Mutating methods return Void
Methods that previously returned Bool to indicate success now return Void. A successful call means success; any failure throws an error.
3. Completion handlers replaced with async/await
4. Model objects are immutable value snapshots
modelandclientproperties removed from all model classes.- All properties changed from
vartolet. Exceptions are noted per class. - Timestamp properties (
createdAt,updatedAt,editedAt, etc.) changed fromDatetoDate?.
5. AmityCollection observe callback signature changed
AmityCollectionChange has been removed. The callback no longer delivers per-change index information.
Renamed Classes
| v7 | v8 |
|---|---|
AmityChannelQuery | AmityChannelQueryOptions |
AmityChannelUpdateBuilder | AmityChannelUpdateOptions |
AmityCommunityChannelBuilder | AmityCommunityChannelCreateOptions |
AmityConversationChannelBuilder | AmityConversationChannelCreateOptions |
AmityDefaultChannelBuilder | AmityDefaultChannelCreateOptions |
AmityLiveChannelBuilder | AmityLiveChannelCreateOptions |
AmityRawFile | AmityFile |
AmityUserUpdateBuilder | AmityUserUpdateOptions |
New Classes
| Class | Description |
|---|---|
AmityFile | Replaces AmityRawFile. Adds fileUrl, altText, feedType, status, videoUrl, attributes. |
AmityMetadataMapper | Replaces the deprecated AmityMentionMapper. Supports both mentions and hashtags. |
AmityTextProductTag | A product tag embedded in post text: productId, product, index, length. |
AmityMediaProductTag | A product tag attached to a media item: productId, product. |
AmityAttachmentProductTags | Container for per-attachment product tags when creating or editing posts. |
AmityProduct | New product model: productId, productName, productUrl, status, price, currency, thumbnailUrl, etc. |
AmityProductCatalogueSetting | Product catalogue setting from the server: enabled: Bool. |
AmityRoomResolution | Stream resolution info for a room: aspectRatio, width, height. |
Removed APIs
| Class | Removed | Replacement |
|---|---|---|
AmityCollection | count() | snapshots.count |
AmityCollection | object(at:) | snapshots[index] |
AmityCollection | allObjects() | snapshots |
AmityChannel | getPreviewMembers() | previewMembers property |
AmityCollectionChange | Entire class | — |
AmityAdImage | Entire class | — |
AmityUserRepository | userRelationship property | Instantiate AmityUserRelationship() directly |
Per-Class Changes
Only changes beyond the global breaking changes are listed here.AmityChannel
AmityChannel
| Change | Details |
|---|---|
currentMembership renamed | → currentMember: AmityChannelMember? |
previewMembers added | [AmityChannelMember] — replaces the removed getPreviewMembers() method |
attachedToPost, attachedToStream removed | No replacement |
attachedToRoom | Now externally read-only (public private(set) var) |
AmityChannelMembership
AmityChannelMembership
init(channelId: String) — no client parameter.AmityChannelModeration
AmityChannelModeration
init(channelId: String) — no client parameter.AmityChannelNotificationsManager
AmityChannelNotificationsManager
- Init signature changed:
init(channelId: String) getSettings()return type is nowAmityChannelNotificationSettings
AmityChannelQueryOptions (was AmityChannelQuery)
AmityChannelQueryOptions (was AmityChannelQuery)
AmityChannelRepository
AmityChannelRepository
| Method | Change |
|---|---|
getChannels(with:) | Parameter type: AmityChannelQuery → AmityChannelQueryOptions |
createChannel(with:) | Parameter type: AmityChannelBuilder → AmityChannelCreateOptions |
editChannel(with:) | Parameter type: AmityChannelUpdateBuilder → AmityChannelUpdateOptions |
AmityClient
AmityClient
editUser(_:) parameter type changed: AmityUserUpdateBuilder → AmityUserUpdateOptionsAmityComment
AmityComment
links: [AmityLink]addedisInvalidatedremoved
AmityCommentCreateOptions
AmityCommentCreateOptions
links: [AmityLink]? added.AmityCommentQueryOptions
AmityCommentQueryOptions
pageSize: Int = 20 added.AmityCommentUpdateOptions
AmityCommentUpdateOptions
links: [AmityLink]? added.AmityCommunity
AmityCommunity
user: AmityUser?added (the community creator/owner)eventproperty removed
AmityCommunityMembership
AmityCommunityMembership
- Init signature changed:
init(communityId: String) getMembers(...)andsearchMembers(...)gainexcludingRoles: [String] = []
AmityCommunityModeration
AmityCommunityModeration
init(communityId: String) — no client parameter.AmityCommunityNotificationsManager
AmityCommunityNotificationsManager
init(communityId: String)| v7 | v8 |
|---|---|
enable(for events:completion:) | enable(events:) async throws |
disable(completion:) | disable() async throws |
getSettingsWithCompletion(_:) | getSettings() async throws -> AmityCommunityNotificationSettings |
AmityCommunityRepository
AmityCommunityRepository
| v7 | v8 |
|---|---|
deleteCommunity(withId:completion:) | deleteCommunity(withId:) async throws |
joinCommunity(withId:) async throws -> Bool | No longer deprecated. Returns Void. |
leaveCommunity(withId:) async throws -> Bool | Returns Void. |
AmityFeedRepository
AmityFeedRepository
| v7 | v8 | Notes |
|---|---|---|
getMyFeedSorted(feedSources:dataTypes:by sortBy:...) | getMyFeed(feedSources:dataTypes:sortBy:...) | Renamed; by sortBy: label removed |
getUserFeed(...) | getUserFeed(...) | Added untilAt: Date? |
getCommunityFeed(...) | getCommunityFeed(...) | Added untilAt: Date? |
AmityFileRepository
AmityFileRepository
getFile(fileId:) return type changed: AmityRawFile → AmityFileAmityImageStoryCreateOptions
AmityImageStoryCreateOptions
tartgetId → targetId. Update all call sites.AmityLiveChannelCreateOptions (was AmityLiveChannelBuilder)
AmityLiveChannelCreateOptions (was AmityLiveChannelBuilder)
setVideoStreamId(_:) is deprecated. Use setRoomId(_:) instead.AmityMentionMapper (deprecated)
AmityMentionMapper (deprecated)
AmityMetadataMapper.| Deprecated | Replacement |
|---|---|
AmityMentionMapper.mentions(fromMetadata:) | AmityMetadataMapper.mentions(fromMetadata:) |
AmityMentionMapper.metadata(from:) | AmityMetadataMapper.metadata(mentions:hashtags:) |
AmityMetadataMapper also adds hashtags(fromMetadata:) -> [AmityHashtag].AmityMessageRepository
AmityMessageRepository
| v7 | v8 |
|---|---|
deleteFailedMessages(completion:) | deleteFailedMessages() async throws |
setTags(messageId:tags:completion:) | setTags(messageId:tags:) async throws |
flagMessage(withId:) async throws -> Bool | No longer deprecated. Returns Void. |
AmityPost
AmityPost
postDatatype renamed:AmityPost.Data→AmityPost.PostDatapinnedProductId: String?addedeventId: String?addedisInvalidatedremoved- Remaining mutable properties:
postData,analytics,syncState,mentionees,links
AmityPostQueryOptions
AmityPostQueryOptions
untilAt: Date? added.AmityPostRepository
AmityPostRepository
createXxxPost(...) and editPost(...) methods gain:productTags: [AmityTextProductTag]?attachmentProductTags: AmityAttachmentProductTags?(where applicable)
| Change | Details |
|---|---|
flagPost(withId:) deprecated variant removed | Use flagPost(withId:reason:) async throws |
createRoomPost(...) added | Dedicated method for room/co-host posts using AmityRoomPostBuilder |
pinProduct(postId:productId:) async throws -> AmityPost added | Pin a product to a post |
unpinProduct(postId:) async throws -> AmityPost added | Remove the pinned product from a post |
updateProductTags(postId:productTags:) async throws -> AmityPost added | Update media product tags on a post |
AmityRoom
AmityRoom
thumbnail: AmityImageData?addedliveThumbnailUrl: String?addedliveResolution: AmityRoomResolution?addedrecordedResolution: AmityRoomResolution?addedisInvalidatedremovedchannelandpostare now externally read-only (public private(set) var)
AmityRoomParticipant
AmityRoomParticipant
canManageProductTags: Bool added.AmityRoomPresenceRepository
AmityRoomPresenceRepository
init(roomId: String) — no client parameter.AmityRoomRepository
AmityRoomRepository
updateCohostPermissions(roomId:cohostId:canManageProductTags:) async throws -> AmityRoomAmityStreamRepository
AmityStreamRepository
disposeStream(withId:completion:) → disposeStream(withId:) async throws -> AmityStreamAmitySubChannelQueryOptions
AmitySubChannelQueryOptions
init(channelId:isDeleted:excludeDefaultSubChannel:) — both new parameters default to false.AmityUser
AmityUser
isBannedremoved- Added:
internalId: String,permissions: [String],path: String,blockedAt: Date?,avatar: AmityImageData?
AmityUserNotificationsManager
AmityUserNotificationsManager
enable(for modules:)returnsVoiddisableAllNotifications()returnsVoid
AmityUserRelationship
AmityUserRelationship
follow(withUserId:),unfollow(withUserId:),acceptMyFollower(withUserId:),declineMyFollower(withUserId:)— return type changed from(Bool, AmityFollowResponse)toAmityFollowResponseblockUser(userId:)andunblockUser(userId:)are now@MainActor
AmityVideoStoryCreateOptions
AmityVideoStoryCreateOptions
tartgetId → targetId. Update all call sites.