Skip to content

Conversation

@ioannisj
Copy link
Collaborator

💡 Motivation and Context

Adds upload symbols script to be added as an Xcode build phase script

Assumes posthog-cli command from PostHog/posthog#43195

posthog-cli exp dsym upload \
    --directory <path>           # Directory containing dSYM bundles (required)
    --main-dsym <filename>       # Main target's dSYM name (optional)
    --project <bundle_id>        # App bundle identifier (optional)
    --version <version>          # Marketing version e.g. "3.12.3" (optional)
    --build <build_number>       # Build number e.g. "424" (optional)

#skip-changelog

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@@ -0,0 +1,84 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

we should call this with a .sh extension (and give chmod +x permission if not yet)

exit 0
fi

# Find posthog-cli (Xcode doesn't load shell profiles)
Copy link
Member

@marandaneto marandaneto Dec 16, 2025

Choose a reason for hiding this comment

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

are we matching the react native one here?

Comment on lines +73 to +82
# Pass version info from Xcode build settings (overrides plist extraction)
if [ -n "${PRODUCT_BUNDLE_IDENTIFIER}" ]; then
CLI_ARGS="$CLI_ARGS --project $PRODUCT_BUNDLE_IDENTIFIER"
fi
if [ -n "${MARKETING_VERSION}" ]; then
CLI_ARGS="$CLI_ARGS --version $MARKETING_VERSION"
fi
if [ -n "${CURRENT_PROJECT_VERSION}" ]; then
CLI_ARGS="$CLI_ARGS --build $CURRENT_PROJECT_VERSION"
fi
Copy link
Member

Choose a reason for hiding this comment

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

we dont do this for the other platforms yet, but we should of course
just wondering if we are passing the right values here since i know the cli used different naming for things such as --project, is that the app namespace? why is it called project?

Comment on lines +68 to +71
# Pass main target dSYM name for accurate version extraction
if [ -n "${DWARF_DSYM_FILE_NAME}" ]; then
CLI_ARGS="$CLI_ARGS --main-dsym $DWARF_DSYM_FILE_NAME"
fi
Copy link
Member

Choose a reason for hiding this comment

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

why do we have directory and main-dsym params? why do we have a special main-dsym cmd?

CLI_ARGS="$CLI_ARGS --main-dsym $DWARF_DSYM_FILE_NAME"
fi

# Pass version info from Xcode build settings (overrides plist extraction)
Copy link
Member

Choose a reason for hiding this comment

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

why do we need this if the CLI seems to be parsing the info plist already?

Base automatically changed from feat/error-tracking-manual-capture to feat/error-tracking December 23, 2025 09:27
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.

3 participants