01a4a9ed28b7f0db5017ca713576f4537ea4e06c
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0a6ef55937 |
fix(ios): unblock iOS Debug builds + regenerate FRB for file transfer API (#41)
* fix(ios): preserve Silero VAD symbols in Flutter Debug builds
Flutter Debug builds split user code into a sibling Chanora.debug.dylib
alongside a minimal launcher executable; the six @_cdecl symbols
chanora_silero_vad_* land in the dylib, not the main binary. Two
problems were hiding behind that:
1. Debug.xcconfig only carried -exported_symbol flags, missing the
load-bearing -u force-undefined flags Release.xcconfig already had.
Without -u, the linker dropped the Swift @_cdecl symbols (no Swift
caller exists) before -exported_symbol could re-export them, so the
dylib shipped without the VAD entry points.
2. verify_silero_exports.sh inspected only ${EXECUTABLE_PATH}, which in
Debug builds is the launcher stub. Even with the symbols correctly
landing in the debug dylib, the script falsely reported them missing.
Mirror Release.xcconfig's -u + -exported_symbol pair in Debug.xcconfig
and teach the verify script to prefer Chanora.debug.dylib when it sits
next to the launcher. Release builds are unaffected (single fat binary
remains the inspected target).
* build(flutter): regenerate FRB bindings for file transfer API
Run flutter_rust_bridge_codegen against the post-PR-#40 chanora_bridge
to emit typed Dart bindings for initCache, downloadAvatar, downloadIcon,
clearFileCache, and fileCacheSize. Replaces the dynamic-cast +
NoSuchMethodError-swallowing shims that lib/src/rust/api.dart shipped
as a pre-regen safety net.
Functional change: downloadAvatar/downloadIcon now return Uint8List?
(was List<int>?) directly through the typed dispatch table. Existing
consumers stay source-compatible because Uint8List extends List<int>;
no call sites needed updates.
* fix(ios): set ITSAppUsesNonExemptEncryption to false
App uses only standard/exempt encryption (HTTPS, system-provided crypto);
declaring exempt status removes the App Store export-compliance prompt
at every TestFlight/release upload.
|
||
|
|
9d8a1f8fd1 |
fix(ios,macos): address PR #26 review findings
- ios/Runner.xcodeproj/project.pbxproj: Update RunnerTests TEST_HOST paths from Runner.app/Runner to Chanora.app/Chanora (target was renamed in prior commit but test config still pointed at old paths, breaking xcodebuild test). - Cargo.toml: Move release DWARF flags from workspace [profile.release] into Apple-only podspec CARGO_PROFILE_RELEASE_* env vars so Android, Linux, Windows release builds stay lean (~10MB DWARF avoided). - ios/Runner/Info.plist + macos/Runner/Info.plist: Flip ITSAppUsesNonExemptEncryption from false to true (Chanora ships ChaCha20-Poly1305 local storage + tsclientlib ECDH/AES-EAX voice channel encryption, not exempt under Apple export-compliance rules). - scripts/verify_silero_exports.sh: Make slice-aware via lipo -archs loop + per-arch nm -arch invocation so universal macOS builds verify every architecture slice, not just whichever slice nm picks. - .gitignore: Drop .omo/ and .playwright-mcp/ entries (scope leak; unrelated tooling state, not part of PR #26 archive-symbol concern). |
||
|
|
a589ac953f |
fix(ios,macos): preserve Silero @_cdecl exports across Xcode Archive
The Apple CoreML Silero VAD backend resolves six @_cdecl Swift symbols
via dlsym(RTLD_DEFAULT) at runtime in the Rust audio crate. Local
flutter build paths preserved those symbols, but Xcode Archive (the
path used for TestFlight and App Store uploads) silently stripped them
through two independent mechanisms, causing Rust to fall back to
WebRTC VAD on every shipped build.
Both stripping mechanisms are now neutralised:
* ld dead-strip: OTHER_LDFLAGS now whitelists each of the six
chanora_silero_vad_* symbols via repeated `-Xlinker -exported_symbol`
pairs in ios/Flutter/{Release,Debug}.xcconfig and
macos/Flutter/Flutter-{Release,Debug}.xcconfig.
* install-time strip: STRIP_STYLE is set to `non-global` in the same
four xcconfigs so the post-link strip phase no longer drops exported
global text symbols from the Archive product. Cost: ~264 bytes per
binary; verified `xcrun strip` vs `xcrun strip -x` behaviour.
Self-test wired into both AppDelegates: at launch on a utility queue,
ChanoraSileroSelfTest resolves all six symbols through dlsym (the same
path the Rust runtime uses, not a direct call that would mask the bug
class) and exercises create → reset → process → destroy. Result is
logged via NSLog and surfaces in Console.app / idevicesyslog.
A post-link verify_silero_exports.sh build phase runs nm -gU on the
final Archive binary and fails the build if any of the six symbols are
missing. Empirically caught the original Archive regression that
flutter build --no-codesign did not.
CocoaPods bridge podspecs now emit a proper .dSYM via dsymutil so
TestFlight crash reports are symbolicated; Cargo.toml release profile
sets `debug = true` because dsymutil needs DWARF in the input dylib.
macOS chanora_bridge.podspec PATH inserts /opt/homebrew/opt/rustup/bin
ahead of /opt/homebrew/bin so rustup's cargo (which has the
x86_64-apple-darwin target installed) wins over the homebrew rust
formula that is aarch64-only.
iOS Podfile target renamed from `Runner` to `Chanora` to match the
Xcode target name shipped in the project (the workspace and scheme
already referenced Chanora; the Podfile mismatch produced lint
warnings during `pod install`).
ITSAppUsesNonExemptEncryption=false declared in both Info.plist files
so TestFlight and App Store Connect uploads skip the export-compliance
prompt; Chanora uses only platform-provided TLS.
.gitignore now covers Xcode archive bundles, IPA exports, dSYM
directories, the local macOS release zip, and agent/tooling state
directories so generated TestFlight artifacts no longer appear in
git status.
End-to-end verified by headless archive:
xcodebuild -workspace Runner.xcworkspace -scheme Runner \
-configuration Release -destination 'generic/platform=iOS' \
-archivePath /tmp/chanora.xcarchive archive CODE_SIGNING_ALLOWED=NO
nm -gU on the resulting .app/Chanora binary shows all six
chanora_silero_vad_* symbols present.
|