@@ -18,38 +18,36 @@ jobs:
1818
1919 - name : Create App Project
2020 run : |
21- # 1. Create the project and add iOS platform
2221 cordova create build-folder com.yourname.gtatool GTATool
2322 cd build-folder
2423 cordova platform add ios
25-
26- # 2. Put your HTML code into the app
2724 cp ../index.html www/index.html
2825 cordova prepare ios
2926
3027 - name : Build and Package
3128 run : |
3229 cd build-folder/platforms/ios
3330
34- # Find the .xcodeproj file automatically
31+ # Find the .xcodeproj automatically
3532 PROJ_NAME=$(ls -d *.xcodeproj | head -n 1)
3633 SCHEME_NAME=$(basename "$PROJ_NAME" .xcodeproj)
3734
38- echo "Found Project: $PROJ_NAME"
39- echo "Using Scheme: $SCHEME_NAME"
40-
41- # 1. Build the .app folder (Unsigned)
42- xcodebuild -project "$PROJ_NAME" -scheme "$SCHEME_NAME" -configuration Debug -sdk iphoneos CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
35+ # 1. Build the app (Unsigned)
36+ # We're using 'archive' now because it's more reliable for finding the app later
37+ xcodebuild archive -project "$PROJ_NAME" -scheme "$SCHEME_NAME" -archivePath "./GTATool.xcarchive" -sdk iphoneos CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO
4338
44- # 2. Create the Payload structure
39+ # 2. Find the .app inside the archive
4540 mkdir -p Payload
41+ APP_FOLDER=$(find ./GTATool.xcarchive -name "*.app" -type d | head -n 1)
42+
43+ if [ -z "$APP_FOLDER" ]; then
44+ echo "ERROR: Could not find .app folder!"
45+ exit 1
46+ fi
4647
47- # 3. Find the built .app and copy it
48- # Path is usually: build/Debug-iphoneos/GTATool.app
49- APP_FILE=$(find . -name "*.app" -type d | grep "Debug-iphoneos" | head -n 1)
50- cp -r "$APP_FILE" Payload/
48+ cp -r "$APP_FOLDER" Payload/
5149
52- # 4. Zip it into the final IPA
50+ # 3. Create the IPA
5351 zip -r GTATool-Unsigned.ipa Payload
5452
5553 - name : Upload IPA Artifact
0 commit comments