Skip to content

Commit d7a93eb

Browse files
committed
fix(cross): fix ios builder
1 parent 8386026 commit d7a93eb

1 file changed

Lines changed: 34 additions & 46 deletions

File tree

cross-platform/deploy.sh

Lines changed: 34 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -56,58 +56,46 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
5656
fi
5757

5858
elif [[ "$OSTYPE" == "darwin"* ]]; then
59-
# macOS - Upload entire build/ios directory for inspection
60-
61-
echo "📦 Creating archive of entire build/ios directory for inspection..."
62-
IOS_ARCHIVE="ios-build-${COMMIT_TAG}.tar.gz"
59+
# macOS - Create IPA from Release-iphoneos build (has all frameworks embedded)
60+
IPA_PATH="build/ios/ipa/lam7a.ipa"
61+
APP_PATH="build/ios/Release-iphoneos/Runner.app"
6362

64-
if [ -d "build/ios" ]; then
65-
echo "📊 build/ios size: $(du -sh build/ios | cut -f1)"
66-
tar -czf "$IOS_ARCHIVE" build/ios
67-
echo "✅ Created archive: ${IOS_ARCHIVE}"
68-
echo "📊 Archive size: $(du -sh "$IOS_ARCHIVE" | cut -f1)"
69-
70-
# Upload the full build directory
71-
gh release upload "${RELEASE_TAG}" "$IOS_ARCHIVE" \
72-
--repo "${OWNER_NAME}/${REPO_NAME}" \
73-
--clobber
74-
75-
echo "✅ Uploaded full iOS build archive: ${IOS_ARCHIVE}"
76-
else
77-
echo "❌ build/ios directory not found"
63+
if [ ! -d "$APP_PATH" ]; then
64+
echo "❌ Runner.app not found at: ${APP_PATH}"
7865
exit 1
7966
fi
8067

8168
echo ""
82-
echo "🔍 DEBUG: Exploring build/ios structure..."
83-
find build/ios -type d -name "*.app" 2>/dev/null || echo "No .app bundles found"
69+
echo "✅ Using Release-iphoneos build: ${APP_PATH}"
70+
echo "📊 Runner.app size: $(du -sh "$APP_PATH" | cut -f1)"
8471

85-
echo ""
86-
echo "🔍 Finding all .app bundles and their sizes:"
87-
find build/ios -name "*.app" -type d -exec du -sh {} \; 2>/dev/null || echo "None found"
72+
# Check Frameworks directory
73+
if [ -d "$APP_PATH/Frameworks" ]; then
74+
FRAMEWORK_COUNT=$(find "$APP_PATH/Frameworks" -name "*.framework" -type d | wc -l)
75+
echo "📦 Embedded frameworks: ${FRAMEWORK_COUNT}"
76+
fi
8877

89-
# Also create IPA for convenience
90-
IPA_PATH="build/ios/ipa/lam7a.ipa"
91-
APP_PATH=$(find build/ios -name "*.app" -type d | grep -v "Frameworks" | head -n 1)
78+
# Create IPA
79+
mkdir -p build/ios/ipa
80+
mkdir -p Payload
9281

93-
if [ -n "$APP_PATH" ] && [ -d "$APP_PATH" ]; then
94-
echo ""
95-
echo "📦 Also creating IPA from: ${APP_PATH}"
96-
97-
mkdir -p build/ios/ipa
98-
mkdir -p Payload
99-
ditto "$APP_PATH" "Payload/Runner.app"
100-
zip -qry "$IPA_PATH" Payload
101-
rm -rf Payload
102-
103-
IPA_RENAMED="lam7a-${COMMIT_TAG}.ipa"
104-
cp "$IPA_PATH" "$IPA_RENAMED"
105-
106-
gh release upload "${RELEASE_TAG}" "$IPA_RENAMED" \
107-
--repo "${OWNER_NAME}/${REPO_NAME}" \
108-
--clobber
109-
110-
echo "✅ Uploaded IPA: ${IPA_RENAMED}"
111-
echo "📊 IPA size: $(du -sh "$IPA_RENAMED" | cut -f1)"
112-
fi
82+
echo "📦 Copying Runner.app with all frameworks..."
83+
ditto "$APP_PATH" "Payload/Runner.app"
84+
85+
echo "🗜️ Creating IPA..."
86+
zip -qry "$IPA_PATH" Payload
87+
rm -rf Payload
88+
89+
echo "✅ IPA created: ${IPA_PATH}"
90+
echo "📊 IPA size: $(du -sh "$IPA_PATH" | cut -f1)"
91+
92+
# Upload IPA
93+
IPA_RENAMED="lam7a-${COMMIT_TAG}.ipa"
94+
cp "$IPA_PATH" "$IPA_RENAMED"
95+
96+
gh release upload "${RELEASE_TAG}" "$IPA_RENAMED" \
97+
--repo "${OWNER_NAME}/${REPO_NAME}" \
98+
--clobber
99+
100+
echo "✅ Uploaded: ${IPA_RENAMED}"
113101
fi

0 commit comments

Comments
 (0)