#!/bin/bash # Simple iOS build test without fastlane # Run from project root: ./scripts/test-ios-build-simple.sh /path/to/profile.mobileprovision set -e PROFILE_PATH="$1" if [ -z "$PROFILE_PATH" ]; then echo "Usage: $0 /path/to/profile.mobileprovision" exit 1 fi echo "=== Step 1: Extract profile info ===" UUID=$(security cms -D -i "$PROFILE_PATH" | plutil -extract UUID raw -) PROFILE_NAME=$(security cms -D -i "$PROFILE_PATH" | plutil -extract Name raw -) TEAM_ID=$(security cms -D -i "$PROFILE_PATH" | plutil -extract TeamIdentifier.0 raw -) echo "Profile Name: $PROFILE_NAME" echo "UUID: $UUID" echo "Team ID: $TEAM_ID" echo "" echo "=== Step 2: Install profile ===" mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp "$PROFILE_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision echo "✓ Installed" echo "" echo "=== Step 3: Check signing identities ===" security find-identity -v -p codesigning echo "" echo "=== Step 4: Generate Xcode project ===" cd ios/LibNovel export USER=runner xcodegen generate --spec project.yml --project . echo "✓ Project generated" echo "" echo "=== Step 5: Try automatic signing build ===" xcodebuild archive \ -project LibNovel.xcodeproj \ -scheme LibNovel \ -configuration Release \ -destination 'generic/platform=iOS' \ -archivePath ./build/LibNovel.xcarchive \ -allowProvisioningUpdates \ CODE_SIGN_STYLE=Automatic \ DEVELOPMENT_TEAM="$TEAM_ID" echo "" echo "=== ✓ BUILD SUCCEEDED! ==="