Skip to content

v24.8.21 | Android & ARC

Latest

Choose a tag to compare

@furbytm furbytm released this 13 Jun 02:22
· 2 commits to main since this release
d22f954

SwiftUSD v24.8.21 | 🎧swift on.

Experimental Android Support, ARC-Managed Lifetimes, UsdView, & Safer Swift OpenUSD API.

Changelog

Commits

Changes

  • Experimental Android support - build OpenUSD apps for Android:
    SWIFTUSD_ANDROID_SUPPORT_ENABLED=1 swift bundler run --simulator "Pixel_10_Pro" -c release UsdView
  • Adopts parts of the apple/SwiftUsd overlay for a safer Swift OpenUSD API - client code should now hold UsdStage directly instead of UsdStageRefPtr; dereferencing and lifetime management are handled internally.
  • Extends the apple/SwiftUsd overlay to fix Swift/C++ interop bugs around std::stringString conversions and ambiguous Xformable operation overloads that previously caused Swift compiler crashes on Linux.

Breaking

  • UsdStage.createNew(...), UsdStage.open(...), and UsdStage.createInMemory() now return UsdStage directly with proper ARC-managed lifetimes, client code should now hold UsdStage directly instead of UsdStageRefPtr; dereferencing and lifetime management are handled internally.
  • HgiGL.createHgi(), HgiMetal.createHgi(), and UsdImagingGL.Engine.createEngine(...) now return the types directly with proper ARC-managed lifetimes, instead of a shared_ptr-backed ...Ptr/ ...SharedPtr wrapper. The HgiGLPtr, HgiMetalPtr, and UsdImagingGLEngineSharedPtr/EngineSharedPtr typealiases are removed.

Fixed

  • UsdStage and SdfLayer instances held by Swift now have correct reference-counted lifetimes. Their retain/release hooks were previously no-op stubs, so Swift's ARC calls didn't actually affect the underlying object's refcount; they now go through apple/SwiftUsd's Tf_RetainReleaseHelper and properly participate in TfRefBase refcounting.
  • HgiGL, HgiMetal, and UsdImagingGLEngine are now reference-counted Swift types (they now go through our own Tf_SharedPtrRetainReleaseHelper and properly participate in refcounting) - Swift automatically releases them when no longer referenced, so manual lifetime workarounds are no longer needed.

UsdView Developments

Screenshot_2026-06-06_at_8 44 04_PM
Simulator Screenshot - Apple Vision Pro - 2026-06-08 at 17 32 46
usdview_on_ios
untitled60-2.mov

Thank you


Usage

To use this release of Pixar's USD in your swift project, add the following to the dependencies section in your Package.swift file:

// swift-tools-version: 6.0

dependencies: [
  .package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.21")
]


Linux

For Linux, these are the only dependencies required, as MetaverseKit provides everything else.

Tip

If you are on a distro like Ubuntu there is a good chance you already have most of these installed.

Dependency CentOS Ubuntu
BZ2 bzip2-devel libbz2-dev
ZLib zlib-devel zlib1g-dev
FreeGLUT freeglut-devel freeglut3-dev
DEFLATE libdeflate-devel libdeflate-dev
Expat libexpat-devel libexpat1-dev
Xcursor libXcursor-devel libxcursor-dev
Xt libXt-devel libxt-dev
Xi libXi-devel libxi-dev
Xinerama libXinerama-devel libxinerama-dev
Xrandr libXrandr-devel libxrandr-dev