ReVue KITSwift reference Guides

Instance Method

deleteFriend(friendId:)

刪除好友。好友不存在時 throws .notFound

@MainActor func deleteFriend(friendId: String) throws

Discussion

刪除前,SDK 先結束和這位好友的通話或邀請,再刪除好友:

邀請已經結束並通知過(例如逾時、對方結束),刪除時不會再收到 didEndInvitation。 邀請剛好已經結束、但結束的通知還沒送到時,取消或拒絕會失敗;這時照樣刪除, 稍後收到的 didEndInvitation 帶的是實際的結束原因(例如 .timeout),一樣只通知一次。

刪除失敗(.failed)時,通話或邀請已經結束,好友仍在好友清單裡。

Throws

FriendDeleteError。.failed(code:) 的 code 固定是 -1,不要拿來判斷原因。