@virex-tech/paywallo-sdk 2.2.4 → 2.2.6
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/android/build.gradle +5 -3
- package/android/src/main/java/com/paywallo/sdk/PaywalloEnvModule.kt +31 -0
- package/android/src/main/java/com/paywallo/sdk/PaywalloFirebaseMessagingService.kt +33 -5
- package/android/src/main/java/com/paywallo/sdk/PaywalloNotificationsModule.kt +47 -30
- package/android/src/main/java/com/paywallo/sdk/PaywalloSdkPackage.kt +2 -1
- package/android/src/main/java/com/paywallo/sdk/PaywalloStoreKitModule.kt +7 -3
- package/android/src/main/java/com/paywallo/sdk/PaywalloWebViewEvent.kt +4 -2
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +628 -266
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +618 -257
- package/dist/index.mjs.map +1 -1
- package/ios/PaywalloEnv.m +8 -0
- package/ios/PaywalloEnv.swift +28 -0
- package/package.json +2 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
@objc(PaywalloEnv)
|
|
4
|
+
class PaywalloEnv: NSObject {
|
|
5
|
+
|
|
6
|
+
@objc static func requiresMainQueueSetup() -> Bool { return false }
|
|
7
|
+
|
|
8
|
+
// MARK: - Detect Environment
|
|
9
|
+
|
|
10
|
+
@objc
|
|
11
|
+
func detect(
|
|
12
|
+
_ resolve: @escaping RCTPromiseResolveBlock,
|
|
13
|
+
rejecter reject: @escaping RCTPromiseRejectBlock
|
|
14
|
+
) {
|
|
15
|
+
// Primary signal: presence of embedded.mobileprovision (absent in App Store builds)
|
|
16
|
+
let hasMobileProvision = Bundle.main.url(forResource: "embedded", withExtension: "mobileprovision") != nil
|
|
17
|
+
|
|
18
|
+
// Secondary signal: sandbox receipt URL (present in TestFlight/Simulator)
|
|
19
|
+
let receiptURL = Bundle.main.appStoreReceiptURL
|
|
20
|
+
let hasSandboxReceipt = receiptURL?.lastPathComponent == "sandboxReceipt"
|
|
21
|
+
|
|
22
|
+
if hasMobileProvision || hasSandboxReceipt {
|
|
23
|
+
resolve("sandbox")
|
|
24
|
+
} else {
|
|
25
|
+
resolve("production")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virex-tech/paywallo-sdk",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "SDK React Native para integração com Paywallo - Paywalls, Subscriptions e Analytics",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
92
92
|
"eslint-plugin-unused-imports": "^4.0.0",
|
|
93
93
|
"prettier": "^3.0.0",
|
|
94
|
+
"react-native": "^0.81.4",
|
|
94
95
|
"tsup": "^8.0.0",
|
|
95
96
|
"typescript": "^5.0.0",
|
|
96
97
|
"typescript-eslint": "^8.0.0",
|