fix: resolve iOS Native test execution issues#113
Conversation
- Switch test-native from swift test to xcodebuild test to avoid SwiftGen prebuild plugin errors - Add FeatureTests target to Package.swift for AboutFeature tests - Update Makefile to run both ComponentTests and FeatureTests on iOS Simulator - Use iPhone 16 Pro as test destination for consistent results This resolves the "a prebuild command cannot use executables built from source" error that was preventing Native module tests from running with swift test command. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add test-native job to ios-test.yml workflow for iOS Native module testing - Use macos-15 runner with Xcode 16.4 for iOS Simulator testing - Run ComponentTests and FeatureTests via xcodebuild to avoid SwiftGen plugin issues - Add SPM dependencies caching for faster CI builds - Enable parallel execution of Core tests (Ubuntu) and Native tests (macOS) This resolves iOS Native testing in CI by using xcodebuild instead of swift test, which properly handles SwiftGen prebuild plugins. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes iOS Native test execution issues by switching from swift test to xcodebuild test to resolve SwiftGen prebuild plugin errors, and adds iOS Native testing to the CI pipeline.
- Replace
swift testwithxcodebuild testusing iPhone 16 Pro simulator - Add macOS-based GitHub Actions job for Native tests with proper Xcode setup
- Enable parallel execution of Core tests (Ubuntu) and Native tests (macOS)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app-ios/Makefile | Updates test-native target to use xcodebuild with iPhone 16 Pro simulator instead of swift test |
| .github/workflows/ios-test.yml | Adds new test-native job with macOS 15 runner and Xcode 16.4 configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer | ||
|
|
||
| - name: Cache SPM dependencies | ||
| uses: actions/cache@v3 |
There was a problem hiding this comment.
Consider upgrading to actions/cache@v4 for better performance and compatibility with newer GitHub Actions runners.
| uses: actions/cache@v3 | |
| uses: actions/cache@v4 |
|
This PR is failing in CI, but the failure is due to a check unrelated to the content of this PR, so I think it's fine to proceed with the review as is 🤔 |
touyou
left a comment
There was a problem hiding this comment.
LGTM👍
I thought the CI would likely pass if we merge the latest main branch, so it would be good to confirm that.
Summary
Background
The
swift testcommand was failing with SwiftGen prebuild plugin errors:This is due to SwiftPM's security restrictions on prebuild plugins, which cannot use executable targets built from source.
Changes
swift testwithxcodebuild testfor test-native targetTest Plan
Dependencies
This PR depends on #112 for the FeatureTests target definition.
🤖 Generated with Claude Code