react-native-iap 14.5.1-rc.1 → 14.6.0-rc.1
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/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +126 -0
- package/ios/HybridRnIap.swift +24 -0
- package/lib/module/index.js +166 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +58 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/index.d.ts +124 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +71 -0
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +100 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JBillingProgramAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkLaunchModeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JExternalLinkTypeAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +76 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramAvailabilityResultAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroBillingProgramReportingDetailsAndroid.hpp +63 -0
- package/nitrogen/generated/android/c++/JNitroLaunchExternalLinkParamsAndroid.hpp +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/BillingProgramAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkLaunchModeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalLinkTypeAndroid.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +16 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramAvailabilityResultAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroBillingProgramReportingDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLaunchExternalLinkParamsAndroid.kt +45 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +16 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +95 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +48 -0
- package/nitrogen/generated/ios/swift/BillingProgramAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkLaunchModeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/ExternalLinkTypeAndroid.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramAvailabilityResultAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramReportingDetailsAndroid.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +68 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramAvailabilityResultAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroBillingProgramReportingDetailsAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroLaunchExternalLinkParamsAndroid.swift +68 -0
- package/nitrogen/generated/shared/c++/BillingProgramAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkLaunchModeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/ExternalLinkTypeAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +16 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramAvailabilityResultAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroBillingProgramReportingDetailsAndroid.hpp +81 -0
- package/nitrogen/generated/shared/c++/NitroLaunchExternalLinkParamsAndroid.hpp +95 -0
- package/openiap-versions.json +2 -2
- package/package.json +1 -1
- package/src/index.ts +218 -0
- package/src/specs/RnIap.nitro.ts +101 -0
- package/src/types.ts +110 -1
package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramAvailabilityResultAndroid.swift
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_NitroBillingProgramAvailabilityResultAndroid.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_NitroBillingProgramAvailabilityResultAndroid {
|
|
16
|
+
public typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ value: NitroBillingProgramAvailabilityResultAndroid) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(value: NitroBillingProgramAvailabilityResultAndroid) -> Void {
|
|
26
|
+
self.closure(value)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_NitroBillingProgramAvailabilityResultAndroid`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_NitroBillingProgramAvailabilityResultAndroid>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_NitroBillingProgramAvailabilityResultAndroid {
|
|
45
|
+
return Unmanaged<Func_void_NitroBillingProgramAvailabilityResultAndroid>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
package/nitrogen/generated/ios/swift/Func_void_NitroBillingProgramReportingDetailsAndroid.swift
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_NitroBillingProgramReportingDetailsAndroid.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ value: NitroBillingProgramReportingDetailsAndroid) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_NitroBillingProgramReportingDetailsAndroid {
|
|
16
|
+
public typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ value: NitroBillingProgramReportingDetailsAndroid) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ value: NitroBillingProgramReportingDetailsAndroid) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(value: NitroBillingProgramReportingDetailsAndroid) -> Void {
|
|
26
|
+
self.closure(value)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
31
|
+
* This acquires one additional strong reference on the object!
|
|
32
|
+
*/
|
|
33
|
+
@inline(__always)
|
|
34
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
35
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Casts an unsafe pointer to a `Func_void_NitroBillingProgramReportingDetailsAndroid`.
|
|
40
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_NitroBillingProgramReportingDetailsAndroid>`.
|
|
41
|
+
* This removes one strong reference from the object!
|
|
42
|
+
*/
|
|
43
|
+
@inline(__always)
|
|
44
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_NitroBillingProgramReportingDetailsAndroid {
|
|
45
|
+
return Unmanaged<Func_void_NitroBillingProgramReportingDetailsAndroid>.fromOpaque(pointer).takeRetainedValue()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -59,6 +59,10 @@ public protocol HybridRnIapSpec_protocol: HybridObject {
|
|
|
59
59
|
func createAlternativeBillingTokenAndroid(sku: String?) throws -> Promise<String?>
|
|
60
60
|
func addUserChoiceBillingListenerAndroid(listener: @escaping (_ details: UserChoiceBillingDetails) -> Void) throws -> Void
|
|
61
61
|
func removeUserChoiceBillingListenerAndroid(listener: @escaping (_ details: UserChoiceBillingDetails) -> Void) throws -> Void
|
|
62
|
+
func enableBillingProgramAndroid(program: BillingProgramAndroid) throws -> Void
|
|
63
|
+
func isBillingProgramAvailableAndroid(program: BillingProgramAndroid) throws -> Promise<NitroBillingProgramAvailabilityResultAndroid>
|
|
64
|
+
func createBillingProgramReportingDetailsAndroid(program: BillingProgramAndroid) throws -> Promise<NitroBillingProgramReportingDetailsAndroid>
|
|
65
|
+
func launchExternalLinkAndroid(params: NitroLaunchExternalLinkParamsAndroid) throws -> Promise<Bool>
|
|
62
66
|
func canPresentExternalPurchaseNoticeIOS() throws -> Promise<Bool>
|
|
63
67
|
func presentExternalPurchaseNoticeSheetIOS() throws -> Promise<ExternalPurchaseNoticeResultIOS>
|
|
64
68
|
func presentExternalPurchaseLinkIOS(url: String) throws -> Promise<ExternalPurchaseLinkResultIOS>
|
|
@@ -1075,6 +1075,74 @@ open class HybridRnIapSpec_cxx {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
|
|
1078
|
+
@inline(__always)
|
|
1079
|
+
public final func enableBillingProgramAndroid(program: Int32) -> bridge.Result_void_ {
|
|
1080
|
+
do {
|
|
1081
|
+
try self.__implementation.enableBillingProgramAndroid(program: margelo.nitro.iap.BillingProgramAndroid(rawValue: program)!)
|
|
1082
|
+
return bridge.create_Result_void_()
|
|
1083
|
+
} catch (let __error) {
|
|
1084
|
+
let __exceptionPtr = __error.toCpp()
|
|
1085
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
@inline(__always)
|
|
1090
|
+
public final func isBillingProgramAvailableAndroid(program: Int32) -> bridge.Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___ {
|
|
1091
|
+
do {
|
|
1092
|
+
let __result = try self.__implementation.isBillingProgramAvailableAndroid(program: margelo.nitro.iap.BillingProgramAndroid(rawValue: program)!)
|
|
1093
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__ in
|
|
1094
|
+
let __promise = bridge.create_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__()
|
|
1095
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid__(__promise)
|
|
1096
|
+
__result
|
|
1097
|
+
.then({ __result in __promiseHolder.resolve(__result) })
|
|
1098
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
1099
|
+
return __promise
|
|
1100
|
+
}()
|
|
1101
|
+
return bridge.create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(__resultCpp)
|
|
1102
|
+
} catch (let __error) {
|
|
1103
|
+
let __exceptionPtr = __error.toCpp()
|
|
1104
|
+
return bridge.create_Result_std__shared_ptr_Promise_NitroBillingProgramAvailabilityResultAndroid___(__exceptionPtr)
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
@inline(__always)
|
|
1109
|
+
public final func createBillingProgramReportingDetailsAndroid(program: Int32) -> bridge.Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___ {
|
|
1110
|
+
do {
|
|
1111
|
+
let __result = try self.__implementation.createBillingProgramReportingDetailsAndroid(program: margelo.nitro.iap.BillingProgramAndroid(rawValue: program)!)
|
|
1112
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__ in
|
|
1113
|
+
let __promise = bridge.create_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__()
|
|
1114
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid__(__promise)
|
|
1115
|
+
__result
|
|
1116
|
+
.then({ __result in __promiseHolder.resolve(__result) })
|
|
1117
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
1118
|
+
return __promise
|
|
1119
|
+
}()
|
|
1120
|
+
return bridge.create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(__resultCpp)
|
|
1121
|
+
} catch (let __error) {
|
|
1122
|
+
let __exceptionPtr = __error.toCpp()
|
|
1123
|
+
return bridge.create_Result_std__shared_ptr_Promise_NitroBillingProgramReportingDetailsAndroid___(__exceptionPtr)
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
@inline(__always)
|
|
1128
|
+
public final func launchExternalLinkAndroid(params: NitroLaunchExternalLinkParamsAndroid) -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
1129
|
+
do {
|
|
1130
|
+
let __result = try self.__implementation.launchExternalLinkAndroid(params: params)
|
|
1131
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_bool__ in
|
|
1132
|
+
let __promise = bridge.create_std__shared_ptr_Promise_bool__()
|
|
1133
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_bool__(__promise)
|
|
1134
|
+
__result
|
|
1135
|
+
.then({ __result in __promiseHolder.resolve(__result) })
|
|
1136
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
1137
|
+
return __promise
|
|
1138
|
+
}()
|
|
1139
|
+
return bridge.create_Result_std__shared_ptr_Promise_bool___(__resultCpp)
|
|
1140
|
+
} catch (let __error) {
|
|
1141
|
+
let __exceptionPtr = __error.toCpp()
|
|
1142
|
+
return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1078
1146
|
@inline(__always)
|
|
1079
1147
|
public final func canPresentExternalPurchaseNoticeIOS() -> bridge.Result_std__shared_ptr_Promise_bool___ {
|
|
1080
1148
|
do {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroBillingProgramAvailabilityResultAndroid.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroBillingProgramAvailabilityResultAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroBillingProgramAvailabilityResultAndroid = margelo.nitro.iap.NitroBillingProgramAvailabilityResultAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroBillingProgramAvailabilityResultAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroBillingProgramAvailabilityResultAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(billingProgram: BillingProgramAndroid, isAvailable: Bool) {
|
|
22
|
+
self.init(billingProgram, isAvailable)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var billingProgram: BillingProgramAndroid {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__billingProgram
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__billingProgram = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var isAvailable: Bool {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__isAvailable
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__isAvailable = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroBillingProgramReportingDetailsAndroid.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroBillingProgramReportingDetailsAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroBillingProgramReportingDetailsAndroid = margelo.nitro.iap.NitroBillingProgramReportingDetailsAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroBillingProgramReportingDetailsAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroBillingProgramReportingDetailsAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(billingProgram: BillingProgramAndroid, externalTransactionToken: String) {
|
|
22
|
+
self.init(billingProgram, std.string(externalTransactionToken))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var billingProgram: BillingProgramAndroid {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__billingProgram
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__billingProgram = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var externalTransactionToken: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__externalTransactionToken)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__externalTransactionToken = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroLaunchExternalLinkParamsAndroid.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `NitroLaunchExternalLinkParamsAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroLaunchExternalLinkParamsAndroid = margelo.nitro.iap.NitroLaunchExternalLinkParamsAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroLaunchExternalLinkParamsAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroLaunchExternalLinkParamsAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(billingProgram: BillingProgramAndroid, launchMode: ExternalLinkLaunchModeAndroid, linkType: ExternalLinkTypeAndroid, linkUri: String) {
|
|
22
|
+
self.init(billingProgram, launchMode, linkType, std.string(linkUri))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var billingProgram: BillingProgramAndroid {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__billingProgram
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__billingProgram = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var launchMode: ExternalLinkLaunchModeAndroid {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__launchMode
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__launchMode = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var linkType: ExternalLinkTypeAndroid {
|
|
48
|
+
@inline(__always)
|
|
49
|
+
get {
|
|
50
|
+
return self.__linkType
|
|
51
|
+
}
|
|
52
|
+
@inline(__always)
|
|
53
|
+
set {
|
|
54
|
+
self.__linkType = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var linkUri: String {
|
|
59
|
+
@inline(__always)
|
|
60
|
+
get {
|
|
61
|
+
return String(self.__linkUri)
|
|
62
|
+
}
|
|
63
|
+
@inline(__always)
|
|
64
|
+
set {
|
|
65
|
+
self.__linkUri = std.string(newValue)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BillingProgramAndroid.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::iap {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (BillingProgramAndroid).
|
|
30
|
+
*/
|
|
31
|
+
enum class BillingProgramAndroid {
|
|
32
|
+
UNSPECIFIED SWIFT_NAME(unspecified) = 0,
|
|
33
|
+
EXTERNAL_CONTENT_LINK SWIFT_NAME(externalContentLink) = 1,
|
|
34
|
+
EXTERNAL_OFFER SWIFT_NAME(externalOffer) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::iap
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ BillingProgramAndroid <> JS BillingProgramAndroid (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::iap::BillingProgramAndroid> final {
|
|
44
|
+
static inline margelo::nitro::iap::BillingProgramAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("unspecified"): return margelo::nitro::iap::BillingProgramAndroid::UNSPECIFIED;
|
|
48
|
+
case hashString("external-content-link"): return margelo::nitro::iap::BillingProgramAndroid::EXTERNAL_CONTENT_LINK;
|
|
49
|
+
case hashString("external-offer"): return margelo::nitro::iap::BillingProgramAndroid::EXTERNAL_OFFER;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum BillingProgramAndroid - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::iap::BillingProgramAndroid arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::iap::BillingProgramAndroid::UNSPECIFIED: return JSIConverter<std::string>::toJSI(runtime, "unspecified");
|
|
57
|
+
case margelo::nitro::iap::BillingProgramAndroid::EXTERNAL_CONTENT_LINK: return JSIConverter<std::string>::toJSI(runtime, "external-content-link");
|
|
58
|
+
case margelo::nitro::iap::BillingProgramAndroid::EXTERNAL_OFFER: return JSIConverter<std::string>::toJSI(runtime, "external-offer");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert BillingProgramAndroid to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("unspecified"):
|
|
71
|
+
case hashString("external-content-link"):
|
|
72
|
+
case hashString("external-offer"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkLaunchModeAndroid.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::iap {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (ExternalLinkLaunchModeAndroid).
|
|
30
|
+
*/
|
|
31
|
+
enum class ExternalLinkLaunchModeAndroid {
|
|
32
|
+
UNSPECIFIED SWIFT_NAME(unspecified) = 0,
|
|
33
|
+
LAUNCH_IN_EXTERNAL_BROWSER_OR_APP SWIFT_NAME(launchInExternalBrowserOrApp) = 1,
|
|
34
|
+
CALLER_WILL_LAUNCH_LINK SWIFT_NAME(callerWillLaunchLink) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::iap
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ ExternalLinkLaunchModeAndroid <> JS ExternalLinkLaunchModeAndroid (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::iap::ExternalLinkLaunchModeAndroid> final {
|
|
44
|
+
static inline margelo::nitro::iap::ExternalLinkLaunchModeAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("unspecified"): return margelo::nitro::iap::ExternalLinkLaunchModeAndroid::UNSPECIFIED;
|
|
48
|
+
case hashString("launch-in-external-browser-or-app"): return margelo::nitro::iap::ExternalLinkLaunchModeAndroid::LAUNCH_IN_EXTERNAL_BROWSER_OR_APP;
|
|
49
|
+
case hashString("caller-will-launch-link"): return margelo::nitro::iap::ExternalLinkLaunchModeAndroid::CALLER_WILL_LAUNCH_LINK;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum ExternalLinkLaunchModeAndroid - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::iap::ExternalLinkLaunchModeAndroid arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::iap::ExternalLinkLaunchModeAndroid::UNSPECIFIED: return JSIConverter<std::string>::toJSI(runtime, "unspecified");
|
|
57
|
+
case margelo::nitro::iap::ExternalLinkLaunchModeAndroid::LAUNCH_IN_EXTERNAL_BROWSER_OR_APP: return JSIConverter<std::string>::toJSI(runtime, "launch-in-external-browser-or-app");
|
|
58
|
+
case margelo::nitro::iap::ExternalLinkLaunchModeAndroid::CALLER_WILL_LAUNCH_LINK: return JSIConverter<std::string>::toJSI(runtime, "caller-will-launch-link");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert ExternalLinkLaunchModeAndroid to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("unspecified"):
|
|
71
|
+
case hashString("launch-in-external-browser-or-app"):
|
|
72
|
+
case hashString("caller-will-launch-link"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ExternalLinkTypeAndroid.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::iap {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (ExternalLinkTypeAndroid).
|
|
30
|
+
*/
|
|
31
|
+
enum class ExternalLinkTypeAndroid {
|
|
32
|
+
UNSPECIFIED SWIFT_NAME(unspecified) = 0,
|
|
33
|
+
LINK_TO_DIGITAL_CONTENT_OFFER SWIFT_NAME(linkToDigitalContentOffer) = 1,
|
|
34
|
+
LINK_TO_APP_DOWNLOAD SWIFT_NAME(linkToAppDownload) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::iap
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ ExternalLinkTypeAndroid <> JS ExternalLinkTypeAndroid (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::iap::ExternalLinkTypeAndroid> final {
|
|
44
|
+
static inline margelo::nitro::iap::ExternalLinkTypeAndroid fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("unspecified"): return margelo::nitro::iap::ExternalLinkTypeAndroid::UNSPECIFIED;
|
|
48
|
+
case hashString("link-to-digital-content-offer"): return margelo::nitro::iap::ExternalLinkTypeAndroid::LINK_TO_DIGITAL_CONTENT_OFFER;
|
|
49
|
+
case hashString("link-to-app-download"): return margelo::nitro::iap::ExternalLinkTypeAndroid::LINK_TO_APP_DOWNLOAD;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum ExternalLinkTypeAndroid - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::iap::ExternalLinkTypeAndroid arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::iap::ExternalLinkTypeAndroid::UNSPECIFIED: return JSIConverter<std::string>::toJSI(runtime, "unspecified");
|
|
57
|
+
case margelo::nitro::iap::ExternalLinkTypeAndroid::LINK_TO_DIGITAL_CONTENT_OFFER: return JSIConverter<std::string>::toJSI(runtime, "link-to-digital-content-offer");
|
|
58
|
+
case margelo::nitro::iap::ExternalLinkTypeAndroid::LINK_TO_APP_DOWNLOAD: return JSIConverter<std::string>::toJSI(runtime, "link-to-app-download");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert ExternalLinkTypeAndroid to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("unspecified"):
|
|
71
|
+
case hashString("link-to-digital-content-offer"):
|
|
72
|
+
case hashString("link-to-app-download"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -58,6 +58,10 @@ namespace margelo::nitro::iap {
|
|
|
58
58
|
prototype.registerHybridMethod("createAlternativeBillingTokenAndroid", &HybridRnIapSpec::createAlternativeBillingTokenAndroid);
|
|
59
59
|
prototype.registerHybridMethod("addUserChoiceBillingListenerAndroid", &HybridRnIapSpec::addUserChoiceBillingListenerAndroid);
|
|
60
60
|
prototype.registerHybridMethod("removeUserChoiceBillingListenerAndroid", &HybridRnIapSpec::removeUserChoiceBillingListenerAndroid);
|
|
61
|
+
prototype.registerHybridMethod("enableBillingProgramAndroid", &HybridRnIapSpec::enableBillingProgramAndroid);
|
|
62
|
+
prototype.registerHybridMethod("isBillingProgramAvailableAndroid", &HybridRnIapSpec::isBillingProgramAvailableAndroid);
|
|
63
|
+
prototype.registerHybridMethod("createBillingProgramReportingDetailsAndroid", &HybridRnIapSpec::createBillingProgramReportingDetailsAndroid);
|
|
64
|
+
prototype.registerHybridMethod("launchExternalLinkAndroid", &HybridRnIapSpec::launchExternalLinkAndroid);
|
|
61
65
|
prototype.registerHybridMethod("canPresentExternalPurchaseNoticeIOS", &HybridRnIapSpec::canPresentExternalPurchaseNoticeIOS);
|
|
62
66
|
prototype.registerHybridMethod("presentExternalPurchaseNoticeSheetIOS", &HybridRnIapSpec::presentExternalPurchaseNoticeSheetIOS);
|
|
63
67
|
prototype.registerHybridMethod("presentExternalPurchaseLinkIOS", &HybridRnIapSpec::presentExternalPurchaseLinkIOS);
|
|
@@ -49,6 +49,14 @@ namespace margelo::nitro::iap { struct NitroVerifyPurchaseWithProviderProps; }
|
|
|
49
49
|
namespace margelo::nitro::iap { struct NitroDeepLinkOptionsAndroid; }
|
|
50
50
|
// Forward declaration of `UserChoiceBillingDetails` to properly resolve imports.
|
|
51
51
|
namespace margelo::nitro::iap { struct UserChoiceBillingDetails; }
|
|
52
|
+
// Forward declaration of `BillingProgramAndroid` to properly resolve imports.
|
|
53
|
+
namespace margelo::nitro::iap { enum class BillingProgramAndroid; }
|
|
54
|
+
// Forward declaration of `NitroBillingProgramAvailabilityResultAndroid` to properly resolve imports.
|
|
55
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramAvailabilityResultAndroid; }
|
|
56
|
+
// Forward declaration of `NitroBillingProgramReportingDetailsAndroid` to properly resolve imports.
|
|
57
|
+
namespace margelo::nitro::iap { struct NitroBillingProgramReportingDetailsAndroid; }
|
|
58
|
+
// Forward declaration of `NitroLaunchExternalLinkParamsAndroid` to properly resolve imports.
|
|
59
|
+
namespace margelo::nitro::iap { struct NitroLaunchExternalLinkParamsAndroid; }
|
|
52
60
|
// Forward declaration of `ExternalPurchaseNoticeResultIOS` to properly resolve imports.
|
|
53
61
|
namespace margelo::nitro::iap { struct ExternalPurchaseNoticeResultIOS; }
|
|
54
62
|
// Forward declaration of `ExternalPurchaseLinkResultIOS` to properly resolve imports.
|
|
@@ -78,6 +86,10 @@ namespace margelo::nitro::iap { struct ExternalPurchaseLinkResultIOS; }
|
|
|
78
86
|
#include "NitroVerifyPurchaseWithProviderProps.hpp"
|
|
79
87
|
#include "NitroDeepLinkOptionsAndroid.hpp"
|
|
80
88
|
#include "UserChoiceBillingDetails.hpp"
|
|
89
|
+
#include "BillingProgramAndroid.hpp"
|
|
90
|
+
#include "NitroBillingProgramAvailabilityResultAndroid.hpp"
|
|
91
|
+
#include "NitroBillingProgramReportingDetailsAndroid.hpp"
|
|
92
|
+
#include "NitroLaunchExternalLinkParamsAndroid.hpp"
|
|
81
93
|
#include "ExternalPurchaseNoticeResultIOS.hpp"
|
|
82
94
|
#include "ExternalPurchaseLinkResultIOS.hpp"
|
|
83
95
|
|
|
@@ -156,6 +168,10 @@ namespace margelo::nitro::iap {
|
|
|
156
168
|
virtual std::shared_ptr<Promise<std::optional<std::string>>> createAlternativeBillingTokenAndroid(const std::optional<std::string>& sku) = 0;
|
|
157
169
|
virtual void addUserChoiceBillingListenerAndroid(const std::function<void(const UserChoiceBillingDetails& /* details */)>& listener) = 0;
|
|
158
170
|
virtual void removeUserChoiceBillingListenerAndroid(const std::function<void(const UserChoiceBillingDetails& /* details */)>& listener) = 0;
|
|
171
|
+
virtual void enableBillingProgramAndroid(BillingProgramAndroid program) = 0;
|
|
172
|
+
virtual std::shared_ptr<Promise<NitroBillingProgramAvailabilityResultAndroid>> isBillingProgramAvailableAndroid(BillingProgramAndroid program) = 0;
|
|
173
|
+
virtual std::shared_ptr<Promise<NitroBillingProgramReportingDetailsAndroid>> createBillingProgramReportingDetailsAndroid(BillingProgramAndroid program) = 0;
|
|
174
|
+
virtual std::shared_ptr<Promise<bool>> launchExternalLinkAndroid(const NitroLaunchExternalLinkParamsAndroid& params) = 0;
|
|
159
175
|
virtual std::shared_ptr<Promise<bool>> canPresentExternalPurchaseNoticeIOS() = 0;
|
|
160
176
|
virtual std::shared_ptr<Promise<ExternalPurchaseNoticeResultIOS>> presentExternalPurchaseNoticeSheetIOS() = 0;
|
|
161
177
|
virtual std::shared_ptr<Promise<ExternalPurchaseLinkResultIOS>> presentExternalPurchaseLinkIOS(const std::string& url) = 0;
|