opus_flutter_ios: add arm64-simulator slice to opus.xcframework#30
Open
gfx wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opus.xcframeworkpreviously only shippedios-arm64(device) andios-x86_64-simulator(Intel simulator) slices — noarm64-simulatorslice.arm64, so any app linking this framework fails to build for the simulator withUnable to find matching slice in 'ios-arm64 ios-x86_64-simulator' for the current build architectures (arm64 x86_64) ....FIXED_POINT, no custom modes, no arch-specific assembly) forarm64-apple-ios13.0-simulatorfrom the vendored source already in this repo (opus_flutter_android/android/libopus).lipointo a single fatios-arm64_x86_64-simulatorslice — the same layoutxcodebuild -create-xcframeworkproduces for multi-arch simulator support — and updatedInfo.plistaccordingly.Verification
opusVersionString/opusVersionNumberframework version symbols).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).opus_flutterexample app (withopus_flutter_iospointed 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 theRunnerbinary and the embeddedopus.frameworkbinary are nativelyarm64(nox86_64, no Rosetta) viafile/otool.Test plan
opus_flutterexample app builds and launches on an arm64-only iOS Simulator runtime, natively🤖 Generated with Claude Code