Skip to content

Releases: shoplive/shoplive-sdk-ios

Shoplive iOS SDK 3.0.3

Choose a tag to compare

@jerry-hansol jerry-hansol released this 16 Oct 09:28

Shoplive iOS SDK 3.0.3

No SDK sources — XCFramework artifacts only.

What's changed

A feature and fix release for the player and the streamer: preview playback, an in-app Picture in Picture option, and an optional web page on the streamer screen.

Added

  • ShoplivePlayerConfiguration.type takes ShoplivePlayerType (.live or .preview). .preview plays the lower-resolution preview stream when the campaign has one, and ShoplivePlayerConfiguration.preview now uses it.
  • pip.isDragOutToCloseEnabled (default true) controls whether dragging the in-app Picture in Picture window off the screen closes it. Set false to make it snap back, so only the close button or close() ends it.
  • ShopliveStreamerViewController(campaignKey:webPageURL:) adds your own web page next to the streamer screen. Swipe left to open it. The existing init(campaignKey:) still works and shows no web page.
  • ShopliveError.rawCode returns the original numeric error code, including when code is .unknown.
  • ShopliveCouponResult and ShopliveCustomActionResult now default status to .hide and alertType to .alert.

Changed

  • Playback that starts muted no longer interrupts audio from other apps; unmuting switches to normal playback audio.

Fixed

  • reload() while in-app Picture in Picture is active keeps the Picture in Picture window instead of leaving sound with no player.
  • A ShoplivePlayerViewController that could not be presented no longer plays sound with nothing on screen. It starts when it appears, or stops if .pip could not start.

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/shoplive/shoplive-sdk-ios", from: "3.0.3")
],
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@d1486487371386c2e0636a5d1c55e29c78e6ec58
  • Line: international
  • Tag: 3.0.3

Shoplive iOS SDK 3.0.2

Choose a tag to compare

@jerry-hansol jerry-hansol released this 01 Oct 07:56

Shoplive iOS SDK 3.0.2

No SDK sources — XCFramework artifacts only.

What's changed

A security and reliability release for the player and the streamer.

Added

  • Receive commands from the web overlay. ShoplivePlayerEvent has a new case, .webCommand(name:payload:), delivered through ShoplivePlayerDelegate.player(_:didReceive:). It carries commands the web overlay sends for your app to handle. It is a one-way notification with no reply; if you need to respond, call send(command:payload:) or reload() on the player.

    If you switch over ShoplivePlayerEvent exhaustively, add a case for it:

    func player(_ player: ShoplivePlayerControlling, didReceive event: ShoplivePlayerEvent) {
        switch event {
        case .webCommand(let name, let payload):
            // handle the command
        default:
            break
        }
    }
    

Changed

  • Only Shoplive pages can use SDK features in the web view. Pages from domains you list in ShopliveConfiguration.allowedWebViewDomains still load, but can no longer call the SDK's native functions. No code change is needed.
  • shoplive.show is always allowed. You do not need to add it to allowedWebViewDomains; it keeps loading even when you restrict the list.
  • Malformed access keys are rejected. If the key passed to ShopliveConfiguration(accessKey:) is not in the format Shoplive issues, it is not used and an error is written to the log. Use the key exactly as issued, with no extra spaces or characters. Valid keys issued by Shoplive are unaffected.
  • An ended broadcast can start again from the same screen. ShopliveStreamerDelegate.streamer(_:didReceive:) can now report .stateChanged(.connecting) after .stateChanged(.ended) when the broadcaster restarts. If your app closes the screen or treats the session as finished on ShopliveBroadcastState.ended, expect the session to resume.
  • The streamer screen keeps the device awake. While ShopliveStreamerViewController is shown, the screen does not lock. When it closes, your app's previous UIApplication.shared.isIdleTimerDisabled value is restored, so you no longer need to manage it yourself.

Fixed

  • ShoplivePlayerEvent.stateChanged(_:) fires only when the state actually changes, with no repeated notifications for the same state. Calling stop() now reports ShoplivePlayerState.closed.
  • Closing the system Picture in Picture window no longer leaves an empty black screen behind.
  • Streamer: a lost connection shows one dialog instead of two, and a broadcast opened while offline starts once the connection returns.

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.2")
],
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@4ab3bb6b884778bc35b130a4747768d8a260b40e
  • Line: international
  • Tag: 3.0.2

Shoplive iOS SDK 1.9.0

Choose a tag to compare

@Tabber-shoplive Tabber-shoplive released this 14 Sep 07:24
979b5fb

Shoplive iOS SDK 1.9.0

No SDK sources — XCFramework artifacts only.

What's changed

Changed

  • Minimum iOS is now 15.0, up from 11.0. Xcode 27 raises the floor for the apps it builds, so move the SDK to 1.9.0 when you move your toolchain. Xcode 26 already reported iOS 11 as outside its supported range (12.0 and later), so this also clears a warning you may be seeing today.
  • Player and Common now ship from a single repository. They were published from ios-sdk and common-ios; both are frozen at 1.8.15 and 1.9.0 onward resolves from shoplive-sdk-ios. Add one package instead of two.
  • The player's Swift Package Manager product is now ShopLiveSDK, renamed from ShopLive. It now matches the module you import, so the product picker and import line read the same. The CocoaPods pod is still named ShopLive — Podfiles only need the version bumped.
  • No API changes. If you are on 1.8.11 or later, changing the version is the whole migration.

Fixed

  • Custom action SHOW / KEEP responses are no longer discarded. Returning SHOW or KEEP from your callback kept the popup on screen in name only — it closed anyway. The SDK emitted COMPLETE_CUSTOM_ACTION right after CUSTOM_ACTION_RESULT, and the web handler for that event removes the popup without reading the result, so the later event overwrote the earlier one. COMPLETE_CUSTOM_ACTION belonged to the first-generation handleCustomAction API and had been attached to the second-generation result: path since the 1.7.3 cleanup. Behaviour now matches Android, where the two events are bound to separate callbacks.

Swift Package Manager

Anchor the version rule to 1.9.0. This repository also publishes the 3.x unified SDK. Up to Next Major Version from 1.9.0 keeps resolution inside the 1.x range.

dependencies: [
    .package(url: "https://github.com/shoplive/shoplive-sdk-ios", .upToNextMajor(from: "1.9.0"))
],
targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "ShopLiveSDK",       package: "shoplive-sdk-ios"),
            .product(name: "ShopliveSDKCommon", package: "shoplive-sdk-ios")
        ]
    )
]
import ShopLiveSDK
import ShopliveSDKCommon

ShopLiveCommon.setAccessKey(accessKey: "{ACCESS_KEY}")
ShopLive.configure(with: "{ACCESS_KEY}")
ShopLive.play(with: "{CAMPAIGN_KEY}")

Migrating from an existing SPM setup: remove ios-sdk and common-ios, add this repository, then File → Packages → Reset Package Caches and resolve again.

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 'ShopLive',          '1.9.0'
  pod 'ShopliveSDKCommon', '1.9.0'
end

Requirements

Minimum iOS 15.0
Xcode 15.0+ (swift-tools-version 5.9)
CocoaPods 1.9+ (XCFramework support)

Notes

  • Set your app target's deployment target to 15.0 or later. CocoaPods refuses to install below that, but SPM only emits a linker warning and the build succeeds — shipping that way fails to load the frameworks on iOS 14 and earlier.
  • Shortform and the Shortform Editor are not part of this release. Keep ShopliveShortformSDK and ShopLiveShortformEditorSDK at 1.8.13 from their own repositories, and do not bump their versions in your Podfile.
  • Coming from below 1.8.11 requires source changes. Check the migration guide for your current version first.

Artifacts

File Used by
ShopLiveSDK.xcframework.zip SPM · CocoaPods
ShopliveSDKCommon.xcframework.zip SPM
ShopliveAPI.xcframework.zip SPM (ships inside the ShopliveSDKCommon product)
ShopliveSDKCommon-pod.zip CocoaPods (Common + API in one archive)

Build provenance

Source shoplive/matrix-sdk-ios dev · tag 1.9.0 (ba9010579)
Line domestic
Xcode 26.0.1

Shoplive iOS SDK 3.0.1

Choose a tag to compare

@jerry-hansol jerry-hansol released this 26 Aug 09:25

Shoplive iOS SDK 3.0.1

No SDK sources — XCFramework artifacts only.

What's changed

Added

  • Previews can start as a floating in-app Picture in Picture. Set
    ShoplivePlayOptions.presentationStyle to .pip and playback opens directly in the SDK's
    draggable floating window instead of taking over the screen. The ShoplivePlayOptions.preview
    and ShoplivePlayerConfiguration.preview presets pair the two halves — floating start, muted
    audio, built-in overlays hidden — and replace the 2.x preview popup. .fullScreen remains the
    default, so playback you already ship is unchanged. Where in-app PIP is unavailable the request
    is ignored and playback continues on the current surface.
  • Swipe an in-app PIP window off screen to close it. Dragging the floating window past the
    screen edge fades it out and ends the session; releasing it inside snaps it back to the nearest
    position. On by default.
  • Live badges on in-app PIP. A badge image and text box configured for the campaign are drawn
    over the floating window, scaled from the campaign's own values so the artwork keeps its aspect
    ratio. Campaigns that configure no badge draw nothing.
  • Private broadcasts. Campaigns protected by an entrance code play on both HLS and WebRTC.
    The stream is withheld until the viewer is authenticated and starts in place once it is, with
    no restart — and no playback error is reported while the viewer is still entering the code.

Fixed

  • Fixed a crash on the player's WebSocket connection when it was torn down while a message was
    being delivered.

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/shoplive/shoplive-sdk-ios", from: "3.0.1")
],
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@f70e1e6ea8732993b6d471134ab5bdbf8ebf0c93
  • Line: international
  • Tag: 3.0.1

Shoplive iOS SDK 3.0.0

Choose a tag to compare

@mb-kyle-k mb-kyle-k released this 07 Aug 10:42
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