Added comprehensive documentation for the KMM project structure, build commands, and UI testing setup/troubleshooting. Documentation added: - CLAUDE.md: Complete KMM project guide for Claude Code with architecture, build commands, common tasks, and development patterns - iosApp/UI_TESTS_*.md: UI testing strategy, implementation guides, summaries - iosApp/XCUITEST_*.md: XCUITest implementation and debugging guides - iosApp/TEST_FAILURES_ANALYSIS.md: Analysis of common test failures - iosApp/ACCESSIBILITY_IDENTIFIERS_FIX.md: Guide for fixing accessibility issues - iosApp/FIX_TEST_TARGET*.md: Guides for fixing test target configuration - iosApp/fix_test_target.sh: Script to automate test target setup The CLAUDE.md serves as the primary documentation for working with this repository, providing quick access to build commands, architecture overview, and common development tasks for both iOS and Android platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Fix MyCribTests Target Configuration
The Problem
The tests are failing with "No target application path specified" because the test target's TEST_HOST setting is hardcoded to a wrong path:
TEST_HOST = /Users/treyt/Desktop/code/MyCrib/MyCribKMM/iosApp/build/Release-iphoneos/MyCrib.app//MyCrib
This path doesn't exist when running tests in Debug mode on the simulator.
The Fix (Manual - Do This in Xcode)
-
Open the project in Xcode:
cd /Users/treyt/Desktop/code/MyCrib/MyCribKMM/iosApp open iosApp.xcodeproj -
Select the MyCribTests target:
- Click on the project in the Project Navigator (blue icon at top)
- Select MyCribTests from the TARGETS list
-
Go to Build Settings:
- Click the Build Settings tab
- Make sure "All" and "Combined" are selected (not "Basic" or "Customized")
-
Search for "TEST_HOST":
- Use the search box at top right
- Type "TEST_HOST"
-
Set TEST_HOST value:
- Double-click the value field
- Change from:
/Users/treyt/Desktop/code/MyCrib/MyCribKMM/iosApp/build/Release-iphoneos/MyCrib.app//MyCrib - To:
$(BUILT_PRODUCTS_DIR)/MyCrib.app/MyCrib - Press Enter
-
Verify BUNDLE_LOADER:
- Clear the search, search for "BUNDLE_LOADER"
- It should be set to:
$(TEST_HOST) - If not, set it to that value
-
Clean and rebuild:
- Product → Clean Build Folder (Cmd+Shift+K)
- Product → Build (Cmd+B)
-
Run tests:
- Product → Test (Cmd+U)
- Or click the diamond icon next to any test method
Verification
After making these changes, run:
xcodebuild -project iosApp.xcodeproj -target MyCribTests -showBuildSettings | grep TEST_HOST
Should output:
TEST_HOST = $(BUILT_PRODUCTS_DIR)/MyCrib.app/MyCrib
NOT a hardcoded absolute path.
Why This Happened
The test target was likely created manually or the project was moved, causing Xcode to lose the proper build settings reference.