Skip to content

Live SDK 3.0.0

Choose a tag to compare

@mb-kyle-k mb-kyle-k released this 07 Aug 10:42
· 13 commits to main since this release
a1a168a

Shoplive iOS SDK 3.0.0

No SDK sources — XCFramework artifacts only.

What's changed

First release of the unified Shoplive iOS SDK. Playback and broadcasting are published as two
Swift Package Manager products, and the shared binaries they need resolve alongside them.

Breaking

  • New public API. The 2.x surface is no longer public — ShopLivePlayer,
    ShopLivePlayerView, ShopLivePlayerDelegate, ShopLivePlayerData, ShopLivePreviewData,
    ShopLiveInAppPipConfiguration and the rest are now internal. The player exposes 23 public
    types and the streamer 4.
  • Playback is driven by a view controller or a view instead of a window facade. Present
    ShoplivePlayerViewController, or embed ShoplivePlayerView, configured with a single
    ShoplivePlayerConfiguration value in place of the 2.x static setters.
  • Two delegate methods replace fourteen. ShoplivePlayerDelegate is
    player(_:didReceive:) for notifications and player(_:didRequest:) for requests your app
    must respond to.
  • Single entry point. Shoplive.initialize / setUser / setStreamToken / logout / sendConversionEvent / sdkVersion replaces the per-module setters. The public API is
    Swift-only — the @objc entry points are gone, so Objective-C call sites need a Swift bridge.
  • Two products only. Declare ShoplivePlayerSDK and/or ShopliveStreamerSDK.
    ShopliveCore, ShopLiveWebRTCHelperSDK and WebRTC ship as part of them and must not be
    added yourself; ShopliveCore is re-exported, so one import is enough.
  • Minimum iOS is now 15.0 (2.x supported 11.0).
  • Players can no longer be created without configuration. ShoplivePlayerView() and the
    configuration-less controller initialiser no longer compile, and
    ShoplivePlayerViewController requires a campaignKey.
  • Errors are delivered as ShopliveError with a ShopliveErrorCode, rather than a bare
    Error.
  • Streamer AppearanceOptions is removed.

Added

  • RTMP broadcasting. The streamer publishes over RTMP as well as WebRTC, so campaigns on
    RTMP-only ingest endpoints can go live.
  • ShoplivePlayerViewController can be subclassed. The class is open, and its designated
    initialiser, lifecycle callbacks (viewDidLoad, viewDidAppear), close() and the
    ShoplivePlayerControlling members are open too, so a subclass can chain
    super.init(campaignKey:options:configuration:) and hook into the playback flow. Overrides
    must call super. ShopliveStreamerViewController is public final — customise the streamer
    through its delegate instead of subclassing.
  • Live playback failures are now reported instead of staying silent. 9101
    NoPlayableStreamUrl when no playable stream URL is available, 9102 LiveNotBroadcasting
    when a live campaign has nothing being published (reported once per session), and 9100
    NoVideoForPip when a fullscreen-to-in-App-PIP transition has no video. All three are
    recoverable.
  • Camera and microphone permissions are requested explicitly when the broadcast screen
    opens. Previously only the permission iOS happened to prompt for was registered, so a denied
    microphone never appeared in Settings and could not be enabled afterwards.

Changed

  • The ingest protocol comes from the campaign configuration (ingest.preferredProtocol)
    instead of being inferred from the viewing protocol list. Campaigns that resolve to RTMP use
    the endpoint and stream key already carried in the configuration and skip the extra
    /stream/ready request.

Fixed

  • mixWithOthers had no effect in either direction — WebRTC playback never mixed with other
    apps' audio when enabled, and playback could keep mixing when disabled. Preview playback
    ignored the setting entirely.
  • A black screen appeared when the streamer stopped publishing mid-broadcast, or when the
    broadcast ended, instead of the background and end images configured in the admin.
  • Swiping down on the player did not enter in-App PIP.
  • Relaunching a campaign from in-App PIP opened a second player over the first and left the
    previous PIP window behind. Starting a different campaign from PIP now returns to fullscreen
    without flicker, reloading with PIP kept no longer flashes the overlay, and OS PIP works
    again after such a reload.
  • Broadcasting was silent, with a dead level meter, when the microphone was granted after the
    broadcast screen had already opened.
  • The RTMP broadcast screen could not be dismissed when it had been presented modally.

Notes

  • XCFramework artifacts only — no SDK sources are published.

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/shoplive/shoplive-sdk-ios", from: "3.0.0")
],
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)

Requirements

Minimum iOS 15.0
Xcode 15.0+ (swift-tools-version 5.9)
Distribution Swift Package Manager (binary targets)

Artifacts

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

Build provenance

  • Source: matrix-sdk-ios@c7fbeb69bffa24ba0b10555f4d388c8aa2be6357
  • Line: international
  • Tag: 3.0.0