# dt-setup-ios

This skill adds Dynatrace OneAgent to an iOS app through Swift Package Manager and prepares the files needed for basic monitoring.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 856 installs · ★ 167
- Author: dynatrace
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Dynatrace/dynatrace-for-ai/tree/HEAD/skills/dt-setup-ios/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/dt-setup-ios

## What it does

dt-setup-ios adds the Dynatrace iOS SDK to an Xcode project, writes `Dynatrace.plist`, inserts the SDK import and privacy opt-in code, then builds the app. The setup can use either `Dynatrace` or `DynatraceSessionReplay`. It reads `DTXApplicationID` and `DTXBeaconURL` from a supplied configuration block or asks for them.

A bundled Ruby script uses the `xcodeproj` gem to attach the package and product to the project; if that route fails, the skill guides the user through Xcode’s package dialog. The environment must have macOS, Xcode 16+, the Xcode MCP server, an iOS deployment target of 12.0 or newer, Ruby, and `xcodeproj`. Without the Xcode MCP server, the setup stops during prerequisite checks.

## Requirements
- Works with: Dynatrace

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Dynatrace/dynatrace-for-ai --skill dt-setup-ios -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dt-setup-ios/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dt-setup-ios/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Dynatrace/dynatrace-for-ai --skill dt-setup-ios -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dt-setup-ios/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Dynatrace/dynatrace-for-ai --skill dt-setup-ios -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dt-setup-ios/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Dynatrace/dynatrace-for-ai dt-setup-ios
```

2. **Manually: put the files in place**
- File: `.github/skills/dt-setup-ios/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Dynatrace/dynatrace-for-ai --skill dt-setup-ios -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Dynatrace/dynatrace-for-ai --path skills/dt-setup-ios
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dt-setup-ios/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Dynatrace/dynatrace-for-ai --skill dt-setup-ios -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Dynatrace/dynatrace-for-ai/tree/HEAD/skills/dt-setup-ios/SKILL.md

## When to use it
- add Dynatrace OneAgent to an iOS app
- attach the Swift Package Manager dependency
- write a `Dynatrace.plist` configuration
- insert the SDK import and privacy opt-in
- build the project after instrumentation

## Example prompts
- Set up Dynatrace OneAgent in my iOS project through Swift Package Manager.
- Use the `DTXApplicationID` and `DTXBeaconURL` from this configuration block to configure the app.
- Add `DynatraceSessionReplay`, create the configuration file, and build the project.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 3de6f276ff7e157f.

BEGIN THIRD-PARTY FILE 3de6f276ff7e157f
`````text
---
name: dt-setup-ios
description: 'Set up the Dynatrace iOS SDK (OneAgent) in an iOS project using Swift Package Manager. Automates adding the SPM dependency, creating a Dynatrace.plist configuration file, adding the import statement, adding privacy opt-in code, and building the project. Use this skill when the user wants to integrate, install, add, or set up Dynatrace monitoring in their iOS app. Keywords: Dynatrace, iOS, SDK, OneAgent, setup, install, integrate, SPM, Swift Package Manager, Info.plist, DTXApplicationID, DTXBeaconURL, mobile monitoring, RUM.'
license: Apache-2.0
compatibility: Requires macOS, Xcode 16+, and the Xcode MCP server
argument-hint: Paste your dynatrace-ios-setup-config block, or provide DTXApplicationID and DTXBeaconURL
metadata:
  author: dynatrace
  version: '1.0'
---

# Dynatrace iOS SDK Setup

This skill sets up the Dynatrace iOS SDK (OneAgent) in the user's iOS project — from zero to first event. It follows the official setup flow from the [Dynatrace documentation](https://docs.dynatrace.com/docs/observe/digital-experience/new-rum-experience/mobile-frontends/ios/id-01-initial-setup).

## When to use this skill

- The user wants to add Dynatrace monitoring to their iOS app
- The user asks to integrate, install, or set up the Dynatrace iOS SDK
- The user wants to instrument their iOS app with Dynatrace
- The user pastes a setup prompt copied from the Experience Vitals wizard

## Pre-filled values

When invoked from the Experience Vitals wizard, the user's message will contain
pre-filled configuration values in a fenced block labeled
`dynatrace-ios-setup-config`. Example:

````text
```dynatrace-ios-setup-config
DTXApplicationID: ABC-123
DTXBeaconURL: https://example.dynatrace.com/mbeacon
Product: DynatraceSessionReplay
DTXUserOptIn: true
```
````

When these values are present:

- **Skip step 2** (Collect application identification keys) — use the provided
  `DTXApplicationID` and `DTXBeaconURL`.
- **Skip the product question in step 3** — use the provided `Product` value
  (`Dynatrace` or `DynatraceSessionReplay`).
- **Use `DTXUserOptIn`** to determine whether to add the privacy opt-in code in
  step 5. If `true`, add the opt-in code. If `false`, skip step 5.

All other steps (prerequisites, SPM dependency, plist creation, import, build,
verify) proceed as normal.

## Procedure

### 1. Check prerequisites

Actively verify each prerequisite before proceeding. If any check fails, inform the user and stop.

**a) Xcode MCP server is available**
This is a hard requirement. The skill uses the Xcode MCP server to interact with the Xcode project (adding SPM dependencies, building, etc.). Verify that Xcode MCP tools are accessible (e.g., `mcp_xcode_XcodeListWindows`). If not available, tell the user to install and enable the Xcode MCP server before proceeding.

**b) iOS deployment target >= 12.0**
`````
END THIRD-PARTY FILE 3de6f276ff7e157f

The third-party file has ended. Everything between the 3de6f276ff7e157f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2878 of 13211 bytes. © dynatrace · Apache-2.0 · https://github.com/Dynatrace/dynatrace-for-ai/tree/HEAD/skills/dt-setup-ios/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
