Skip to content

Fix Flutter packages for iOS - #3887

Merged
csukuangfj merged 3 commits into
k2-fsa:masterfrom
csukuangfj:fix-dart
Aug 24, 2026
Merged

csukuangfj merged 3 commits into
k2-fsa:masterfrom
csukuangfj:fix-dart

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fix the error in https://github.com/csukuangfj/sherpa-onnx/actions/runs/32126202562/job/95677209525

Xcode build done.                                           56.2s
Failed to build iOS app
Error (Xcode): Framework 'sherpa-onnx' not found
/Users/runner/work/sherpa-onnx/sherpa-onnx/flutter-examples/hello_world/ios/Runner.xcodeproj

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)
/Users/runner/work/sherpa-onnx/sherpa-onnx/flutter-examples/hello_world/ios/Runner.xcodeproj

Encountered error while building for device.
Error: Process completed with exit code 1.

Summary by CodeRabbit

  • Bug Fixes

    • Updated iOS and Flutter build, release, and package configuration to consistently use the renamed SherpaOnnxC.xcframework.
    • Improved Flutter test coverage across supported Android target platforms and disabled Swift Package Manager where CocoaPods builds require it.
  • Compatibility

    • Flutter package now requires Flutter 3.10.0 or newer.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 24, 2026
@coderabbitai

coderabbitai Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f1625109-fd88-46a0-b172-7a5021aaeab1

📥 Commits

Reviewing files that changed from the base of the PR and between 1cb484a and 0772abc.

📒 Files selected for processing (8)
  • .github/workflows/build-xcframework-shared-sherpa-with-static-onnxruntime.yaml
  • .github/workflows/release-dart-package.yaml
  • .github/workflows/test-flutter-package.yaml
  • .github/workflows/test-flutter.yaml
  • build-ios-shared-sherpa-with-static-onnxruntime.sh
  • flutter/sherpa_onnx/pubspec.yaml
  • flutter/sherpa_onnx_ios/ios/sherpa_onnx_ios.podspec
  • flutter/sherpa_onnx_ios/ios/sherpa_onnx_ios/Package.swift

📝 Walkthrough

Walkthrough

The change renames the iOS XCFramework bundle to SherpaOnnxC.xcframework, updates its build and consumption paths, adjusts Flutter CI matrices and CocoaPods setup, and adds a Flutter SDK constraint.

Changes

iOS framework bundle integration

Layer / File(s) Summary
Rename the iOS framework bundle
build-ios-shared-sherpa-with-static-onnxruntime.sh, .github/workflows/build-xcframework-shared-sherpa-with-static-onnxruntime.yaml, .github/workflows/release-dart-package.yaml, .github/workflows/test-flutter.yaml, flutter/sherpa_onnx_ios/ios/*
The build script produces and packages SherpaOnnxC.xcframework. Validation, release packaging, CocoaPods, Swift Package Manager, and Flutter iOS jobs reference the renamed bundle.
Update Flutter package CI settings
.github/workflows/test-flutter-package.yaml, flutter/sherpa_onnx/pubspec.yaml
CocoaPods jobs disable Swift Package Manager before dependency retrieval. The Linux and Android matrices use updated platform values. The package requires Flutter >=3.10.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant