# Installation

## Requirements

* iOS 13+
* Swift 5.x

{% 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 %}

#### 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 %}

#### Compatibility with WepinLogin&#x20;

* If you are using this module alongside WepinLogin, please ensure that you are also using **WepinLogin v1.0.0** or higher.&#x20;
* Mixing different major versions of Wepin modules may result in compatibility issues, unexpected errors, or inconsistent behavior.&#x20;
* For a stable integration, always use v1.0.0+ across all Wepin modules together.
* Starting from **WepinPin v1.1.0**, `WepinLogin` is included as a dependency within `WepinPin`.\
  You no longer need to install or import `WepinLogin` separately.

## Installation

WepinPin is available through [CocoaPods](https://cocoapods.org/). To install it, simply add the following line to your Podfile:

```sh
pod 'WepinPin'
```

### 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
```

## Import WepinPin into your project.

```sh
import WepinPin
```

## Release

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

{% embed url="<https://github.com/WepinWallet/wepin-ios-sdk-pin-v1/releases>" %}
