Update iOS Xcode prerequisite checks

This commit is contained in:
Mikhail Kilin
2026-05-20 16:14:17 +03:00
parent e5d0f2c064
commit 6576a37198
5 changed files with 29 additions and 8 deletions

View File

@@ -15,8 +15,15 @@ cd apps/ios/TeleTuiIOS
swift run TeleTuiIOSSmokeTests
```
Simulator/device build is currently blocked on this machine because `xcodebuild -version` fails with:
Simulator/device build is currently blocked until the Xcode license is accepted.
Xcode is installed at `/Applications/Xcode.app`, and `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -version` reports Xcode 26.5, but `xcrun simctl` fails with:
```text
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode and Apple SDKs license.
```
After accepting the license, verify local iOS tooling with:
```bash
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer scripts/check-ios-prereqs.sh
```

View File

@@ -20,6 +20,7 @@ XCFramework-compatible module map under `build/ios-ffi/`.
Known blocker:
- `xcodebuild -version` currently fails on this machine because only Command Line Tools are selected:
`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`.
- Real TDLib iOS simulator/device linking therefore is not validated in this phase.
- Xcode is installed at `/Applications/Xcode.app`, and `DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcodebuild -version` reports Xcode 26.5.
- `xcrun simctl` currently fails because the Xcode license has not been accepted:
`You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode and Apple SDKs license.`
- Real TDLib iOS simulator/device linking therefore is not validated yet.

View File

@@ -1,11 +1,11 @@
# iOS Hardening Notes
Phase 6 real-device validation is blocked on this machine until full Xcode is selected.
Phase 6 real-device validation is blocked on this machine until the Xcode license is accepted.
Current local blocker:
```text
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
You have not agreed to the Xcode license agreements. Please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode and Apple SDKs license.
```
Implemented hardening hooks:

View File

@@ -10,7 +10,7 @@
## Required Before TestFlight
1. Install and select full Xcode with `xcode-select`.
1. Install full Xcode, accept the license, and verify `scripts/check-ios-prereqs.sh`.
2. Create the Xcode app project or wire the Swift package into an Xcode app target.
3. Add app icon, launch screen, bundle id, signing team, notification capability, and entitlements.
4. Build TDLib for simulator and device architectures.

13
scripts/check-ios-prereqs.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ -z "${DEVELOPER_DIR:-}" && -d /Applications/Xcode.app/Contents/Developer ]]; then
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
fi
printf 'Developer dir: %s\n' "${DEVELOPER_DIR:-$(xcode-select -p 2>/dev/null || true)}"
xcodebuild -version
xcrun simctl list devices available
swift --version
printf 'iOS prerequisites are available.\n'