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.
Last updated
This guide is to provide information about breaking changes and how to migrate to the AmitySDK iOS 6.0.0 version.
Last updated
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.
Please refer to Using AmitySDK with ObjectiveC section of the documentation for more details.
All Enums with rawType UInt
has been changed to Int
Swift classes
AmityCollection
Property | Methods | Changes |
---|---|
Property | Methods | Changes |
---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes |
---|---|
Property | Methods | Changes |
---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes |
---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes | Remarks |
---|---|---|
Property | Methods | Changes |
---|---|
Property | Methods | Changes | Remarks |
---|---|---|
count() →
UInt
count() → Int
object(atIndex: UInt)
object(at: Int)
createdAtDate
createdAt
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
chat
Removed
Use message
instead
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
unreadCount
Renamed → defaultSubChannelUnreadCount
hasMention
Renamed → defaultSubChannelHasUnreadMention
startReading()
Removed
Use startReading(subChannelId:)
instead
stopReading
Removed
Use stopReading(subChannelId:)
instead
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
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
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.
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
AmityPollCreateBuilder
Renamed
Use AmityPollCreateOptions
createPoll(_ builder: AmityPollBuilder,:_)
Renamed
Use createPoll(_ options: AmityPollCreateOptions)
voteCount: UInt
voteCount: Int
closedIn: UInt
closedIn: Int
voteCount: UInt
voteCount: Int
getPostForPostId(_:)
Renamed
getPost(withId:_)
approvePost(withPostId:
,:
)
Renamed
approvePost(withId:
,:
)
declinePost(withPostId:
,:
)
Renamed
declinePost(withId:
,:
)
deletePost(withPostId:
,:
)
Renamed
deletePost(withId:
,:
)
updatePost(withPostId:
,:
)
Renamed
updatePost(withId:
,:
)
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
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)
postsCount: UInt
postsCount: Int
membersCount: UInt
membersCount: Int
getCommentWithReferenceId(_:)
Removed
Use new method getCommments(options: AmityCommentQueryOptions)
createComment(forReferenceId:_,: _)
Removed
Use new method createComment(with options: AmityCommentCreateOptions)
flagCount: UInt
flagCount: Int
childrenNumber: UInt
childrenNumber: Int
reactionsCount: UInt
reactionsCount: Int
flagCount: UInt
flagCount: Int
isGlobalBan
Renamed → isGlobalBanned
getMyFollowInfo(:
,completion:
)
Removed
Use getMyFollowInfo(_:) → AmityObject
which returns Live Object
getUserFollowInfo(:
,completion:
)
Removed
Use userFollowInfo(_:) → AmityObject
which returns Live Object