@@ -500,6 +500,17 @@ jobs:
500500 CODE_SIGNING_DISABLED : true
501501 run : npx detox build e2e --configuration ios.sim.release
502502
503+ # Debug step to verify build output
504+ - name : Verify build output
505+ if : ${{ steps.app-cache.outputs.cache-hit != 'true' && !contains(github.event.pull_request.labels.*.name, 'ci/skip-detox') }}
506+ run : |
507+ echo "Checking build output directory structure..."
508+ ls -la ios/build/Build/Products/
509+ echo "Checking if app bundle exists..."
510+ ls -la ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/ || echo "App bundle not found!"
511+ echo "Checking for Info.plist in app bundle..."
512+ cat ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/Info.plist | head -10 || echo "Info.plist not found!"
513+
503514 - name : Cache the iOS app
504515 uses : actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
505516 with :
@@ -532,6 +543,17 @@ jobs:
532543 - if : steps.app-cache.outputs.cache-hit != 'true'
533544 run : exit 1
534545
546+ - name : Debug - Check app cache contents
547+ run : |
548+ echo "Checking app cache contents..."
549+ ls -la ios/build/Build/Products/
550+ echo "Checking simulator app directory..."
551+ ls -la ios/build/Build/Products/Release-iphonesimulator/ || echo "Directory not found"
552+ echo "Checking app bundle contents..."
553+ ls -la ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/ || echo "App bundle not found"
554+ echo "Checking for Info.plist..."
555+ cat ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/Info.plist | head -10 || echo "Info.plist not found"
556+
535557 - # load the jsbundle before reinstalling detox, so that the package-lock cannot change
536558 name : Load the cached iOS jsbundle
537559 uses : actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
@@ -546,18 +568,31 @@ jobs:
546568 - if : steps.jsbundle-cache.outputs.cache-hit != 'true'
547569 run : exit 1
548570
571+ - name : Debug - Verify cache keys
572+ run : |
573+ echo "App cache key: ${{ needs.ios-build.outputs.cache-key }}"
574+ echo "App cache hit: ${{ steps.app-cache.outputs.cache-hit }}"
575+ echo "JS bundle cache key: ${{ needs.ios-bundle.outputs.cache-key }}"
576+ echo "JS bundle cache hit: ${{ steps.jsbundle-cache.outputs.cache-hit }}"
577+
549578 - name : Move cached jsbundle into place
550579 run : |
580+ # Ensure app directory exists
551581 mkdir -p ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/
552582
583+ # Check if app bundle seems incomplete
553584 if [ ! -f ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/Info.plist ]; then
554585 echo "WARNING: Info.plist not found in app bundle, build may be incomplete!"
555- echo "Copying essential files from source directory as fallback…"
586+ echo "Copying essential files from source directory as fallback..."
587+
588+ # Copy essential app files
556589 cp ios/AllAboutOlaf/Info.plist ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/
557-
590+
591+ # Create simulated app executable
558592 echo "#!/bin/sh" > ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/AllAboutOlaf
559593 echo "echo 'This is a placeholder executable for testing purposes'" >> ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/AllAboutOlaf
560594 chmod +x ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/AllAboutOlaf
595+
561596 echo "Created minimal app structure for testing"
562597 fi
563598
@@ -567,10 +602,16 @@ jobs:
567602 rm -rf ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/assets || true
568603 mv ios/assets ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/
569604
605+ # Debug app bundle again after changes
606+ echo "App bundle contents after moving JS files:"
607+ ls -la ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/
608+
609+ # Final verification of Info.plist
570610 if [ -f ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/Info.plist ]; then
571611 echo "Info.plist exists in final app bundle"
612+ grep -A 2 "CFBundleIdentifier" ios/build/Build/Products/Release-iphonesimulator/AllAboutOlaf.app/Info.plist || echo "CFBundleIdentifier not found in Info.plist"
572613 else
573- echo "ERROR: Info.plist still missing. Build is incomplete !"
614+ echo "ERROR: Info.plist still missing after all operations !"
574615 fi
575616
576617 - uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
0 commit comments