Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contents/docs/error-tracking/_snippets/cli/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm install -g @posthog/cli

```bash file=Curl

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/PostHog/posthog/releases/latest/download/posthog-cli-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://download.posthog.com/cli | sh
posthog-cli-update

```
Expand Down
35 changes: 16 additions & 19 deletions contents/docs/error-tracking/upload-source-maps/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ title: Upload dSYMs for iOS
showStepsToc: true
---

import CLIDownload from "../_snippets/cli/download.mdx"
import CLIAuthenticate from "../_snippets/cli/authenticate.mdx"
import StepVerifySymbolSetsUpload from '../_snippets/StepVerifySymbolSetsUpload'
import CLIDownload from "../_snippets/cli/download.mdx";
import CLIAuthenticate from "../_snippets/cli/authenticate.mdx";
import StepVerifySymbolSetsUpload from "../_snippets/StepVerifySymbolSetsUpload";

<CalloutBox icon="IconInfo" title="CLI version requirement" type="action">

Expand All @@ -17,7 +17,7 @@ A minimum CLI version of [0.7.7](https://github.com/PostHog/posthog/releases/tag

<Step title="Download CLI" badge="required">

<CLIDownload/>
<CLIDownload />

</Step>

Expand All @@ -38,10 +38,10 @@ In Xcode, configure your build settings to generate dSYMs:
5. Make sure Release configurations have **DWARF with dSYM File**

<ProductScreenshot
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/DWARF_and_d_SYM_xcode_settings_light_f6a8bb74c3.png"
imageDark="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/DWARF_and_d_SYM_xcode_settings_7b2c628b52.png"
alt="Xcode dSYM setting"
classes="rounded"
imageLight="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/DWARF_and_d_SYM_xcode_settings_light_f6a8bb74c3.png"
imageDark="https://res.cloudinary.com/dmukukwp6/image/upload/q_auto,f_auto/DWARF_and_d_SYM_xcode_settings_7b2c628b52.png"
alt="Xcode dSYM setting"
classes="rounded"
/>

<CalloutBox icon="IconWarning" title="Disable User Script Sandboxing" type="action">
Expand All @@ -53,10 +53,9 @@ You must disable User Script Sandboxing for the upload script to work:

**Why is this required?**

When User Script Sandboxing is enabled, Xcode only allows run scripts to access files explicitly specified in the build phase's **Input Files**.
When User Script Sandboxing is enabled, Xcode only allows run scripts to access files explicitly specified in the build phase's **Input Files**.
The dSYM upload script needs to walk directories to locate and read dSYM bundles, and execute `posthog-cli` which are currently not allowed with User Script Sandboxing enabled.


</CalloutBox>

</Step>
Expand Down Expand Up @@ -102,7 +101,6 @@ By default, only debug symbols are uploaded. To include source code snippets in
1. In the Run Script build phase, click the chevron to expand
2. Set the **environment Variable** when calling the upload script:


<MultiLanguage>

```bash file=Swift Package Manager
Expand Down Expand Up @@ -154,18 +152,18 @@ view.addSubview(button)

</MultiLanguage>

2. Build and run your app in Xcode,
- Make sure the debugger is not attached, since it will intercept the crash and prevent the report from being collected. You can:
- Detach the debugger (click the stop button in Xcode) and run the app directly from the device/simulator home screen
- Or uncheck "Debug executable" in the scheme settings before running
2. Build and run your app in Xcode,
- Make sure the debugger is not attached, since it will intercept the crash and prevent the report from being collected. You can:
- Detach the debugger (click the stop button in Xcode) and run the app directly from the device/simulator home screen
- Or uncheck "Debug executable" in the scheme settings before running

3. Reopen the app from your device or simulator's home screen (not from Xcode).

4. Tap the **Test Crash** button. The app will crash. The exception is collected but **not yet sent** to PostHog.

5. Reopen the app once more. This triggers the SDK to send the previously collected crash report to PostHog.

6. Check the [error tracking dashboard](https://us.posthog.com/error_tracking) for your test crash.
6. Check the [error tracking dashboard](https://app.posthog.com/error_tracking) for your test crash.

<CalloutBox icon="IconInfo" type="info">

Expand All @@ -190,8 +188,7 @@ Install the CLI using one of these methods:
npm install -g @posthog/cli

# Or download binary
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/PostHog/posthog/releases/latest/download/posthog-cli-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://download.posthog.com/cli | sh
```

### Script fails with permission errors
Expand All @@ -204,4 +201,4 @@ Verify that `DEBUG_INFORMATION_FORMAT` is set to **DWARF with dSYM File** for th

### Script fails with "content_hash_mismatch"

This happens when the upload script runs before Xcode finishes generating the dSYM files. Leave **Based on dependency analysis** enabled and add `$(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Resources/DWARF/$(EXECUTABLE_NAME)` to the **Input Files** of the Run Script build phase. This makes Xcode wait for the app's dSYM contents before running the upload script.
This happens when the upload script runs before Xcode finishes generating the dSYM files. Leave **Based on dependency analysis** enabled and add `$(DWARF_DSYM_FOLDER_PATH)/$(DWARF_DSYM_FILE_NAME)/Contents/Resources/DWARF/$(EXECUTABLE_NAME)` to the **Input Files** of the Run Script build phase. This makes Xcode wait for the app's dSYM contents before running the upload script.
Loading