Skip to content
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

Copy bcsymbolmap files to build products folder when archiving #2759

Merged
merged 2 commits into from
Nov 9, 2015

Conversation

kishikawakatsumi
Copy link
Contributor

*.bcsymbolmap files are necessary to submit an app with including debug symbols. If there are no those files, following error occurs unless uncheck "include app symbols ..."

untitled

The archive did not contain 
<DVTFilePath:0x7f91ea526720:'...xcarchive/BCSymbolMaps/....bcsymbolmap'> as expected.

This PR makes it include the *.bcsymbolmap files to the each framework bundles. Those files are moved to an app bundle when archiving.

See also:
Missing BCSymbolMap for AppStore Submission - Xcode7B5

/cc @jpsim @mrackwitz

@@ -111,6 +111,14 @@ xcrealmswift() {
xc "-project $PROJECT $@"
}

copy_bcsymbolmap() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just be find "$1" -name '*.bcsymbolmap' -type f -exec cp {} "$2" \;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks.

echo "Copy .bcsymbolmap files to .xcarchive"
mv Realm.framework/*.bcsymbolmap RealmSwift.framework/*.bcsymbolmap "${CONFIGURATION_BUILD_DIR}"
else
# Delete *.bcsymbolmap files from framework bundle unless archiving
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this says archiving, but above you're checking for "$ACTION" = "install". Are those actually the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ACTION variable is to be build, clean, install, installhdrs, and installsrc. I confirmed the variable will be install when archiving.

https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW45

@jpsim
Copy link
Contributor

jpsim commented Nov 3, 2015

Out of curiosity, how much larger does this make the binaries?

@kishikawakatsumi
Copy link
Contributor Author

@jpsim The size of each symbol files is 350KB for Realm and 150KB for RealmSwift.
For iOS has two architecture(armv7, arm64) and for OS X has no bitcode.
So total size of raw files is around 1.4MB. The symbol files are plain text files. So well compressed.

Compressed total size is around 200KB.

kishikawakatsumi and others added 2 commits November 5, 2015 11:12
1. Copy bcsymbolmap files to framework bundle
2. Move bcsymbolmap files from bundle to xcarchive whenever archiving
@jpsim jpsim force-pushed the kk-bitcode-symbolmap branch from fda411d to 7cc31db Compare November 5, 2015 19:22

if [ "$ACTION" = "install" ]; then
echo "Copy .bcsymbolmap files to .xcarchive"
find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kishikawakatsumi I've generalized this so strip-frameworks.sh works for any framework, like the rest of this script. Could you please test this?

@jpsim
Copy link
Contributor

jpsim commented Nov 5, 2015

@kishikawakatsumi feel free to merge this once you've confirmed that my latest change is correct.

@kishikawakatsumi
Copy link
Contributor Author

@jpsim Thanks. I've confirmed/tested to work if other frameworks contain bcsymbolmap files in its bundle.

kishikawakatsumi added a commit that referenced this pull request Nov 9, 2015
Copy bcsymbolmap files to build products folder when archiving
@kishikawakatsumi kishikawakatsumi merged commit ecf1229 into master Nov 9, 2015
@kishikawakatsumi kishikawakatsumi deleted the kk-bitcode-symbolmap branch November 9, 2015 04:50
@jpsim jpsim mentioned this pull request Dec 4, 2015
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Dec 14, 2015
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Dec 21, 2015
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Dec 23, 2015
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Jan 6, 2016
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Jan 20, 2016
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Jan 22, 2016
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
1ec5 added a commit to mapbox/mapbox-gl-native that referenced this pull request Jan 22, 2016
Copied strip-frameworks.sh from realm/realm-swift@7cc31db for realm/realm-swift#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants