-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Hide App.framework.dSYM from Spotlight #22540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a straightforward patch for completely intuitive behavior! LGTM.
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Nicely done!
|
|
||
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uber-nit: s/xcode/Xcode/
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.