[flutter_tools] simplify symbol logic for iOS (#49628)
This commit is contained in:
@@ -201,30 +201,6 @@ BuildApp() {
|
||||
|
||||
RunCommand cp -r -- "${app_framework}" "${derived_dir}"
|
||||
|
||||
if [[ "${build_mode}" == "release" ]]; then
|
||||
StreamOutput " ├─Generating dSYM file..."
|
||||
# Xcode calls `symbols` during app store upload, which uses Spotlight to
|
||||
# find dSYM files for embedded frameworks. When it finds the dSYM file for
|
||||
# `App.framework` it throws an error, which aborts the app store upload.
|
||||
# To avoid this, we place the dSYM files in a folder ending with ".noindex",
|
||||
# which hides it from Spotlight, https://github.com/flutter/flutter/issues/22560.
|
||||
RunCommand mkdir -p -- "${build_dir}/dSYMs.noindex"
|
||||
RunCommand xcrun dsymutil -o "${build_dir}/dSYMs.noindex/App.framework.dSYM" "${app_framework}/App"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
EchoError "Failed to generate debug symbols (dSYM) file for ${app_framework}/App."
|
||||
exit -1
|
||||
fi
|
||||
StreamOutput "done"
|
||||
|
||||
StreamOutput " ├─Stripping debug symbols..."
|
||||
RunCommand xcrun strip -x -S "${derived_dir}/App.framework/App"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
EchoError "Failed to strip ${derived_dir}/App.framework/App."
|
||||
exit -1
|
||||
fi
|
||||
StreamOutput "done"
|
||||
fi
|
||||
|
||||
else
|
||||
RunCommand mkdir -p -- "${derived_dir}/App.framework"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user