Skip to content

Commit c792bdc

Browse files
committed
fix(cross): fix ios builder
1 parent dcac980 commit c792bdc

2 files changed

Lines changed: 21 additions & 57 deletions

File tree

cross-platform/build.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,15 @@ if [ "$OS_TYPE" = "ubuntu" ]; then
113113
elif [ "$OS_TYPE" = "macos" ]; then
114114
echo "🍎 Building iOS release build..."
115115

116-
# Ensure CocoaPods are properly installed
117-
echo "📦 Running pod install..."
118-
cd ios
119-
pod install --repo-update
120-
cd ..
121-
122-
# Build iOS without codesign - creates Runner.app with all frameworks
116+
# Build iOS without codesign
123117
flutter build ios --release --no-codesign
124118

125119
echo "✅ iOS build complete!"
126-
echo "📊 Build output: $(du -sh build/ios/iphoneos/Runner.app | cut -f1)"
120+
echo "📊 Build output size: $(du -sh build/ios/iphoneos/Runner.app 2>/dev/null | cut -f1 || echo 'N/A')"
121+
122+
# List frameworks to verify
123+
echo "📦 Embedded frameworks:"
124+
ls -1 build/ios/iphoneos/Runner.app/Frameworks/ 2>/dev/null || echo "No Frameworks directory"
127125
fi
128126

129127
echo "🎉 All builds completed successfully!"

cross-platform/deploy.sh

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

5858
elif [[ "$OSTYPE" == "darwin"* ]]; then
59-
# macOS - Debug and create IPA
59+
# macOS - Package Flutter iOS build into IPA
6060

61-
echo "🔍 DEBUG: Checking build directory structure..."
62-
echo "=========================================="
63-
echo "Current directory: $(pwd)"
64-
echo ""
65-
66-
echo "build/ios contents:"
67-
ls -lah build/ios/ 2>/dev/null || echo "build/ios doesn't exist"
68-
echo ""
69-
70-
echo "All .app bundles found:"
71-
find build/ios -name "*.app" -type d 2>/dev/null || echo "No .app found"
72-
echo ""
73-
74-
echo "Checking specific paths:"
75-
echo "build/ios/Release-iphoneos/Runner.app exists? $([ -d "build/ios/Release-iphoneos/Runner.app" ] && echo "YES" || echo "NO")"
76-
echo "build/ios/iphoneos/Runner.app exists? $([ -d "build/ios/iphoneos/Runner.app" ] && echo "YES" || echo "NO")"
77-
echo ""
78-
79-
if [ -d "build/ios/Release-iphoneos/Runner.app" ]; then
80-
echo "Release-iphoneos/Runner.app size: $(du -sh build/ios/Release-iphoneos/Runner.app | cut -f1)"
81-
echo "Frameworks in Release-iphoneos/Runner.app:"
82-
ls -lah build/ios/Release-iphoneos/Runner.app/Frameworks/ 2>/dev/null | head -20
83-
fi
84-
echo ""
85-
86-
if [ -d "build/ios/iphoneos/Runner.app" ]; then
87-
echo "iphoneos/Runner.app size: $(du -sh build/ios/iphoneos/Runner.app | cut -f1)"
88-
echo "Frameworks in iphoneos/Runner.app:"
89-
ls -lah build/ios/iphoneos/Runner.app/Frameworks/ 2>/dev/null | head -20
90-
fi
91-
echo "=========================================="
92-
echo ""
93-
94-
# Use iphoneos path (what flutter build ios creates)
95-
IPA_PATH="build/ios/ipa/lam7a.ipa"
9661
APP_PATH="build/ios/iphoneos/Runner.app"
62+
IPA_PATH="build/ios/ipa/lam7a.ipa"
9763

9864
if [ ! -d "$APP_PATH" ]; then
9965
echo "❌ Runner.app not found at: ${APP_PATH}"
100-
# Try fallback
101-
if [ -d "build/ios/Release-iphoneos/Runner.app" ]; then
102-
APP_PATH="build/ios/Release-iphoneos/Runner.app"
103-
echo "⚠️ Using fallback: Release-iphoneos"
104-
else
105-
echo "❌ No Runner.app found in any location"
106-
exit 1
107-
fi
66+
exit 1
10867
fi
10968

110-
echo ""
111-
echo "✅ Using Release-iphoneos build: ${APP_PATH}"
69+
echo "✅ Found Runner.app: ${APP_PATH}"
11270
echo "📊 Runner.app size: $(du -sh "$APP_PATH" | cut -f1)"
11371

114-
# Check Frameworks directory
72+
# List all frameworks with sizes
11573
if [ -d "$APP_PATH/Frameworks" ]; then
116-
FRAMEWORK_COUNT=$(find "$APP_PATH/Frameworks" -name "*.framework" -type d | wc -l)
117-
echo "📦 Embedded frameworks: ${FRAMEWORK_COUNT}"
74+
echo ""
75+
echo "📦 Embedded frameworks:"
76+
du -sh "$APP_PATH/Frameworks"/*.framework 2>/dev/null | while read size path; do
77+
echo " $size - $(basename "$path")"
78+
done
79+
FRAMEWORK_COUNT=$(find "$APP_PATH/Frameworks" -name "*.framework" -maxdepth 1 -type d | wc -l)
80+
echo " Total: ${FRAMEWORK_COUNT} frameworks"
81+
else
82+
echo "⚠️ No Frameworks directory found!"
11883
fi
84+
echo ""
11985

12086
# Create IPA
12187
mkdir -p build/ios/ipa

0 commit comments

Comments
 (0)