Hide App.framework.dSYM from Spotlight#22540
Conversation
When Xcode uploads an app to the App Store it invokes `symbols` to generate debug information for embedded frameworks. `symbols` uses Spotlight to find dSYM files for the framework binaries (`mdfind "com_apple_xcode_dsym_uuids == <uuid of framework>"`) and for some reason it exits with an error code (bug?) if it finds a dSYM file. The error exit code causes the app store upload to fail. This change hides the dSYM file from Xcode by placing it in a folder ending with `.noindex`.
chinmaygarde
left a comment
There was a problem hiding this comment.
What a straightforward patch for completely intuitive behavior! LGTM.
|
|
||
| StreamOutput " ├─Generating dSYM file..." | ||
| RunCommand xcrun dsymutil -o "${build_dir}/aot/App.dSYM" "${app_framework}/App" | ||
| # Placing dSYMs in a folder ending with ".noindex" so xcode cannot find them |
|
Have we filed a radar with Apple? :) I find it hard to imagine this is intentional behavior. |
| # Placing dSYMs in a folder ending with ".noindex" so Xcode cannot find them | ||
| # via Spotlight and get confused when uploading an App to the App Store. | ||
| mkdir "${build_dir}/dSYMs.noindex" | ||
| RunCommand xcrun dsymutil -o "${build_dir}/dSYMs.noindex/App.framework.dSYM" "${app_framework}/App" |
There was a problem hiding this comment.
totally nit-picking: The comment here is confusing to me. It's not a complete sentence. s/Placing/Place/ would fix the grammar, but I think it might be best to phrase the thing backwards: "Xcode uses Spotlight to find files when uploading them to the App store, and gets confused if it finds dSYM files when doing so. To avoid this, we place the dSYM files in a folder ending with ".noindex", which disables spotlight. See: <link to radar>"
There was a problem hiding this comment.
Maybe even more specifically:
Xcode uses Spotlight metadata to locate (by GUID) the dSYM associated with each framework embedded in the app to be uploaded to the App Store. If the dSYM cannot be found, the upload fails with an error when 'upload with symbols' is set. To hide the dSYM from spotlight, we place it in a directory ending in '.noindex', which disables spotlight.
For the radar, search on openradar first, then file one and copy-paste into openradar if you can't find one.
|
|
When Xcode uploads an app to the App Store it invokes
symbolsto generate debug information for embedded frameworks.symbolsuses Spotlight to find dSYM files for the framework binaries (mdfind "com_apple_xcode_dsym_uuids == <uuid of framework>") and for some reason it exits with an error code (bug?) if it finds a dSYM file. The error exit code causes the app store upload to fail.This change hides the dSYM file from Xcode by placing it in a folder ending with
.noindex.