> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavebybemobi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ios

# Usage SDK

## Initialization

First, import the following frameworks to your `AppDelegate` file.

```Swift theme={null}
import FeatureUsage
```

And then, add the following code inside `didFinishLaunchingWithOptions`'s AppDelegate

```Swift theme={null}
Wave.shared.setup(apiKey: "your_api_key")
```

The code above is used to initialize the WaveSDK, you must pass the `api_key`provided by Wave.

Your code will look like this:

```Swift theme={null}
class AppDelegate: NSObject, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        Wave.shared.setup(apiKey: "")
        print("AppDelegate didFinishLaunching")
        return true
    }
}
```

## Usage

You can start using the Usage feature by adding the following code:

First, import the `FeatureUsage`

```Swift theme={null}
import FeatureUsage
```

The Usage Feature is customizable and allows you to choose between two types of charts: semicircular and bar.
To define the chart type when calling the method, use the choosing by the following parameters:

`.bar` or  `.semicircle.`

Therefore, when calling the `HomeUsageView()` component, you must insert the selected chart.

```Swift theme={null}
HomeUsageView(externalCode: "your_external_code", chartType: .semicircle)
```

With this, the Wave Usage feature will already be integrated into your application.
