react native의 인앱 구매 기능을 돕는 라이브러리
npm install react-native-iap
npm install 후에는 pod install 해주며 ㄴ된다
안드로이드 스튜디오에서 다음 코드 추가
android/build.gradle
안드로이드 지원을 위해 수정
buildscript {
  ext {
    ...
+   supportLibVersion = "28.0.0"
  }
}
android/build.gradle
안드로이드X를 지원하기 위해 수정
buildscript {
  ext {
    ...
    androidXAnnotation = "1.1.0"
    androidXBrowser = "1.0.0"
    minSdkVersion = 24
    kotlinVersion = "1.5.0"
  }
}
dependencies {
  ...
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
결제
android/app/build.gradle
play store만 지원할 경우
defaultConfig {
  ...
  missingDimensionStrategy "store", "play"
}
amazon도 함꼐 지원할 경우
android {
  ...
+ flavorDimensions "appstore"
+
+ productFlavors {
+   googlePlay {
+     dimension "appstore"
+     missingDimensionStrategy "store", "play"
+   }
+
+   amazon {
+     dimension "appstore"
+     missingDimensionStrategy "store", "amazon"
+   }
+ }
}