---
title: Unity SDK configuration
description: 'android:name=".MyApp"'
source_url:
  html: 'https://developers.survicate.com/mobile-sdk/unity/configuration/'
  md: 'https://developers.survicate.com/mobile-sdk/unity/configuration.md'
---
# Unity SDK configuration

## Configuration for Android

1. Configure your *workspace key* in `AndroidManifest.xml` file.

```xml title="AndroidManifest.xml"
<application
    android:name=".MyApp"
>
    <!-- ... -->
    <meta-data android:name="com.survicate.surveys.workspaceKey" android:value="YOUR_WORKSPACE_KEY"/>
</application>
```

When using Proguard or R8, add the following rules to your custom Proguard file.

```text
-keep class SurvicateNativeBridgeAndroid { *; }
-keep interface SurvicateNativeEventListener { *; }
```

## Configuration for iOS

Add workspace key to your `Info.plist` file:

- Create `Survicate` *Dictionary*.
- Define `WorkspaceKey` *String* in `Survicate` *Dictionary*.

Your `Info.plist` file should look like this:

![Info.plist example](/ios-infoplist.png)

As an alternative to the main way of specifying the Workspace Key, you can also use the `SetWorkspaceKey()` method.

Important:
* Using `SetWorkspaceKey()` method overrides the Workspace Key defined in the configuration.
* `SetWorkspaceKey()` method must be used before `Initialize()` method is called.

```csharp
using Plugins.Survicate;

Survicate.SetWorkspaceKey('your_workspace_key');
```

## Initialization

Initialize the SDK in your application using `Initialize()` method. Call this method only once, in the main script of your project.

```csharp
using Plugins.Survicate;

Survicate.Initialize();
```
