Skip to content

Integrating SDK with App using Swift Package Manager

Bala Obul Reddy Sangana edited this page Sep 23, 2026 · 1 revision

Availability. Swift Package Manager distribution is available from WebexSDK 3.17.0 onward, alongside the existing CocoaPods distribution. Releases 3.16.2 and earlier are CocoaPods-only. CocoaPods continues to be supported — see Integrating SDK with App.

The SPM package delivers the same .xcframework binaries as CocoaPods, just re-packaged into the shape SwiftPM requires. Whichever product you pick, you always write import WebexSDK in your code.

Requirements

  • Xcode 15 or later (the package manifest uses Swift tools 5.9).
  • iOS 15 or later. The Swift package declares iOS 15 as its minimum platform.
  • An appId entitled to the 3.0+ scopes (see App Registration for Mobile SDK 3.x).

Choosing a product

The package exposes five library products. The first four mirror the CocoaPods sub-specs; the fifth mirrors the separate WebexBroadcastExtensionKit pod. Add only one WebexSDK product to your app target.

SwiftPM product Equivalent CocoaPods Use when you need
WebexSDK pod 'WebexSDK' (subspec Full) The full SDK (meetings + calling + messaging). Default.
WebexSDKMeeting pod 'WebexSDK/Meeting' Meetings only.
WebexSDKWxc pod 'WebexSDK/Wxc' Webex Calling only.
WebexSDKMessage pod 'WebexSDK/Message' Messaging only.
WebexBroadcastExtensionKit pod 'WebexBroadcastExtensionKit' Screen sharing from a Broadcast Upload Extension.

The module name is always WebexSDK regardless of the flavor you pick, so the import statement is always:

import WebexSDK

Adding the package in Xcode

  1. In Xcode, choose File ▸ Add Package Dependencies…

  2. Enter the package URL:

    https://github.com/webex/webex-ios-sdk
    
  3. Set the Dependency Rule to Up to Next Major Version starting at 3.17.0.

  4. When prompted to choose products, add one WebexSDK flavor product (e.g. WebexSDK) to your app target.

  5. If you use screen sharing, also add WebexBroadcastExtensionKit — but attach it to your Broadcast Upload Extension target, not the app target (see Broadcast extension below).

Adding the package via Package.swift

If your app is itself a Swift package:

// swift-tools-version:5.9
import PackageDescription

let package = Package(
    name: "MyWebexApp",
    platforms: [.iOS(.v15)],
    dependencies: [
        .package(url: "https://github.com/webex/webex-ios-sdk", from: "3.17.0")
    ],
    targets: [
        .target(
            name: "MyWebexApp",
            dependencies: [
                .product(name: "WebexSDK", package: "webex-ios-sdk")
            ]
        ),
        // Broadcast Upload Extension target (only if you use screen sharing):
        .target(
            name: "MyWebexAppBroadcastExtension",
            dependencies: [
                .product(name: "WebexBroadcastExtensionKit", package: "webex-ios-sdk")
            ]
        )
    ]
)

Pick a single WebexSDK flavor product per app target (WebexSDK, WebexSDKMeeting, WebexSDKWxc, or WebexSDKMessage).

Broadcast extension

WebexBroadcastExtensionKit is used for screen sharing and must be linked into your Broadcast Upload Extension target, not the main app target. It only links system frameworks (ReplayKit, Accelerate, AVFAudio) and communicates with the host app over a local socket, so it carries no dependency on the WebexSDK frameworks. In the extension code:

import WebexBroadcastExtensionKit

See Broadcast Upload Extension for Screen Sharing for the full screen-sharing setup.

Required app configuration

These steps are identical to the CocoaPods flow:

  1. Add a GroupIdentifier entry to your app’s Info.plist, set to your app’s App Group identifier. This lets the SDK resolve a path for its local data store. See Setting App Group.
  2. If you use WebexBroadcastExtensionKit, add the same GroupIdentifier entry to your Broadcast Extension target’s Info.plist so the extension can communicate with the main app.
  3. Configure Signing & Capabilities (App Groups) on both targets.

App size and architecture stripping

Unlike CocoaPods, there is no Pods/ folder to post-process. SPM consumes prebuilt .xcframework bundles that already ship stripped of debug symbols (from v3.7 onward), and each xcframework contains both the device (arm64) and simulator slices.

  • For development, both slices are present so the app runs on device and simulator.
  • For App Store / TestFlight builds, Xcode + App Store thinning automatically drops the simulator slice, so only arm64 ships — no manual strip-architectures.sh step is required for SPM consumers.

The dependency manager (SPM vs CocoaPods) does not change the size embedded in the shipped .app; the bytes are identical. See iOS SDK 3.x Framework Size Reduction.

Sample app

A sample app demonstrating Webex iOS SDK API usage is available at https://github.com/webex/webex-ios-sdk-example. It showcases API usage and is not intended to be a production-grade app.

Clone this wiki locally