Skip to content

Live SDK 3.0.5

Choose a tag to compare

@jerry-hansol jerry-hansol released this 06 Nov 11:32

Shoplive iOS SDK 3.0.5

No SDK sources — XCFramework artifacts only.

What's changed

A player update: a SwiftUI player, a campaign list API, and overlay refresh on user changes.

Added

  • ShoplivePlayer is a SwiftUI player: build the view with makeView(onEvent:onRequest:) and send commands through controller.
  • ShoplivePlayerAPI.getCampaigns returns the campaign list (ShopliveCampaignListRequest in, ShopliveCampaignListResponse out), as a completion handler or async.

Changed

  • Shoplive.setUser with .token clears a previously set .profile, and the reverse, instead of keeping both.
  • Shoplive.setUser and Shoplive.logout() now reload only the overlay of showing players, keeping playback and window state; no reload() needed.
  • Setting configuration on a playing ShoplivePlayerView now applies overlay.ui, sound.muteOnStart and appearance.resizeMode immediately, instead of only navigation.shareScheme.
  • exitPictureInPicture() on an embedded view keeps the in-app Picture in Picture window when the original spot is not visible, instead of restoring.
  • Expanding a preview in-app Picture in Picture window of a ShoplivePlayerViewController loads the live stream with the overlay, instead of continuing the preview stream.
  • The in-app Picture in Picture window moves up above the on-screen keyboard.

Error codes

When Before (3.0.4) Now (3.0.5) What to do
getCampaigns: no access key set — .notInitializedAccessKey (9000), not recoverable Initialize first
getCampaigns: network failure — .failedNetwork (9900), recoverable Retry
getCampaigns: bad or expired key — .customAccountNotFound (-200) or .customAccountExpired (-201), not recoverable Check the access key
getCampaigns: other server or HTTP failure — .unknown (number kept in rawCode), not recoverable Handle it

Fixed

  • Several embedded players on one screen no longer overwrite each other's playback settings, audio or mute state.

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/shoplive/shoplive-sdk-ios", from: "3.0.5")
],
targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "ShoplivePlayerSDK", package: "shoplive-sdk-ios"),
            .product(name: "ShopliveStreamerSDK", package: "shoplive-sdk-ios")
        ]
    )
]
import ShoplivePlayerSDK

Shoplive.initialize(.init(accessKey: "{ACCESS_KEY}"))
Shoplive.setUser(.guest)

CocoaPods

Declare both sources. Naming any source disables the implicit default CDN, and dropping the official CDN line breaks every other pod in your Podfile.

source 'https://cdn.cocoapods.org/'
source 'https://github.com/shoplive/pod-specs.git'

platform :ios, '15.0'
use_frameworks!

target 'YourApp' do
  pod 'ShoplivePlayerSDK', '3.0.5'
  pod 'ShopliveStreamerSDK', '3.0.5'
end

Requirements

Minimum iOS 15.0
Xcode 15.0+ (swift-tools-version 5.9)
Distribution Swift Package Manager (binary targets) · CocoaPods (shoplive/pod-specs)

Artifacts

  • ShoplivePlayerSDK.xcframework
  • ShopliveStreamerSDK.xcframework
  • ShopliveCore.xcframework
  • ShopLiveWebRTCHelperSDK.xcframework
  • WebRTC.xcframework

Build provenance

  • Source: matrix-sdk-ios@81e26e67bc27ba44ba67d3b6eabc2137f0723458
  • Line: international
  • Tag: 3.0.5
  • Build: 42210247251.1