react-native-iap 14.1.1-rc.1 → 14.2.0
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/NitroIap.podspec +2 -0
- package/README.md +9 -9
- package/android/build.gradle +2 -1
- package/android/consumer-rules.pro +7 -0
- package/app.plugin.js +1 -1
- package/ios/HybridRnIap.swift +380 -1192
- package/lib/module/helpers/subscription.js.map +1 -1
- package/lib/module/hooks/useIAP.js +74 -58
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +20 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +8 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/error.js.map +1 -1
- package/lib/module/utils/errorMapping.js +33 -0
- package/lib/module/utils/errorMapping.js.map +1 -0
- package/lib/module/utils/type-bridge.js +19 -0
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/helpers/subscription.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useIAP.d.ts +4 -4
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +7 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +19 -0
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/error.d.ts.map +1 -1
- package/lib/typescript/src/utils/errorMapping.d.ts +5 -0
- package/lib/typescript/src/utils/errorMapping.d.ts.map +1 -0
- package/lib/typescript/src/utils/type-bridge.d.ts +3 -2
- package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -1
- package/package.json +5 -2
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/src/helpers/subscription.ts +30 -30
- package/src/hooks/useIAP.ts +252 -230
- package/src/index.ts +366 -340
- package/src/types.ts +21 -0
- package/src/utils/error.ts +19 -19
- package/src/utils/errorMapping.ts +44 -0
- package/src/utils/type-bridge.ts +127 -93
- package/ios/ErrorUtils.swift +0 -153
- package/ios/ProductStore.swift +0 -43
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/plugin/build/src/withIAP.d.ts +0 -3
- package/plugin/build/src/withIAP.js +0 -81
- package/plugin/build/tsconfig.tsbuildinfo +0 -1
package/NitroIap.podspec
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# React Native IAP
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
|
-
<img src="https://react-native-iap
|
|
4
|
+
<img src="https://hyochan.github.io/react-native-iap/img/icon.png" alt="React Native IAP Logo" width="150" />
|
|
5
5
|
|
|
6
6
|
[](https://npmjs.org/package/react-native-iap)
|
|
7
7
|
[](https://npmjs.org/package/react-native-iap)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
## 📚 Documentation
|
|
19
19
|
|
|
20
|
-
**[📖 Visit our comprehensive documentation site →](https://react-native-iap
|
|
20
|
+
**[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/react-native-iap)**
|
|
21
21
|
|
|
22
22
|
## ⚠️ Notice
|
|
23
23
|
|
|
@@ -43,7 +43,7 @@ npm install react-native-iap react-native-nitro-modules
|
|
|
43
43
|
yarn add react-native-iap react-native-nitro-modules
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
**[📖 See the complete installation guide and quick start tutorial →](https://react-native-iap
|
|
46
|
+
**[📖 See the complete installation guide and quick start tutorial →](https://hyochan.github.io/react-native-iap/docs/installation)**
|
|
47
47
|
|
|
48
48
|
## 🏗️ Architecture
|
|
49
49
|
|
|
@@ -154,15 +154,15 @@ React Native IAP is **OpenIAP compliant**. For detailed store configuration:
|
|
|
154
154
|
|
|
155
155
|
## 🎯 What's Next?
|
|
156
156
|
|
|
157
|
-
**[📖 Visit our comprehensive documentation site →](https://react-native-iap
|
|
157
|
+
**[📖 Visit our comprehensive documentation site →](https://hyochan.github.io/react-native-iap)**
|
|
158
158
|
|
|
159
159
|
### Key Resources
|
|
160
160
|
|
|
161
|
-
- **[Installation & Quick Start](https://react-native-iap
|
|
162
|
-
- **[API Reference](https://react-native-iap
|
|
163
|
-
- **[Examples](https://react-native-iap
|
|
164
|
-
- **[Error Handling](https://react-native-iap
|
|
165
|
-
- **[Troubleshooting](https://react-native-iap
|
|
161
|
+
- **[Installation & Quick Start](https://hyochan.github.io/react-native-iap/docs/installation)** - Get started in minutes
|
|
162
|
+
- **[API Reference](https://hyochan.github.io/react-native-iap/docs/api)** - Complete useIAP hook documentation
|
|
163
|
+
- **[Examples](https://hyochan.github.io/react-native-iap/docs/examples/basic-store)** - Production-ready implementations
|
|
164
|
+
- **[Error Handling](https://hyochan.github.io/react-native-iap/docs/api/error-codes)** - OpenIAP compliant error codes
|
|
165
|
+
- **[Troubleshooting](https://hyochan.github.io/react-native-iap/docs/guides/troubleshooting)** - Common issues and solutions
|
|
166
166
|
|
|
167
167
|
## Sponsors
|
|
168
168
|
|
package/android/build.gradle
CHANGED
|
@@ -57,6 +57,8 @@ android {
|
|
|
57
57
|
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
58
58
|
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
59
59
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
60
|
+
// Ship consumer keep rules so Nitro HybridObjects aren't stripped in app release builds
|
|
61
|
+
consumerProguardFiles 'consumer-rules.pro'
|
|
60
62
|
|
|
61
63
|
externalNativeBuild {
|
|
62
64
|
cmake {
|
|
@@ -162,4 +164,3 @@ dependencies {
|
|
|
162
164
|
configurations.all {
|
|
163
165
|
exclude group: 'com.facebook.react', module: 'react-native-safe-area-context'
|
|
164
166
|
}
|
|
165
|
-
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Keep Nitro IAP HybridObject and related generated classes so R8 doesn't strip
|
|
2
|
+
# them in consumer apps' release builds.
|
|
3
|
+
-keep class com.margelo.nitro.iap.** { *; }
|
|
4
|
+
|
|
5
|
+
# Optional broader safety for Nitro core wrappers if referenced reflectively.
|
|
6
|
+
# Uncomment if needed in downstream apps.
|
|
7
|
+
# -keep class com.margelo.nitro.modules.** { *; }
|
package/app.plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./plugin/build/withIAP.js')
|
|
1
|
+
module.exports = require('./plugin/build/withIAP.js')
|