설치
Wepin ReactNative Widget SDK를 설치하는 방법을 설명합니다.
요구사항
React Native 버전 0.71.8이상
Android: API 버전 24이상
iOS: 버전 13.0 이상
설치하기
npm 패키지로 설치할 수 있습니다.
npm install @wepin/sdk-rn
peerDependencies
npm install react-native-device-info
# for ios
cd ios
pod install
설정하기
OAuth 로그인 기능을 활성화하려면 딥 링크 스킴(Deep Link Scheme) 을 구성해야 합니다.
딥 링크 스킴 형식(Deep Link scheme format) : wepin. + Your Wepin App ID
Android
build.gradle (app)
파일에서 manifestPlaceholders
를 추가하여 Wepin Widget SDK가 이 커스텀 스킴을 통한 모든 리디렉션을 쉽게 캡처할 수 있도록 설정합니다.
// For Deep Link => RedirectScheme Format : wepin. + Wepin App ID
android.defaultConfig.manifestPlaceholders = [
'appAuthRedirectScheme': 'wepin.{{YOUR_WEPIN_APPID}}'
]
iOS
인증 프로세스 후 앱으로 다시 리디렉션하기 위해 앱의 URL 스킴을 Info.plist
파일에 추가해야 합니다.
<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>
Last updated
Was this helpful?