react-native-iap 8.2.2 → 9.0.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/RNIap.podspec +5 -0
- package/android/build.gradle +3 -3
- package/android/src/amazon/java/com/dooboolab/RNIap/RNIapAmazonListener.kt +16 -4
- package/android/src/play/java/com/dooboolab/RNIap/RNIapModule.kt +199 -144
- package/android/src/play/java/com/dooboolab/RNIap/RNIapModuleInterface.kt +44 -0
- package/android/src/play/java/com/dooboolab/RNIap/RNIapModuleV4.kt +656 -0
- package/android/src/play/java/com/dooboolab/RNIap/RNIapPackage.kt +1 -0
- package/android/src/testPlay/java/com/dooboolab/RNIap/{RNIapModuleTest.kt → RNIapModuleTestV4.kt} +30 -10
- package/ios/RNIapIos.m +1 -0
- package/ios/RNIapIos.swift +3 -1
- package/ios/RNIapQueue.swift +4 -3
- package/package.json +1 -1
- package/src/hooks/useIAP.d.ts +1 -0
- package/src/hooks/useIAP.js +2 -1
- package/src/hooks/withIAPContext.d.ts +1 -0
- package/src/hooks/withIAPContext.js +9 -1
- package/src/iap.d.ts +2 -1
- package/src/iap.js +49 -27
- package/src/types/index.d.ts +24 -2
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/RNIap.podspec
CHANGED
|
@@ -11,6 +11,11 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.platforms = { :ios => "9.0", :tvos => "9.0" }
|
|
12
12
|
s.source = { :git => "https://github.com/dooboolab/react-native-iap.git", :tag => "#{s.version}" }
|
|
13
13
|
s.source_files = "ios/*.{h,m,swift}"
|
|
14
|
+
s.script_phase = {
|
|
15
|
+
:name => 'Copy Swift Header',
|
|
16
|
+
:script => 'ditto "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h" "${PODS_ROOT}/Headers/Public/${PRODUCT_MODULE_NAME}/${PRODUCT_MODULE_NAME}-Swift.h"',
|
|
17
|
+
:execution_position => :after_compile
|
|
18
|
+
}
|
|
14
19
|
s.swift_version = "4.2"
|
|
15
20
|
s.requires_arc = true
|
|
16
21
|
|
package/android/build.gradle
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
buildscript {
|
|
2
|
-
ext.DEFAULT_KOTLIN_VERSION = '1.
|
|
2
|
+
ext.DEFAULT_KOTLIN_VERSION = '1.7.10'
|
|
3
3
|
ext.safeExtGet={prop, fallback->
|
|
4
4
|
return rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
5
|
}
|
|
@@ -23,7 +23,7 @@ def DEFAULT_COMPILE_SDK_VERSION = 30
|
|
|
23
23
|
def DEFAULT_BUILD_TOOLS_VERSION = "30.0.2"
|
|
24
24
|
def DEFAULT_MIN_SDK_VERSION = 16
|
|
25
25
|
def DEFAULT_TARGET_SDK_VERSION = 30
|
|
26
|
-
def DEFAULT_PLAY_SERVICES_VERSION = "
|
|
26
|
+
def DEFAULT_PLAY_SERVICES_VERSION = "18.1.0"
|
|
27
27
|
|
|
28
28
|
android {
|
|
29
29
|
compileSdkVersion safeExtGet("compileSdkVersion", DEFAULT_COMPILE_SDK_VERSION)
|
|
@@ -68,7 +68,7 @@ dependencies {
|
|
|
68
68
|
implementation 'com.facebook.react:react-native:+'
|
|
69
69
|
testImplementation 'junit:junit:4.13.1'
|
|
70
70
|
testImplementation "io.mockk:mockk:1.12.4"
|
|
71
|
-
playImplementation 'com.android.billingclient:billing:
|
|
71
|
+
playImplementation 'com.android.billingclient:billing:5.0.0'
|
|
72
72
|
def playServicesVersion = safeExtGet('playServicesVersion', DEFAULT_PLAY_SERVICES_VERSION)
|
|
73
73
|
playImplementation "com.google.android.gms:play-services-base:$playServicesVersion"
|
|
74
74
|
amazonImplementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
@@ -245,7 +245,10 @@ class RNIapAmazonListener(private val reactContext: ReactContext) : PurchasingLi
|
|
|
245
245
|
sendEvent(reactContext, "purchase-error", error)
|
|
246
246
|
DoobooUtils.instance
|
|
247
247
|
.rejectPromisesForKey(
|
|
248
|
-
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
248
|
+
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
249
|
+
errorCode,
|
|
250
|
+
debugMessage,
|
|
251
|
+
null
|
|
249
252
|
)
|
|
250
253
|
}
|
|
251
254
|
PurchaseResponse.RequestStatus.FAILED -> {
|
|
@@ -259,7 +262,10 @@ class RNIapAmazonListener(private val reactContext: ReactContext) : PurchasingLi
|
|
|
259
262
|
sendEvent(reactContext, "purchase-error", error)
|
|
260
263
|
DoobooUtils.instance
|
|
261
264
|
.rejectPromisesForKey(
|
|
262
|
-
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
265
|
+
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
266
|
+
errorCode,
|
|
267
|
+
debugMessage,
|
|
268
|
+
null
|
|
263
269
|
)
|
|
264
270
|
}
|
|
265
271
|
PurchaseResponse.RequestStatus.INVALID_SKU -> {
|
|
@@ -272,7 +278,10 @@ class RNIapAmazonListener(private val reactContext: ReactContext) : PurchasingLi
|
|
|
272
278
|
sendEvent(reactContext, "purchase-error", error)
|
|
273
279
|
DoobooUtils.instance
|
|
274
280
|
.rejectPromisesForKey(
|
|
275
|
-
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
281
|
+
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
282
|
+
errorCode,
|
|
283
|
+
debugMessage,
|
|
284
|
+
null
|
|
276
285
|
)
|
|
277
286
|
}
|
|
278
287
|
PurchaseResponse.RequestStatus.NOT_SUPPORTED -> {
|
|
@@ -285,7 +294,10 @@ class RNIapAmazonListener(private val reactContext: ReactContext) : PurchasingLi
|
|
|
285
294
|
sendEvent(reactContext, "purchase-error", error)
|
|
286
295
|
DoobooUtils.instance
|
|
287
296
|
.rejectPromisesForKey(
|
|
288
|
-
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
297
|
+
RNIapAmazonModule.Companion.PROMISE_BUY_ITEM,
|
|
298
|
+
errorCode,
|
|
299
|
+
debugMessage,
|
|
300
|
+
null
|
|
289
301
|
)
|
|
290
302
|
}
|
|
291
303
|
}
|