Skip to content

Guidepoint: Fix - Strip internal build paths from release binaries - #2279

Open
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/strip-internal-build-paths-01
Open

Guidepoint: Fix - Strip internal build paths from release binaries#2279
cmgustavo wants to merge 1 commit into
bitpay:developfrom
cmgustavo:bug/strip-internal-build-paths-01

Conversation

@cmgustavo

Copy link
Copy Markdown
Member

Release iOS/Android binaries embedded absolute build-machine paths and developer usernames (e.g. /Users/<dev>/dev/bitpay-app/...) via __FILE__/#file macro strings and debug info in compiled native code.
Stripping does not remove the macro strings, so add a Clang path-prefix-map that rewrites the repo root to "./" at compile time (computed per-build-machine; nothing absolute committed).

  • ios/Podfile: append -ffile-prefix-map (C/C++/ObjC) and -file-prefix-map (Swift) to all Release pod targets in post_install.
  • android/build.gradle: subprojects block appends -ffile-prefix-map to cppFlags/cFlags on each module's Release CMake build (state.executed guard avoids the already-evaluated react-native-gradle-plugin; Release-only).

Verification:

  • iOS: grep -ra '/Users' Payload/BitPayApp.app | strings | egrep '^/Users/.+/.+' | awk -F/ '{print $3}' | sort -u
  • Android: unzip -p base.apk | strings | grep '/Users/' | sort -u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant