iOS SDK v6.0.0 Migration Guide
This guide is to provide information about breaking changes and how to migrate to the AmitySDK iOS 6.0.0 version.
AmitySDK 6.x.x version requires
RealmSwift.xcframework
along with existing frameworks.
- Channel Creation
Support for Providing custom ID when creating channel is now removed.
- Sub Channels:
Now you can create multiple sub-channels inside a channel. Each Sub Channels acts as a separate container for message. The channel itself would act as a default Sub Channel. You can access this default sub channel id through
defaultSubChannelId
property in class AmityChannel
.Sending a message in a Channel or Sub Channel now requires
subchannelId
. If you want to send message in default subchannel (i.e the default channel itself), please use defaultSubChannelId
property from AmityChannel
.For sending message in particular AmitySubchannel, you can get its id from
subChannelId
property.@objc
support for all interfaces such as classes, enums, methods, properties are removed. Please create a swift wrapper class to interact with the SDK if your project still uses Objective-C.
- All Enums with rawType
UInt
has been changed toInt
- Swift classes
AmityCollection
Property | Methods | Changes |
---|---|
count() → UInt | count() → Int |
object(atIndex: UInt) | object(at: Int) |
Property | Methods | Changes |
---|---|
createdAtDate | createdAt |
Property | Methods | Changes | Remarks |
---|---|---|
clientErrorDelegate | Removed | Use delegate instead |
connectionStatus | Removed | Use sessionState instead |
AmityRegionalEndpoint | Removed | Use AmityRegion instead |
init(apiKey:, httpUrl:, socketUrl:_) | Removed | Use init(apiKey:_, region: _) instead |
init(apiKey:, url:) | Removed | Use init(apiKey_, endpoint:_) |
login(userId: , displayName: ,authToken: , completion : ) | Removed | Use login(userId: ,displayName: ,authToken: ,sessionHandler: ) async instead |
Property | Methods | Changes | Remarks |
---|---|---|
chat | Removed | Use message instead |
Property | Methods | Changes | Remarks |
---|---|---|
totalUnreadCount: UInt | Removed | New property totalDefaultSubChannelUnreadCount: Int is introduced which provides unread count for default subchannel. |
AmityChannelBuilderProtocol | Renamed | Use AmityChannelBuilder instead. |
class AmityChannelQueryType | enum AmityChannelQueryType | Class is changed to Enum |
Property | Methods | Changes | Remarks |
---|---|---|
unreadCount | Renamed → defaultSubChannelUnreadCount | |
hasMention | Renamed → defaultSubChannelHasUnreadMention | |
Property | Methods | Changes | Remarks |
---|---|---|
startReading() | Removed | Use startReading(subChannelId:) instead |
stopReading | Removed | Use stopReading(subChannelId:) instead |
Property | Methods | Changes | Remarks |
---|---|---|
isMessageEdited | Removed | Use isEdited instead |
AmityMessageReactor | Removed | Use AmityReactionRepository instead |
createdAtDate | Renamed → createdAt | |
editedAtDate | Renamed → editedAt | |
flagCount: UInt | flagCount: Int | |
reactionsCount: UInt | reactionCount: UInt | |
readByCount: UInt | readByCount: Int | |
childrenNumber: UInt | childrenNumber: Int | |
channelSegment: UInt | channelSegment: Int | |
Property | Methods | Changes | Remarks |
---|---|---|
createCustomMessage(withChannelId:_,...) → String | Removed | Use createCustomMessage(options: , completion: ) instead |
createTextMessage(withChannelId:_,...) → String | Removed | Use createTextMessage(options:, completion:_) instead |
createTextMessage(withChannelId: , …, mentionees: , ..) | Removed | Use createTextMessage(options:, completion:_) instead |
createAudioMessage(withChannelId:_,…) → String | Removed | Use createAudioMessage(options:, completion:_) instead |
createImageMessage(withChannelId:_,…) → String | Removed | Use createImageMessage(options:, completion:_) instead |
createFileMessage(withChannelId:_,…) → String | Removed | Use createFileMessage(options:, completion:_) instead |
createVideoMessage(withChannelId:_,…) → String | Removed | Use createVideoMessage(options:, completion:_) instead |
Property | Methods | Changes | Remarks |
---|---|---|
edittext(_ text: String, completion:....) | Removed | Use edittext(_ text: String, metaData, mentionees, completion:....) instead |
edittext(_ text: String, metaData, mentionees, completion:....) | Changed | Parameter metaData and metionees are now nil by default. |
Property | Methods | Changes | Remarks |
---|---|---|
childrenPosts: [AmityPost]? | childrenPosts: [AmityPost] | property is Non-optional |
getVideoInfo(for quality: AmityVideoDataQuality) | Removed | Use getVideoInfo() → AmityVideoData? |
getVideosInfo() | Removed | Use getVideoInfo() → AmityVideoData? |
availableVideoQuality() | Removed | Use availableResolution() → [AmityVideoResolution] instead |
commentsCount: UInt | commentsCount: Int | |
flagCount: UInt | flagCount: Int | |
reactionsCount: UInt | reactionsCount: Int | |
sharedCount: UInt | sharedCount: Int | |
Property | Methods | Changes | Remarks |
---|---|---|
AmityPollCreateBuilder | Renamed | Use AmityPollCreateOptions |
createPoll(_ builder: AmityPollBuilder,:_) | Renamed | Use createPoll(_ options: AmityPollCreateOptions) |
Property | Methods | Changes |
---|---|
voteCount: UInt | voteCount: Int |
closedIn: UInt | closedIn: Int |
Property | Methods | Changes |
---|---|
voteCount: UInt | voteCount: Int |
Property | Methods | Changes | Remarks |
---|---|---|
getPostForPostId(_:) | Renamed | getPost(withId:_) |
approvePost(withPostId: ,: ) | Renamed | approvePost(withId: ,: ) |
declinePost(withPostId: ,: ) | Renamed | declinePost(withId: ,: ) |
deletePost(withPostId: ,: ) | Renamed | deletePost(withId: ,: ) |
updatePost(withPostId: ,: ) | Renamed | updatePost(withId: ,: ) |
Property | Methods | Changes | Remarks |
---|---|---|
createPost | Removed | Use equivalent method from AmityPostRepository |
updatePost | Removed | Use equivalent method from AmityPostRepository |
deletePost | Removed | Use equivalent method from AmityPostRepository |
approvePost | Removed | Use equivalent method from AmityPostRepository |
declinePost | Removed | Use equivalent method from AmityPostRepository |
getReactions | Removed | Use equivalent method from AmityPostRepository |
getPostForPostId | Removed | Use equivalent method from AmityPostRepository |
Property | Methods | Changes | Remarks |
---|---|---|
addRole | Removed | Use addRoles instead |
removeRole | Removed | Use removeRoles instead |
AmityCommunityCreateDataBuilder | Removed | AmityCommunityCreateOptions |
AmityCommunityUpdateDataBuilder | Removed | AmityCommunityCreateOptions |
createCommunity(with builder: AmityCommunityBuilder,:_) | Removed | createCommunity(with options: AmityCommunityCreateOptions) |
updateCommunity(withId: , builder: AmityCommunityBuilder,: ) | Removed | updateCommunity(withId: , options: AmityCommunityUpdateOptions, : ) |
getCommunities(displayName:,:_) | Removed | Use getCommunities(with options: AmityCommunityQueryOptions) |
Property | Methods | Changes |
---|---|
postsCount: UInt | postsCount: Int |
membersCount: UInt | membersCount: Int |
Property | Methods | Changes | Remarks |
---|---|---|
getCommentWithReferenceId(_:) | Removed | Use new method getCommments(options: AmityCommentQueryOptions) |
createComment(forReferenceId:_,: _) | Removed | Use new method createComment(with options: AmityCommentCreateOptions) |
Property | Methods | Changes | Remarks |
---|---|---|
flagCount: UInt | flagCount: Int | |
childrenNumber: UInt | childrenNumber: Int | |
reactionsCount: UInt | reactionsCount: Int | |
Property | Methods | Changes |
---|---|
flagCount: UInt | flagCount: Int |
isGlobalBan | Renamed → isGlobalBanned |
Property | Methods | Changes | Remarks |
---|---|---|
getMyFollowInfo(: ,completion: ) | Removed | Use getMyFollowInfo(_:) → AmityObject which returns Live Object |
getUserFollowInfo(: ,completion: ) | Removed | Use userFollowInfo(_:) → AmityObject which returns Live Object |
Last modified 6mo ago