Skip to main content
Xcode 26 compatibility is fully restored in v8. The cache layer has been migrated from Realm to Core Data, eliminating all Realm dependencies and removing the need for per-Xcode-version SDK variants.

What Changed in v8

SDK v8 is a major release focused on three goals:
  1. Remove Realm — the cache layer is now powered by Core Data, restoring Xcode forward compatibility and removing a heavyweight dependency from your project.
  2. Modernise the API surface — constructors, async methods, and model objects follow consistent, Swift-idiomatic patterns.
  3. 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.
MethodSteps
Swift Package ManagerNo 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.
Minimum iOS target: 14.0

UIKit

MethodSteps
Swift Package ManagerNo 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 SourceRealm.xcframework and RealmSwift.xcframework are no longer installed through the SharedFrameworks Package.swift file.
Minimum iOS target: 14.0

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 an AmityClient parameter. The SDK manages the client internally.
// v7
let repo = AmityMessageRepository(client: client)
let mod  = AmityCommunityModeration(client: client, andCommunity: communityId)

// v8
let repo = AmityMessageRepository()
let mod  = AmityCommunityModeration(communityId: communityId)

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.
// v7
let success = try await repo.softDeleteMessage(withId: id) // Bool

// v8
try await repo.softDeleteMessage(withId: id) // Void — throws on failure

3. Completion handlers replaced with async/await

// v7
manager.enable(completion: { error in ... })
let _ = manager.getSettings(completion: { settings in ... })

// v8
try await manager.enable()
let settings = try await manager.getSettings()

4. Model objects are immutable value snapshots

  • model and client properties removed from all model classes.
  • All properties changed from var to let. Exceptions are noted per class.
  • Timestamp properties (createdAt, updatedAt, editedAt, etc.) changed from Date to Date?.

5. AmityCollection observe callback signature changed

AmityCollectionChange has been removed. The callback no longer delivers per-change index information.
// v7
collection.observe { collection, change, error in ... }

// v8
collection.observe { collection, error in ... }

Renamed Classes

v7v8
AmityChannelQueryAmityChannelQueryOptions
AmityChannelUpdateBuilderAmityChannelUpdateOptions
AmityCommunityChannelBuilderAmityCommunityChannelCreateOptions
AmityConversationChannelBuilderAmityConversationChannelCreateOptions
AmityDefaultChannelBuilderAmityDefaultChannelCreateOptions
AmityLiveChannelBuilderAmityLiveChannelCreateOptions
AmityRawFileAmityFile
AmityUserUpdateBuilderAmityUserUpdateOptions

New Classes

ClassDescription
AmityFileReplaces AmityRawFile. Adds fileUrl, altText, feedType, status, videoUrl, attributes.
AmityMetadataMapperReplaces the deprecated AmityMentionMapper. Supports both mentions and hashtags.
AmityTextProductTagA product tag embedded in post text: productId, product, index, length.
AmityMediaProductTagA product tag attached to a media item: productId, product.
AmityAttachmentProductTagsContainer for per-attachment product tags when creating or editing posts.
AmityProductNew product model: productId, productName, productUrl, status, price, currency, thumbnailUrl, etc.
AmityProductCatalogueSettingProduct catalogue setting from the server: enabled: Bool.
AmityRoomResolutionStream resolution info for a room: aspectRatio, width, height.

Removed APIs

ClassRemovedReplacement
AmityCollectioncount()snapshots.count
AmityCollectionobject(at:)snapshots[index]
AmityCollectionallObjects()snapshots
AmityChannelgetPreviewMembers()previewMembers property
AmityCollectionChangeEntire class
AmityAdImageEntire class
AmityUserRepositoryuserRelationship propertyInstantiate AmityUserRelationship() directly

Per-Class Changes

Only changes beyond the global breaking changes are listed here.
ChangeDetails
currentMembership renamedcurrentMember: AmityChannelMember?
previewMembers added[AmityChannelMember] — replaces the removed getPreviewMembers() method
attachedToPost, attachedToStream removedNo replacement
attachedToRoomNow externally read-only (public private(set) var)
Init signature changed: init(channelId: String) — no client parameter.
Init signature changed: init(channelId: String) — no client parameter.
  • Init signature changed: init(channelId: String)
  • getSettings() return type is now AmityChannelNotificationSettings
All options must now be provided at initialisation rather than mutated after the fact.
// v7 — mutate after init
let query = AmityChannelQuery()
query.types = [...]

