-
Notifications
You must be signed in to change notification settings - Fork 48
Add tvOS support #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tvOS support #146
Conversation
simlay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Looks like the meat of this is a few lines of rust.
Let's move the iOS example directory to "apple" and add tvOS as a possible target in the Xcode project and add that to CI similar to the existing example.
I'll submit a PR to your fork and branch sometime this weekend if you don't get to it before me.
Per maintainer feedback on PR RustAudio#146, merge the separate iOS and tvOS examples into a single directory with one Xcode project supporting both platforms. Changes: - Rename examples/ios to examples/apple, delete examples/tvos - Single Xcode project with iOS and tvOS targets - Unified Rust code with single run_example() for both platforms - Both platforms now play 440Hz sine wave demo - AppDelegate.m uses #if TARGET_OS_TV for platform differences - SDK-conditional library search paths in Xcode project - Update CI workflow to use new paths
Add tvOS as a supported platform alongside iOS. Both platforms now share a single example in examples/apple/ with one Xcode project containing targets for both iOS and tvOS. Changes: - Add tvOS target support (aarch64-apple-tvos, aarch64-apple-tvos-sim) - Consolidate examples/ios and examples/tvos into examples/apple - Single Xcode project with iOS and tvOS targets sharing source files - Unified sine wave demo (440Hz) for both platforms - Platform-specific code via #[cfg(target_os)] in Rust and #if TARGET_OS_TV in Objective-C - SDK-conditional library search paths in Xcode project - Build script detects SDKROOT to build only relevant targets - Update CI workflow for both platforms tvOS is a Tier 3 target requiring nightly toolchain with -Zbuild-std.
| - name: Build for tvOS simulator | ||
| run: cd examples/apple && cargo +nightly build -Zbuild-std --target aarch64-apple-tvos-sim --release | ||
| - name: Build for tvOS device | ||
| run: cd examples/apple && cargo +nightly build -Zbuild-std --target aarch64-apple-tvos --release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are duplicated in the buildscript that's called from the xcodebuild call. Granted, they do check different things. It's not a big deal.
simlay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much! This turned out to be more work than I was expecting. I might follow up with a few minor refactors to CI. Doing them in this PR has some friction as I've gotta approve CI runs for first time contributors.
Summary
Notes
tvOS targets (
aarch64-apple-tvos,aarch64-apple-tvos-sim) are Tier 3 in Rust, requiring nightly toolchain and-Zbuild-stdflag since there is no prebuilt standard library.Changes
RemoteIO,audio_session_get_property, and buffer frame size calculation-Zbuild-std.gitignorefor Xcode build artifacts