2022-11-16
How to upgrade UIKits with a plugin to V2.0.0?
Products / Plugins:Call Kit / Live Streaming Kit
Platform / Framework:iOS / Android
This article introduces how to update the UIKits with the plugin (ZegoUIKitSignalingPlugin) from V1.x.x to V2.0.0.
Warning
- This article is only for users who use UIKits with plugins. If you are using UIKits without plugins, you can simply update your UIKits to the latest version.
- Apart from the UIKits mentioned in this article, other UIKits don't require you to do anything else to upgrade.
Call Kit (ZegoUIKitPrebuiltCall)
-
Upgrade the SDK to V2.0.0 or later.
-
Modify part of the code.
Change the code used to initialize the SDK.
If your project used
ZegoUIKitPrebuiltCallInvitationConfigclass, then the code used for initialization needs to delete the first parameter.
// Version 1.x.x
let config = ZegoUIKitPrebuiltCallInvitationConfig([ZegoUIKitSignalingPlugin()], notifyWhenAppRunningInBackgroundOrQuit: true, isSandboxEnvironment: false)
// Version 2.0.0
let config = ZegoUIKitPrebuiltCallInvitationConfig(notifyWhenAppRunningInBackgroundOrQuit: true, isSandboxEnvironment: false)Live Streaming Kit (ZegoUIKitPrebuiltLiveStreaming)
-
Upgrade the SDK to V2.0.0 or later.
-
Modify part of the code.
Change the code used to initialize the SDK.
// Version 1.x.x
let config = ZegoUIKitPrebuiltLiveStreamingConfig.host([ZegoUIKitSignalingPlugin()])
let config = ZegoUIKitPrebuiltLiveStreamingConfig.audience([ZegoUIKitSignalingPlugin()])
// Version 2.0.0
let config = ZegoUIKitPrebuiltLiveStreamingConfig.host(enableCoHosting: true)
let config = ZegoUIKitPrebuiltLiveStreamingConfig.audience(enableCoHosting: true)