> 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/widget-integration/ios-swift-sdk/login-library/installation.md).

# 설치

## 요구사항 <a href="#requirements" id="requirements"></a>

* iOS 13+
* Swift 5.x
* Xcode 16+

{% hint style="info" %}
참고: v1.0.0 이전 버전에서 설치한 경우에만 확인해주세요.\
v1.0.0 업데이트에는 저장소 키 변경 등 앱 동작에 영향을 줄 수 있는 중요한 변경사항이 포함되어 있습니다. v1.0.0 이전 버전을 사용 중이었다면, 다음 변경 사항을 반드시 먼저 확인해주세요.
{% endhint %}

#### 저장소 마이그레이션 안내 (v1.0.0 기준) <a href="#storage-migration-notice-from-v1.0.0" id="storage-migration-notice-from-v1.0.0"></a>

* v1.0.0부터 저장소 키 변경 정책이 적용되어, 기존 저장된 데이터에 접근할 수 없는 경우가 발생할 수 있습니다.
* &#x20;키가 유효하지 않은 경우에 한해, 기존 저장 데이터는 자동으로 초기화되고 새 키가 생성됩니다.
* 키가 정상적으로 유지되는 경우, 기존 데이터는 그대로 유지됩니다.
* v1.0.0 이후 버전에서 이전 버전으로 다운그레이드할 경우, 기존 데이터에 접근하지 못할 수 있습니다.

{% hint style="info" %}
업데이트 전에 잠재적인 문제를 방지하기 위해 데이터를 백업해두는 것을 추천드립니다.
{% endhint %}

## 설치하기 <a href="#installation" id="installation"></a>

WepinLogin은 CocoaPods를 통해 사용할 수 있습니다. 설치하려면 Podfile에 다음 줄을 추가하시면 됩니다.

```
pod 'WepinLogin'
```

> ⚠️ **Notice** - Resolution for Build Errors
>
> WepinLogin 라이브러리를 빌드할 때 다음과 같은 오류가 발생할 수 있습니다:
>
> `SDK does not contain 'libarclite' at the path '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; try increasing the minimum deployment target`
>
> 이 오류는 secp256k1 라이브러리의 "최소 배포 대상" 설정을 변경하여 해결할 수 있습니다. secp256k1 라이브러리 프로젝트의 "최소 배포 대상" 설정을 Xcode에서 지원하는 iOS 버전으로 업데이트하십시오. 이렇게 하면 발생하고 있는 빌드 오류가 해결될 것입니다.

## 프로젝트에 WepinLogin 추가하기 <a href="#import-wepinlogin-into-your-project" id="import-wepinlogin-into-your-project"></a>

```sh
import WepinLogin
```

## Info.plist 설정 <a href="#setting-info.plist" id="setting-info.plist"></a>

앱의 URL 스킴을 Info.plist 파일에 추가해야 합니다. 이는 인증 과정이 끝난 후 앱으로 리다이렉션되기 위해 필요합니다.

#### Url scheme format : <mark style="color:blue;">`wepin. + Your Wepin App ID`</mark>

```
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <string>Editor</string>
  			<key>CFBundleURLName</key>
  			<string>unique name</string>
        <array>
            <string>wepin + your Wepin app id</string>
        </array>
    </dict>
</array>
```

## Podfile 설정

Xcode 26.0.1 이상 버전 사용 시 빌드 에러가 발생할 수 있습니다.

> error Unable to find module dependency: 'bcrypt' (in tarrget 'WepinLogin' from project 'Pods')

위와 같은 에러가 발생하는 경우 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
```

## Release

릴리즈된 패키지 버전은 아래 깃허브에서 확인 가능합니다.

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