Zaber Launcher Tutorials
Zaber Motion Library
Sample Projects
Virtual DeviceDropdown icon
About3D Viewer
AccountDropdown icon
Sign InSign Up
Zaber Motion Library
Getting Started
Install
PythonC# (.NET)C++JavaScript and TypeScript (Node.js)MATLABJavaSwiftOctaveMATLAB (legacy)
Basic Example (Hello Zaber)
How-to GuidesAPI ReferenceSupportBinary Protocol (Legacy)
© 2026 Zaber Technologies Inc.

Swift

Please note that this library uses the Swift Combine framework, which is only available on macOS v10.15 or greater, and can only be built with swift-tools-version 6.0 or greater. Additionally, ZML Swift did not exist before ZML v7.4.1.

The instructions below explain how to install this package both in XCode and using Swift Package Manager.

XCode Setup

Open your XCode project and go to File > Add Package Dependencies. Then, in the package search field in the top right, enter the ZML Swift package url:

https://github.com/zabertech/zaber-motion-lib-swift

Finally, select Add Package.

Swift Package Manager Setup

You can add ZML Swift as a package dependency to your project's Package.swift file. Simply create a new package dependency with the following URL:

https://github.com/zabertech/zaber-motion-lib-swift

For example:

// swift-tools-version: 6.0
import PackageDescription

let package = Package(
    name: "SwiftExample",
    platforms: [ .macOS(.v10_15) ],
    dependencies: [
        .package(
            url: "https://github.com/zabertech/zaber-motion-lib-swift",
            from: "9.0.1"
        )
    ],
    targets: [
        .executableTarget(
            name: "swift-example",
            dependencies: [
                .product(name: "ZaberMotionLib", package: "zaber-motion-lib-swift")
            ]
        ),
        // ...
    ]
)

Next Steps

Continue the Getting Started guide by running the example code.