# Installation

## Installation

Here is how to install the Wepin Unity SDK.

### Download it from Github.

The Wepin Unity SDK is distributed on the [wepin-unity-sdk Github](https://github.com/WepinWallet/wepin-unity-sdk). Download the <mark style="color:blue;">`wepinSDK_vX.X.X.unitypackage`</mark> file and import the package file into your Unity3D project.

If you encounter the following error when importing this package,

```
The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
```

Please add dependency "com.unity.nuget.newtonsoft-json": "3.0.2" Packages/manifest.json file in the project root.

## For iOS

### Modify Info file

In Xcode, you need to register URL Schemes in the Info file.

The value of URL Schemes should be your <mark style="color:blue;">`App Bundle ID + .wepin`</mark>.

<figure><img src="/files/chNud3c7S1OkaxrArtrQ" alt=""><figcaption></figcaption></figure>

## For Android

### Modify AndroidManifest

To use Wepin in your app, you need to modify the AndroidManifest.xml file of your app.

#### Add Permissions

Add the following permission to the main Activity of your app to use Wepin.

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

#### Add Intent Filter for Wepin Activity

You need to add an intent filter for the Wepin activity in your app's AndroidManifest.xml. The schema value you add should be <mark style="color:blue;">`your app's package name + .wepin`</mark>.

```xml
  <activity android:name="com.unity3d.player.UnityPlayerActivity"
    ....
  >
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="PACKAGE_NAME.wepin"/> <!-- package name of your android app + '.wepin' -->
      </intent-filter>            
    ....
  </activity>
```

## Release&#x20;

The released package versions can be found on the GitHub repository below.

{% embed url="<https://github.com/WepinWallet/wepin-unity-sdk>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wepin.io/en/deprecated/unity-sdk/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
