> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/en/widget-integration/react-native-sdk/login-library/installation.md).

# Installation

## Requirements

* React Native version 0.71.8 or higher'
* **Android:** API version <mark style="color:blue;">**23**</mark> or higher
* **iOS:** Version <mark style="color:blue;">**12.0**</mark> or higher

{% hint style="info" %}
This package is only available for **Android** and **iOS** environments. It is not supported on **Web**, **macOS**, **Windows**, or **Linux** environments.
{% endhint %}

{% hint style="info" %}
Note: Only relevant if you installed before v1.0.0.

The v1.0.0 update includes important changes that may affect app behavior, particularly related to local storage keys. If you’re updating from a version prior to v1.0.0, please review the following changes carefully.
{% endhint %}

{% hint style="warning" %}
New Architecture is not supported yet
{% endhint %}

#### Storage Migration Notice (from v1.0.0)

* Starting from v1.0.0, changes to the storage key system may cause previously stored data to become inaccessible.
* If the existing key is determined to be invalid, stored data will be automatically reset and a new key will be generated.
* If the key is valid, your data will remain unchanged.
* Downgrading from v1.0.0 to an earlier version may result in loss of access to previously stored data.

{% hint style="info" %}
We strongly recommend backing up important data before updating to avoid potential issues.
{% endhint %}

#### How to Disable Backup (Android)

Modify your AndroidManifest.xml file:

```xml
<application
    android:allowBackup="false"
    android:fullBackupContent="false">
```

If android:allowBackup is true, the migration process may not work correctly, leading to potential data loss or storage issues.

## Installation

It can be installed as an npm package.

{% tabs %}
{% tab title="npm" %}

```bash
npm install @wepin/login-rn
```

{% endtab %}

{% tab title="yarn" %}

```bash
yarn add @wepin/login-rn
```

{% endtab %}
{% endtabs %}

### peerDependencies

```bash
npm install react-native-device-info

# for ios
cd ios
pod install
```

or

```bash
yarn add react-native-device-info

# for ios
cd ios 
pod install
```

### react-native.config.js Setting

You need to set the path for `@wepin/storage-rn` in the `react-native.config.js` file.

```javascript
const path = require('path');
module.exports = {
  dependencies: {
    '@wepin/storage-rn': {
      root: path.join(__dirname, './node_modules/@wepin/storage-rn'),
    },
  },
};
```

#### iOS Podfile Configuration

Build errors may occur when using Xcode 26.0.1 or later versions.&#x20;

> error Unable to find module dependency: 'bcrypt' (in target 'WepinLogin' from project 'Pods')&#x20;

If you encounter the above error, please add the following code to your Podfile.

```
post_install do |installer|
  installer.pods_project.targets.each do |target| 
    target.build_configurations.each do |config| 
      config.build_settings['SWIFT_ENABLE_EXPLICIT_MODULES'] = 'NO' 
    end 
  end 
end
```
