-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ios] Preserve bcsymbolmap files when using CocoaPods #12257
Conversation
Bitcode symbol map files (`bcsymbolmap`) are used in conjunction with dSYMs to symbolicate crashes. CocoaPods doesn't yet preserve these or add them to an app's `xcarchive`, so the developer needs to do this themselves (typically as an install-only build script phase).
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.
Looks good
For posterity, I should note that, as a vendored framework (that has no CocoaPods-created target), there’s apparently nothing we can reasonably add to our podspec that would automatically copy |
If you were using this podspec and really wanted a copy-paste solution (instead of manually fiddling with build phases in Xcode), you could do this in your app’s target 'YourMainAppTargetName' do
script_phase :name => "Copy bitcode symbol maps into Products directory",
:script => "if [ \"$ACTION\" = \"install\" ]; then mdfind -name .bcsymbolmap -onlyin \"${PODS_ROOT}\" | xargs -I{} cp -v {} \"${CONFIGURATION_BUILD_DIR}\"; fi;",
:execution_position => :after_compile
end This will create a build script phase that searches for |
The CocoaPods team is working on fixing this in 1.7.0 (CocoaPods/CocoaPods#8470), which should eventually obviate the workaround in #12257 (comment). |
@friedbunny , I am using https://github.com/leavez/cocoapods-binary to prebuild my binaries, and I'm having issues with "__hidden" on the obfuscations when I build my app with bitcode. I do happen to do the extra step of saving my bcsymbolmaps in the pods folder with the built framework files, though they don't end up in my final Your comment seems promising for my situation, though I am still surprised #8470 doesn't already do the trick. |
Bitcode symbol map files (
bcsymbolmap
) are used in conjunction with dSYMs to symbolicate crashes. CocoaPods doesn't yet automatically preservebcsymbolmap
files when it is installing vendored pods, so this PR stops CocoaPods from discarding these files.CocoaPods also does not add
bcsymbolmap
files to an app'sxcarchive
, so the developer needs to do this themselves, typically as an install-only build script phase — see #8463 (comment) for general instructions.Related issues
bcsymbolmaps
automatic for all integration methods (or obviate that need).bcsymbolmaps
with our framework downloads./cc @julianrex @1ec5 @akitchen