Repository navigation
Shoplive iOS SDK 3.0.2
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.
ShoplivePlayerEventhas a new case,.webCommand(name:payload:), delivered throughShoplivePlayerDelegate.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, callsend(command:payload:)orreload()on the player.If you switch over
ShoplivePlayerEventexhaustively, 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.allowedWebViewDomainsstill load, but can no longer call the SDK's native functions. No code change is needed. shoplive.showis always allowed. You do not need to add it toallowedWebViewDomains; 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 onShopliveBroadcastState.ended, expect the session to resume. - The streamer screen keeps the device awake. While
ShopliveStreamerViewControlleris shown, the screen does not lock. When it closes, your app's previousUIApplication.shared.isIdleTimerDisabledvalue 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. Callingstop()now reportsShoplivePlayerState.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.xcframeworkShopliveStreamerSDK.xcframeworkShopliveCore.xcframeworkShopLiveWebRTCHelperSDK.xcframeworkWebRTC.xcframework
Build provenance
- Source:
matrix-sdk-ios@4ab3bb6b884778bc35b130a4747768d8a260b40e - Line:
international - Tag:
3.0.2