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.
Files changed (46) hide show
  1. package/NitroIap.podspec +2 -0
  2. package/README.md +9 -9
  3. package/android/build.gradle +2 -1
  4. package/android/consumer-rules.pro +7 -0
  5. package/app.plugin.js +1 -1
  6. package/ios/HybridRnIap.swift +380 -1192
  7. package/lib/module/helpers/subscription.js.map +1 -1
  8. package/lib/module/hooks/useIAP.js +74 -58
  9. package/lib/module/hooks/useIAP.js.map +1 -1
  10. package/lib/module/index.js +20 -3
  11. package/lib/module/index.js.map +1 -1
  12. package/lib/module/types.js +8 -0
  13. package/lib/module/types.js.map +1 -1
  14. package/lib/module/utils/error.js.map +1 -1
  15. package/lib/module/utils/errorMapping.js +33 -0
  16. package/lib/module/utils/errorMapping.js.map +1 -0
  17. package/lib/module/utils/type-bridge.js +19 -0
  18. package/lib/module/utils/type-bridge.js.map +1 -1
  19. package/lib/typescript/src/helpers/subscription.d.ts.map +1 -1
  20. package/lib/typescript/src/hooks/useIAP.d.ts +4 -4
  21. package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
  22. package/lib/typescript/src/index.d.ts +7 -3
  23. package/lib/typescript/src/index.d.ts.map +1 -1
  24. package/lib/typescript/src/types.d.ts +19 -0
  25. package/lib/typescript/src/types.d.ts.map +1 -1
  26. package/lib/typescript/src/utils/error.d.ts.map +1 -1
  27. package/lib/typescript/src/utils/errorMapping.d.ts +5 -0
  28. package/lib/typescript/src/utils/errorMapping.d.ts.map +1 -0
  29. package/lib/typescript/src/utils/type-bridge.d.ts +3 -2
  30. package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -1
  31. package/package.json +5 -2
  32. package/plugin/tsconfig.tsbuildinfo +1 -1
  33. package/src/helpers/subscription.ts +30 -30
  34. package/src/hooks/useIAP.ts +252 -230
  35. package/src/index.ts +366 -340
  36. package/src/types.ts +21 -0
  37. package/src/utils/error.ts +19 -19
  38. package/src/utils/errorMapping.ts +44 -0
  39. package/src/utils/type-bridge.ts +127 -93
  40. package/ios/ErrorUtils.swift +0 -153
  41. package/ios/ProductStore.swift +0 -43
  42. package/ios/reactnativeiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  43. package/ios/reactnativeiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  44. package/plugin/build/src/withIAP.d.ts +0 -3
  45. package/plugin/build/src/withIAP.js +0 -81
  46. package/plugin/build/tsconfig.tsbuildinfo +0 -1
package/NitroIap.podspec CHANGED
@@ -28,6 +28,8 @@ Pod::Spec.new do |s|
28
28
  s.dependency 'React-Core'
29
29
  s.dependency 'React-jsi'
30
30
  s.dependency 'React-callinvoker'
31
+ # OpenIAP Apple for StoreKit 2 integration
32
+ s.dependency 'openiap', '~> 1.1.8'
31
33
 
32
34
  install_modules_dependencies(s)
33
35
  end
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.hyo.dev/img/icon.png" alt="React Native IAP Logo" width="150" />
4
+ <img src="https://hyochan.github.io/react-native-iap/img/icon.png" alt="React Native IAP Logo" width="150" />
5
5
 
6
6
  [![Version](http://img.shields.io/npm/v/react-native-iap.svg?style=flat-square)](https://npmjs.org/package/react-native-iap)
7
7
  [![Next Version](https://img.shields.io/npm/v/react-native-iap/next)](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.hyo.dev)**
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.hyo.dev/docs/installation)**
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.hyo.dev)**
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.hyo.dev/docs/installation)** - Get started in minutes
162
- - **[API Reference](https://react-native-iap.hyo.dev/docs/api)** - Complete useIAP hook documentation
163
- - **[Examples](https://react-native-iap.hyo.dev/docs/examples/basic-store)** - Production-ready implementations
164
- - **[Error Handling](https://react-native-iap.hyo.dev/docs/api/error-codes)** - OpenIAP compliant error codes
165
- - **[Troubleshooting](https://react-native-iap.hyo.dev/docs/guides/troubleshooting)** - Common issues and solutions
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
 
@@ -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')