@@ -105,119 +105,21 @@ jobs:
105105 # Reset package caches
106106 xcodebuild -resolvePackageDependencies -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit
107107
108- - name : Fix CoreSimulator asset catalog issue
109- run : |
110- # This is a CoreSimulator issue, not a CodeScanner issue
111- # The AssetCatalogSimulatorAgent can't communicate with the simulator
112- echo "=== Fixing CoreSimulator asset catalog issue ==="
113-
114- # Reset CoreSimulator services
115- echo "Resetting CoreSimulator services..."
116- sudo launchctl unload /System/Library/LaunchDaemons/com.apple.CoreSimulator.CoreSimulatorService.plist || true
117- sudo launchctl load /System/Library/LaunchDaemons/com.apple.CoreSimulator.CoreSimulatorService.plist || true
118-
119- # Kill any existing simulator processes
120- echo "Killing existing simulator processes..."
121- pkill -f "Simulator" || true
122- pkill -f "CoreSimulator" || true
123- pkill -f "AssetCatalogSimulatorAgent" || true
124-
125- # Wait for processes to fully terminate
126- sleep 5
127-
128- # Reset simulator state
129- echo "Resetting simulator state..."
130- xcrun simctl shutdown all || true
131- xcrun simctl erase all || true
132-
133- # Restart CoreSimulator daemon
134- echo "Restarting CoreSimulator daemon..."
135- sudo launchctl stop com.apple.CoreSimulator.CoreSimulatorService || true
136- sleep 2
137- sudo launchctl start com.apple.CoreSimulator.CoreSimulatorService || true
138-
139- # Wait for services to be ready
140- sleep 10
141-
142- echo "CoreSimulator reset complete"
143-
144- - name : Reboot iOS Simulator
145- run : |
146- echo "=== Rebooting iOS Simulator after CoreSimulator reset ==="
147-
148- # Boot the simulator again
149- echo "Booting $SIMULATOR_NAME..."
150- xcrun simctl boot "$SIMULATOR_NAME" || true
151-
152- # Wait for simulator to boot
153- echo "Waiting for simulator to boot..."
154- for i in {1..30}; do
155- if xcrun simctl list devices | grep "$SIMULATOR_NAME" | grep -q "Booted"; then
156- echo "$SIMULATOR_NAME is booted!"
157- break
158- fi
159- echo "Waiting for $SIMULATOR_NAME boot... ($i/30)"
160- sleep 5
161- done
162-
163- # Additional wait for simulator to be fully ready
164- sleep 15
165-
166- # Launch simulator app to ensure it's visible
167- open -a Simulator
168- sleep 5
169-
170- echo "Simulator reboot complete"
171-
172108 - name : Build iOS app
173109 env :
174110 GITHUB_ACTOR : ${{ github.actor }}
175111 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
176112 CHATWOOT_API : ${{ secrets.CHATWOOT_API }}
177113 E2E : true
178114 run : |
179- # Try building without asset catalogs first
180- echo "=== Attempting build without asset catalogs ==="
181-
182- # Remove CodeScanner asset catalog to bypass the issue
183- CODESCANNER_ASSETS_PATH="DerivedData/SourcePackages/checkouts/CodeScanner/Sources/CodeScanner/Resources/Assets.xcassets"
184- if [ -d "$CODESCANNER_ASSETS_PATH" ]; then
185- echo "Temporarily removing CodeScanner Assets.xcassets to bypass compilation issue..."
186- mv "$CODESCANNER_ASSETS_PATH" "$CODESCANNER_ASSETS_PATH.backup" || true
187- fi
188-
189- if xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
115+ echo "=== Building iOS app ==="
116+ xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
190117 -scheme Bitkit \
191118 -configuration Debug \
192119 -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
193120 -derivedDataPath DerivedData \
194121 -allowProvisioningUpdates \
195- -skipPackagePluginValidation \
196- -disableAutomaticPackageResolution \
197- build; then
198- echo "✅ Build succeeded without asset catalogs!"
199- else
200- echo "❌ Build failed, trying with asset catalogs restored..."
201-
202- # Restore asset catalog and try again
203- if [ -d "$CODESCANNER_ASSETS_PATH.backup" ]; then
204- mv "$CODESCANNER_ASSETS_PATH.backup" "$CODESCANNER_ASSETS_PATH" || true
205- fi
206-
207- # Clean everything and try a simpler build
208- echo "=== Cleaning for fallback build ==="
209- rm -rf DerivedData
210- rm -rf ~/Library/Developer/Xcode/DerivedData
211-
212- echo "=== Attempting fallback build ==="
213- xcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace \
214- -scheme Bitkit \
215- -configuration Debug \
216- -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \
217- -derivedDataPath DerivedData \
218- -allowProvisioningUpdates \
219- build
220- fi
122+ build
221123
222124 - name : Prepare app for E2E tests
223125 run : |
0 commit comments