Skip to content

opus_flutter_ios: add arm64-simulator slice to opus.xcframework#30

Open
gfx wants to merge 1 commit into
EPNW:masterfrom
gfx:fix/ios-arm64-simulator-slice
Open

opus_flutter_ios: add arm64-simulator slice to opus.xcframework#30
gfx wants to merge 1 commit into
EPNW:masterfrom
gfx:fix/ios-arm64-simulator-slice

Conversation

@gfx

@gfx gfx commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • opus.xcframework previously only shipped ios-arm64 (device) and ios-x86_64-simulator (Intel simulator) slices — no arm64-simulator slice.
  • On Apple Silicon Macs, Xcode defaults to building the simulator target as arm64, so any app linking this framework fails to build for the simulator with Unable to find matching slice in 'ios-arm64 ios-x86_64-simulator' for the current build architectures (arm64 x86_64) ....
  • Cross-compiled libopus 1.3.1 (portable C, float API — matches the existing build: no FIXED_POINT, no custom modes, no arch-specific assembly) for arm64-apple-ios13.0-simulator from the vendored source already in this repo (opus_flutter_android/android/libopus).
  • Merged the new arm64 binary with the existing x86_64 binary via lipo into a single fat ios-arm64_x86_64-simulator slice — the same layout xcodebuild -create-xcframework produces for multi-arch simulator support — and updated Info.plist accordingly.

Verification

  • Symbol table of the new arm64 binary matches the existing x86_64 binary exactly (including the auto-generated opusVersionString/opusVersionNumber framework version symbols).
  • Built and ran libopus's own test suite (test_opus_api, test_opus_decode, test_opus_encode) natively on arm64 with the exact same source/flags — all pass with zero failures (this is a valid proxy for the iOS-Simulator arm64 build since Apple Silicon iOS Simulator processes execute unmodified arm64 code on the host CPU; only SDK/platform metadata differs from a native macOS-arm64 build for this platform-API-free C code).
  • Built the opus_flutter example app (with opus_flutter_ios pointed at this change) against this xcframework and ran it, unmodified, on an iOS 26 (arm64-only) Simulator runtime on an Apple Silicon Mac — confirmed both the Runner binary and the embedded opus.framework binary are natively arm64 (no x86_64, no Rosetta) via file/otool.

Test plan

  • Symbol parity check between new arm64 slice and existing x86_64 slice
  • libopus API/encode/decode test suite passes on arm64
  • opus_flutter example app builds and launches on an arm64-only iOS Simulator runtime, natively
  • Maintainer review of the build flags / xcframework structure

🤖 Generated with Claude Code

opus.xcframework previously only shipped arm64 (device) and x86_64
(Intel simulator) slices. On Apple Silicon Macs, Xcode defaults to
building the simulator target as arm64, so apps linking this framework
failed with "Unable to find matching slice in 'ios-arm64
ios-x86_64-simulator' ...".

Cross-compiled libopus 1.3.1 (portable C, float API, no
platform-specific assembly) for arm64-apple-ios13.0-simulator from the
vendored source in opus_flutter_android/android/libopus, matching the
existing build's flags (OPUS_BUILD, VAR_ARRAYS, float/non-fixed-point).
Verified symbol parity with the existing x86_64 slice and ran the
upstream libopus test suite (test_opus_api, test_opus_encode,
test_opus_decode) natively on arm64 with zero failures. Merged with the
existing x86_64 binary via lipo into a single fat
ios-arm64_x86_64-simulator slice, matching the layout produced by
`xcodebuild -create-xcframework`.

Apps built against this can now build and run natively on the iOS
Simulator on Apple Silicon, with no need to exclude arm64 for the
simulator SDK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant