Integrations
Xcode run script
Build straight from Xcode, without fastlane? One build-phase script keeps every archive's symbols flowing to Pharen. The CLI needs only the dSYM path — debug ids come from the binary, your org and app from the committed .pharen.yml, and auth from PHAREN_AUTH_TOKEN.
Add the phase
In your target, go to Build Phases → + → New Run Script Phase, drag it after “Compile Sources,” and name it something like “Upload dSYMs to Pharen.” Paste:
# Warn, don't fail: a symbol-upload hiccup must not break a developer build.
# In a CI archive lane that requires symbols, use `set -e` and drop the `|| true`.
if [ "${DEBUG_INFORMATION_FORMAT}" = "dwarf-with-dsym" ] && command -v pharen >/dev/null; then
pharen upload-symbols "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" || true
fiInput Files
Add both of these to the phase's Input Files. They let Xcode skip the phase when the dSYM hasn't changed, and they're part of the sandboxing story below:
$(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)
$(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Resources/DWARF/$(PRODUCT_NAME)Xcode 15+ script sandboxing
New projects since Xcode 15 default to ENABLE_USER_SCRIPT_SANDBOXING = YES, which denies run-script phases network access and file access outside their declared lists. A symbol-upload phase needs the network, so under sandboxing it can't run as written. You have two choices:
- Set
ENABLE_USER_SCRIPT_SANDBOXING = NOon the target, or - keep sandboxing on and move symbol upload out of the build — into your CI or archive step (the fastlane plugin, the release lane, or
pharen upload-symbolsas a post-archive step).
Keep the Input Files either way — they still let Xcode skip an unchanged dSYM.
The pharen CLI and your credentials are provided when we onboard your team — see the CLI reference.