← Files BugfenderARCHIVED FILE

skills/bugfender-sdk-setup/references/ionic.md

930 Bytes · Nov 30, 2026 · 07:41 UTC

↓ Download file

# Ionic

Use this reference after detecting an Ionic app, especially one backed by Capacitor.

## Detect

Check:

- `ionic.config.json`
- `capacitor.config.*`
- `src/main.ts`

## Minimum setup

Install:

```bash
npm install @bugfender/capacitor @bugfender/sdk @bugfender/common
npx cap sync
```

Initialize in `main.ts`:

```ts
import { Bugfender } from "@bugfender/capacitor";

Bugfender.init({
  appKey: "{APP_KEY}",
  baseURL: "{BASE_URL}",
  apiURL: "{SDK_API_URL}",
});
```

Only include `baseURL` and `apiURL` when custom non-default URLs are provided.

## Integration points

- dependency file: `package.json`
- Capacitor sync step: `npx cap sync`
- bootstrap: `src/main.ts`

## Optional capabilities

- Browser/UI logging, error handling, and platform-specific options should follow the chosen feature set.

## Verification

After init resolves, log one startup message:

```ts
Bugfender.log("Bugfender initialized");
```

SHA-256: a386ead773a0e06244a492d1508c9e7c55bbc29ea7e0ab98ee66af1eafc20573