fix(ios): make build-ios.sh work on current simulators and trim xcodebuild noise
Use generic/platform=iOS Simulator instead of a fixed device name so CLI builds do not fail when that simulator is not installed (e.g. newer Xcode runtimes). Pass -quiet to xcodebuild and enable SWIFT_SUPPRESS_WARNINGS plus GCC_WARN_INHIBIT_ALL_WARNINGS for scripted builds and IPA archive/export so terminal output stays smaller; full diagnostics remain available in Xcode.
This commit is contained in:
@@ -222,7 +222,8 @@ build_ios_app() {
|
|||||||
|
|
||||||
if [ "$BUILD_TYPE" = "debug" ]; then
|
if [ "$BUILD_TYPE" = "debug" ]; then
|
||||||
build_config="Debug"
|
build_config="Debug"
|
||||||
destination="platform=iOS Simulator,name=iPhone 15 Pro"
|
# Any Simulator — avoids hardcoding a device name (e.g. iPhone 15 Pro) that may not exist in newer Xcode runtimes
|
||||||
|
destination="generic/platform=iOS Simulator"
|
||||||
else
|
else
|
||||||
build_config="Release"
|
build_config="Release"
|
||||||
destination="platform=iOS,id=auto"
|
destination="platform=iOS,id=auto"
|
||||||
@@ -232,15 +233,21 @@ build_ios_app() {
|
|||||||
|
|
||||||
cd ios/App
|
cd ios/App
|
||||||
|
|
||||||
# Build the app
|
# Build the app:
|
||||||
xcodebuild -workspace App.xcworkspace \
|
# -quiet: skip the huge export VAR dump (compiler warnings still show unless suppressed below).
|
||||||
|
# SWIFT_SUPPRESS_WARNINGS / GCC_WARN_INHIBIT_ALL_WARNINGS: quiet CLI output from Pods + plugins;
|
||||||
|
# build in Xcode for full diagnostics. Real errors still fail the build.
|
||||||
|
xcodebuild -quiet \
|
||||||
|
-workspace App.xcworkspace \
|
||||||
-scheme "$scheme" \
|
-scheme "$scheme" \
|
||||||
-configuration "$build_config" \
|
-configuration "$build_config" \
|
||||||
-destination "$destination" \
|
-destination "$destination" \
|
||||||
build \
|
build \
|
||||||
CODE_SIGN_IDENTITY="" \
|
CODE_SIGN_IDENTITY="" \
|
||||||
CODE_SIGNING_REQUIRED=NO \
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
CODE_SIGNING_ALLOWED=NO
|
CODE_SIGNING_ALLOWED=NO \
|
||||||
|
SWIFT_SUPPRESS_WARNINGS=YES \
|
||||||
|
GCC_WARN_INHIBIT_ALL_WARNINGS=YES
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
@@ -564,16 +571,19 @@ safe_execute "Building iOS app" "build_ios_app" || exit 5
|
|||||||
if [ "$BUILD_IPA" = true ]; then
|
if [ "$BUILD_IPA" = true ]; then
|
||||||
log_info "Building IPA package..."
|
log_info "Building IPA package..."
|
||||||
cd ios/App
|
cd ios/App
|
||||||
xcodebuild -workspace App.xcworkspace \
|
xcodebuild -quiet \
|
||||||
|
-workspace App.xcworkspace \
|
||||||
-scheme App \
|
-scheme App \
|
||||||
-configuration Release \
|
-configuration Release \
|
||||||
-archivePath build/App.xcarchive \
|
-archivePath build/App.xcarchive \
|
||||||
archive \
|
archive \
|
||||||
CODE_SIGN_IDENTITY="" \
|
CODE_SIGN_IDENTITY="" \
|
||||||
CODE_SIGNING_REQUIRED=NO \
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
CODE_SIGNING_ALLOWED=NO
|
CODE_SIGNING_ALLOWED=NO \
|
||||||
|
SWIFT_SUPPRESS_WARNINGS=YES \
|
||||||
|
GCC_WARN_INHIBIT_ALL_WARNINGS=YES
|
||||||
|
|
||||||
xcodebuild -exportArchive \
|
xcodebuild -quiet -exportArchive \
|
||||||
-archivePath build/App.xcarchive \
|
-archivePath build/App.xcarchive \
|
||||||
-exportPath build/ \
|
-exportPath build/ \
|
||||||
-exportOptionsPlist exportOptions.plist
|
-exportOptionsPlist exportOptions.plist
|
||||||
|
|||||||
Reference in New Issue
Block a user