// v8 — configure at init
let options = AmityChannelQueryOptions(
    types: [...],
    filter: .all,
    includingTags: [],
    excludingTags: [],
    includeDeleted: false
)
MethodChange
getChannels(with:)Parameter type: AmityChannelQueryAmityChannelQueryOptions
createChannel(with:)Parameter type: AmityChannelBuilderAmityChannelCreateOptions
editChannel(with:)Parameter type: AmityChannelUpdateBuilderAmityChannelUpdateOptions
editUser(_:) parameter type changed: AmityUserUpdateBuilderAmityUserUpdateOptions
  • links: [AmityLink] added
  • isInvalidated removed
links: [AmityLink]? added.
pageSize: Int = 20 added.
links: [AmityLink]? added.
  • user: AmityUser? added (the community creator/owner)
  • event property removed
  • Init signature changed: init(communityId: String)
  • getMembers(...) and searchMembers(...) gain excludingRoles: [String] = []
Init signature changed: init(communityId: String) — no client parameter.
Init signature changed: init(communityId: String)
v7v8
enable(for events:completion:)enable(events:) async throws
disable(completion:)disable() async throws
getSettingsWithCompletion(_:)getSettings() async throws -> AmityCommunityNotificationSettings
v7v8
deleteCommunity(withId:completion:)deleteCommunity(withId:) async throws
joinCommunity(withId:) async throws -> BoolNo longer deprecated. Returns Void.
leaveCommunity(withId:) async throws -> BoolReturns Void.
v7v8Notes
getMyFeedSorted(feedSources:dataTypes:by sortBy:...)getMyFeed(feedSources:dataTypes:sortBy:...)Renamed; by sortBy: label removed
getUserFeed(...)getUserFeed(...)Added untilAt: Date?
getCommunityFeed(...)getCommunityFeed(...)Added untilAt: Date?
getFile(fileId:) return type changed: AmityRawFileAmityFile
Typo fixed: tartgetIdtargetId. Update all call sites.
setVideoStreamId(_:) is deprecated. Use setRoomId(_:) instead.
Still available but deprecated. Migrate to AmityMetadataMapper.
DeprecatedReplacement
AmityMentionMapper.mentions(fromMetadata:)AmityMetadataMapper.mentions(fromMetadata:)
AmityMentionMapper.metadata(from:)AmityMetadataMapper.metadata(mentions:hashtags:)
AmityMetadataMapper also adds hashtags(fromMetadata:) -> [AmityHashtag].
v7v8
deleteFailedMessages(completion:)deleteFailedMessages() async throws
setTags(messageId:tags:completion:)setTags(messageId:tags:) async throws
flagMessage(withId:) async throws -> BoolNo longer deprecated. Returns Void.
  • postData type renamed: AmityPost.DataAmityPost.PostData
  • pinnedProductId: String? added
  • eventId: String? added
  • isInvalidated removed
  • Remaining mutable properties: postData, analytics, syncState, mentionees, links
untilAt: Date? added.
All createXxxPost(...) and editPost(...) methods gain:
  • productTags: [AmityTextProductTag]?
  • attachmentProductTags: AmityAttachmentProductTags? (where applicable)
Additional changes:
ChangeDetails
flagPost(withId:) deprecated variant removedUse flagPost(withId:reason:) async throws
createRoomPost(...) addedDedicated method for room/co-host posts using AmityRoomPostBuilder
pinProduct(postId:productId:) async throws -> AmityPost addedPin a product to a post
unpinProduct(postId:) async throws -> AmityPost addedRemove the pinned product from a post
updateProductTags(postId:productTags:) async throws -> AmityPost addedUpdate media product tags on a post
  • thumbnail: AmityImageData? added
  • liveThumbnailUrl: String? added
  • liveResolution: AmityRoomResolution? added
  • recordedResolution: AmityRoomResolution? added
  • isInvalidated removed
  • channel and post are now externally read-only (public private(set) var)
canManageProductTags: Bool added.
Init signature changed: init(roomId: String) — no client parameter.
New method: updateCohostPermissions(roomId:cohostId:canManageProductTags:) async throws -> AmityRoom
disposeStream(withId:completion:)disposeStream(withId:) async throws -> AmityStream
Init gains new parameters: init(channelId:isDeleted:excludeDefaultSubChannel:) — both new parameters default to false.
  • isBanned removed
  • Added: internalId: String, permissions: [String], path: String, blockedAt: Date?, avatar: AmityImageData?
  • enable(for modules:) returns Void
  • disableAllNotifications() returns Void
  • follow(withUserId:), unfollow(withUserId:), acceptMyFollower(withUserId:), declineMyFollower(withUserId:) — return type changed from (Bool, AmityFollowResponse) to AmityFollowResponse
  • blockUser(userId:) and unblockUser(userId:) are now @MainActor
Typo fixed: tartgetIdtargetId. Update all call sites.