react-native-acoustic-connect-beta 18.0.17 → 18.0.19
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/Examples/SampleUI/ios/Podfile +13 -0
- package/Examples/SampleUI/ios/Podfile.lock +2276 -0
- package/Examples/SampleUI/package.json +1 -1
- package/README.md +1 -1
- package/android/build.gradle +6 -11
- package/android/config.gradle +18 -1
- package/android/src/main/assets/ConnectAdvancedConfig.json +1 -1
- package/android/src/main/assets/EOCoreAdvancedConfig.json +1 -1
- package/android/src/main/assets/TealeafAdvancedConfig.json +1 -1
- package/android/src/main/cpp/cpp-adapter.cpp +4 -1
- package/android/src/main/java/com/acousticconnectrn/HybridAcousticConnectRN.kt +17 -16
- package/ios/HybridAcousticConnectRN.swift +34 -30
- package/lib/commonjs/components/Connect.js +2 -1
- package/lib/commonjs/components/Connect.js.map +1 -1
- package/lib/module/components/Connect.js +2 -1
- package/lib/module/components/Connect.js.map +1 -1
- package/lib/typescript/src/components/Connect.d.ts.map +1 -1
- package/nitrogen/generated/.gitattributes +1 -1
- package/nitrogen/generated/android/AcousticConnectRN+autolinking.cmake +10 -5
- package/nitrogen/generated/android/AcousticConnectRN+autolinking.gradle +1 -1
- package/nitrogen/generated/android/AcousticConnectRNOnLoad.cpp +27 -19
- package/nitrogen/generated/android/AcousticConnectRNOnLoad.hpp +14 -5
- package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.cpp +70 -55
- package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.hpp +28 -27
- package/nitrogen/generated/android/c++/JVariant_Boolean_String_Double.cpp +30 -0
- package/nitrogen/generated/android/c++/JVariant_Boolean_String_Double.hpp +83 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_String.hpp +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/AcousticConnectRNOnLoad.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/HybridAcousticConnectRNSpec.kt +27 -24
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/Variant_Boolean_String_Double.kt +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/Variant_NullType_String.kt +62 -0
- package/nitrogen/generated/ios/AcousticConnectRN+autolinking.rb +4 -2
- package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Bridge.cpp +7 -6
- package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Bridge.hpp +86 -47
- package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Umbrella.hpp +4 -2
- package/nitrogen/generated/ios/AcousticConnectRNAutolinking.mm +2 -2
- package/nitrogen/generated/ios/AcousticConnectRNAutolinking.swift +11 -10
- package/nitrogen/generated/ios/c++/HybridAcousticConnectRNSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridAcousticConnectRNSpecSwift.hpp +22 -10
- package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec.swift +20 -13
- package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec_cxx.swift +159 -63
- package/nitrogen/generated/ios/swift/Variant_Bool_String_Double.swift +32 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_String.swift +30 -0
- package/nitrogen/generated/shared/c++/HybridAcousticConnectRNSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridAcousticConnectRNSpec.hpp +10 -9
- package/package.json +5 -5
- package/scripts/ConnectConfig.json +1 -1
- package/scripts/gradleParser.js +5 -6
- package/scripts/postInstallScripts.sh +0 -1
- package/scripts/xmlparser.js +4 -5
- package/src/components/Connect.tsx +2 -1
- package/nitrogen/generated/android/c++/JVariant_String_Double_Boolean.hpp +0 -98
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/Variant_String_Double_Boolean.kt +0 -49
- package/nitrogen/generated/ios/swift/Variant_String_Double_Bool.swift +0 -17
- package/scripts/javaParser.js +0 -183
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridAcousticConnectRNSpec.kt
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
package com.margelo.nitro.acousticconnectrn
|
|
@@ -10,7 +10,8 @@ package com.margelo.nitro.acousticconnectrn
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.jni.HybridData
|
|
12
12
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
-
import com.margelo.nitro.core
|
|
13
|
+
import com.margelo.nitro.core.NullType
|
|
14
|
+
import com.margelo.nitro.core.HybridObject
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* A Kotlin class representing the AcousticConnectRN HybridObject.
|
|
@@ -24,18 +25,6 @@ import com.margelo.nitro.core.*
|
|
|
24
25
|
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
25
26
|
)
|
|
26
27
|
abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
27
|
-
@DoNotStrip
|
|
28
|
-
private var mHybridData: HybridData = initHybrid()
|
|
29
|
-
|
|
30
|
-
init {
|
|
31
|
-
super.updateNative(mHybridData)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override fun updateNative(hybridData: HybridData) {
|
|
35
|
-
mHybridData = hybridData
|
|
36
|
-
super.updateNative(hybridData)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
28
|
// Properties
|
|
40
29
|
|
|
41
30
|
|
|
@@ -54,7 +43,7 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
54
43
|
|
|
55
44
|
@DoNotStrip
|
|
56
45
|
@Keep
|
|
57
|
-
abstract fun setConfigItemForKey(key: String, value:
|
|
46
|
+
abstract fun setConfigItemForKey(key: String, value: Variant_Boolean_String_Double, moduleName: String): Boolean
|
|
58
47
|
|
|
59
48
|
@DoNotStrip
|
|
60
49
|
@Keep
|
|
@@ -62,7 +51,7 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
62
51
|
|
|
63
52
|
@DoNotStrip
|
|
64
53
|
@Keep
|
|
65
|
-
abstract fun getStringItemForKey(theDefault: String, key: String, moduleName: String):
|
|
54
|
+
abstract fun getStringItemForKey(theDefault: String, key: String, moduleName: String): Variant_NullType_String?
|
|
66
55
|
|
|
67
56
|
@DoNotStrip
|
|
68
57
|
@Keep
|
|
@@ -70,11 +59,11 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
70
59
|
|
|
71
60
|
@DoNotStrip
|
|
72
61
|
@Keep
|
|
73
|
-
abstract fun logCustomEvent(eventName: String, values: Map<String,
|
|
62
|
+
abstract fun logCustomEvent(eventName: String, values: Map<String, Variant_Boolean_String_Double>, level: Double): Boolean
|
|
74
63
|
|
|
75
64
|
@DoNotStrip
|
|
76
65
|
@Keep
|
|
77
|
-
abstract fun logSignal(values: Map<String,
|
|
66
|
+
abstract fun logSignal(values: Map<String, Variant_Boolean_String_Double>, level: Double): Boolean
|
|
78
67
|
|
|
79
68
|
@DoNotStrip
|
|
80
69
|
@Keep
|
|
@@ -94,7 +83,7 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
94
83
|
|
|
95
84
|
@DoNotStrip
|
|
96
85
|
@Keep
|
|
97
|
-
abstract fun logTextChangeEvent(target: Double, controlId: String, text:
|
|
86
|
+
abstract fun logTextChangeEvent(target: Double, controlId: String, text: Variant_NullType_String?): Boolean
|
|
98
87
|
|
|
99
88
|
@DoNotStrip
|
|
100
89
|
@Keep
|
|
@@ -102,11 +91,11 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
102
91
|
|
|
103
92
|
@DoNotStrip
|
|
104
93
|
@Keep
|
|
105
|
-
abstract fun logScreenViewContextLoad(logicalPageName:
|
|
94
|
+
abstract fun logScreenViewContextLoad(logicalPageName: Variant_NullType_String?, referrer: Variant_NullType_String?): Boolean
|
|
106
95
|
|
|
107
96
|
@DoNotStrip
|
|
108
97
|
@Keep
|
|
109
|
-
abstract fun logScreenViewContextUnload(logicalPageName:
|
|
98
|
+
abstract fun logScreenViewContextUnload(logicalPageName: Variant_NullType_String?, referrer: Variant_NullType_String?): Boolean
|
|
110
99
|
|
|
111
100
|
@DoNotStrip
|
|
112
101
|
@Keep
|
|
@@ -126,11 +115,25 @@ abstract class HybridAcousticConnectRNSpec: HybridObject() {
|
|
|
126
115
|
|
|
127
116
|
@DoNotStrip
|
|
128
117
|
@Keep
|
|
129
|
-
abstract fun logDialogCustomEvent(dialogId: String, eventName: String, values: Map<String,
|
|
118
|
+
abstract fun logDialogCustomEvent(dialogId: String, eventName: String, values: Map<String, Variant_Boolean_String_Double>): Boolean
|
|
130
119
|
|
|
131
|
-
|
|
120
|
+
// Default implementation of `HybridObject.toString()`
|
|
121
|
+
override fun toString(): String {
|
|
122
|
+
return "[HybridObject AcousticConnectRN]"
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// C++ backing class
|
|
126
|
+
@DoNotStrip
|
|
127
|
+
@Keep
|
|
128
|
+
protected open class CxxPart(javaPart: HybridAcousticConnectRNSpec): HybridObject.CxxPart(javaPart) {
|
|
129
|
+
// C++ JHybridAcousticConnectRNSpec::CxxPart::initHybrid(...)
|
|
130
|
+
external override fun initHybrid(): HybridData
|
|
131
|
+
}
|
|
132
|
+
override fun createCxxPart(): CxxPart {
|
|
133
|
+
return CxxPart(this)
|
|
134
|
+
}
|
|
132
135
|
|
|
133
136
|
companion object {
|
|
134
|
-
|
|
137
|
+
protected const val TAG = "HybridAcousticConnectRNSpec"
|
|
135
138
|
}
|
|
136
139
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_Boolean_String_Double.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.acousticconnectrn
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "Boolean | String | Double".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_Boolean_String_Double {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: Boolean): Variant_Boolean_String_Double()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: String): Variant_Boolean_String_Double()
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
data class Third(@DoNotStrip val value: Double): Variant_Boolean_String_Double()
|
|
25
|
+
|
|
26
|
+
inline fun <reified T> asType(): T? {
|
|
27
|
+
return when (this) {
|
|
28
|
+
is First -> (value) as? T
|
|
29
|
+
is Second -> (value) as? T
|
|
30
|
+
is Third -> (value) as? T
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
inline fun <reified T> isType(): Boolean {
|
|
34
|
+
return asType<T>() != null
|
|
35
|
+
}
|
|
36
|
+
inline fun <R> match(first: (Boolean) -> R, second: (String) -> R, third: (Double) -> R): R {
|
|
37
|
+
return when (this) {
|
|
38
|
+
is First -> first(value)
|
|
39
|
+
is Second -> second(value)
|
|
40
|
+
is Third -> third(value)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
val isFirst: Boolean
|
|
45
|
+
get() = this is First
|
|
46
|
+
val isSecond: Boolean
|
|
47
|
+
get() = this is Second
|
|
48
|
+
val isThird: Boolean
|
|
49
|
+
get() = this is Third
|
|
50
|
+
|
|
51
|
+
fun asFirstOrNull(): Boolean? {
|
|
52
|
+
val value = (this as? First)?.value ?: return null
|
|
53
|
+
return value
|
|
54
|
+
}
|
|
55
|
+
fun asSecondOrNull(): String? {
|
|
56
|
+
val value = (this as? Second)?.value ?: return null
|
|
57
|
+
return value
|
|
58
|
+
}
|
|
59
|
+
fun asThirdOrNull(): Double? {
|
|
60
|
+
val value = (this as? Third)?.value ?: return null
|
|
61
|
+
return value
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
companion object {
|
|
65
|
+
@JvmStatic
|
|
66
|
+
@DoNotStrip
|
|
67
|
+
fun create(value: Boolean): Variant_Boolean_String_Double = First(value)
|
|
68
|
+
@JvmStatic
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
fun create(value: String): Variant_Boolean_String_Double = Second(value)
|
|
71
|
+
@JvmStatic
|
|
72
|
+
@DoNotStrip
|
|
73
|
+
fun create(value: Double): Variant_Boolean_String_Double = Third(value)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_String.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.acousticconnectrn
|
|
9
|
+
|
|
10
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
11
|
+
import com.margelo.nitro.core.NullType
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Represents the TypeScript variant "NullType | String".
|
|
15
|
+
*/
|
|
16
|
+
@Suppress("ClassName")
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
sealed class Variant_NullType_String {
|
|
19
|
+
@DoNotStrip
|
|
20
|
+
data class First(@DoNotStrip val value: NullType): Variant_NullType_String()
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
data class Second(@DoNotStrip val value: String): Variant_NullType_String()
|
|
23
|
+
|
|
24
|
+
inline fun <reified T> asType(): T? {
|
|
25
|
+
return when (this) {
|
|
26
|
+
is First -> (value) as? T
|
|
27
|
+
is Second -> (value) as? T
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
inline fun <reified T> isType(): Boolean {
|
|
31
|
+
return asType<T>() != null
|
|
32
|
+
}
|
|
33
|
+
inline fun <R> match(first: (NullType) -> R, second: (String) -> R): R {
|
|
34
|
+
return when (this) {
|
|
35
|
+
is First -> first(value)
|
|
36
|
+
is Second -> second(value)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
val isFirst: Boolean
|
|
41
|
+
get() = this is First
|
|
42
|
+
val isSecond: Boolean
|
|
43
|
+
get() = this is Second
|
|
44
|
+
|
|
45
|
+
fun asFirstOrNull(): NullType? {
|
|
46
|
+
val value = (this as? First)?.value ?: return null
|
|
47
|
+
return value
|
|
48
|
+
}
|
|
49
|
+
fun asSecondOrNull(): String? {
|
|
50
|
+
val value = (this as? Second)?.value ?: return null
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
companion object {
|
|
55
|
+
@JvmStatic
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
fun create(value: NullType): Variant_NullType_String = First(value)
|
|
58
|
+
@JvmStatic
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
fun create(value: String): Variant_NullType_String = Second(value)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# AcousticConnectRN+autolinking.rb
|
|
3
3
|
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright ©
|
|
5
|
+
# Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
#
|
|
7
7
|
|
|
8
8
|
# This is a Ruby script that adds all files generated by Nitrogen
|
|
@@ -52,9 +52,11 @@ def add_nitrogen_files(spec)
|
|
|
52
52
|
spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
|
|
53
53
|
# Use C++ 20
|
|
54
54
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
55
|
-
# Enables C++ <-> Swift interop (by default it's only
|
|
55
|
+
# Enables C++ <-> Swift interop (by default it's only ObjC)
|
|
56
56
|
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
57
|
# Enables stricter modular headers
|
|
58
58
|
"DEFINES_MODULE" => "YES",
|
|
59
|
+
# Disable auto-generated ObjC header for Swift (Static linkage on Xcode 26.4 breaks here)
|
|
60
|
+
"SWIFT_INSTALL_OBJC_HEADER" => "NO",
|
|
59
61
|
})
|
|
60
62
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AcousticConnectRN-Swift-Cxx-Bridge.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "AcousticConnectRN-Swift-Cxx-Bridge.hpp"
|
|
@@ -10,21 +10,22 @@
|
|
|
10
10
|
// Include C++ implementation defined types
|
|
11
11
|
#include "AcousticConnectRN-Swift-Cxx-Umbrella.hpp"
|
|
12
12
|
#include "HybridAcousticConnectRNSpecSwift.hpp"
|
|
13
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
13
14
|
|
|
14
15
|
namespace margelo::nitro::acousticconnectrn::bridge::swift {
|
|
15
16
|
|
|
16
|
-
// pragma MARK: std::shared_ptr<
|
|
17
|
-
std::shared_ptr<
|
|
17
|
+
// pragma MARK: std::shared_ptr<HybridAcousticConnectRNSpec>
|
|
18
|
+
std::shared_ptr<HybridAcousticConnectRNSpec> create_std__shared_ptr_HybridAcousticConnectRNSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
18
19
|
AcousticConnectRN::HybridAcousticConnectRNSpec_cxx swiftPart = AcousticConnectRN::HybridAcousticConnectRNSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
19
20
|
return std::make_shared<margelo::nitro::acousticconnectrn::HybridAcousticConnectRNSpecSwift>(swiftPart);
|
|
20
21
|
}
|
|
21
|
-
void*
|
|
22
|
+
void* NON_NULL get_std__shared_ptr_HybridAcousticConnectRNSpec_(std__shared_ptr_HybridAcousticConnectRNSpec_ cppType) {
|
|
22
23
|
std::shared_ptr<margelo::nitro::acousticconnectrn::HybridAcousticConnectRNSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::acousticconnectrn::HybridAcousticConnectRNSpecSwift>(cppType);
|
|
23
|
-
|
|
24
|
+
#ifdef NITRO_DEBUG
|
|
24
25
|
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
25
26
|
throw std::runtime_error("Class \"HybridAcousticConnectRNSpec\" is not implemented in Swift!");
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
#endif
|
|
28
29
|
AcousticConnectRN::HybridAcousticConnectRNSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
29
30
|
return swiftPart.toUnsafe();
|
|
30
31
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AcousticConnectRN-Swift-Cxx-Bridge.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,7 @@ namespace AcousticConnectRN { class HybridAcousticConnectRNSpec_cxx; }
|
|
|
17
17
|
|
|
18
18
|
// Include C++ defined types
|
|
19
19
|
#include "HybridAcousticConnectRNSpec.hpp"
|
|
20
|
+
#include <NitroModules/Null.hpp>
|
|
20
21
|
#include <NitroModules/Result.hpp>
|
|
21
22
|
#include <exception>
|
|
22
23
|
#include <memory>
|
|
@@ -31,61 +32,96 @@ namespace AcousticConnectRN { class HybridAcousticConnectRNSpec_cxx; }
|
|
|
31
32
|
*/
|
|
32
33
|
namespace margelo::nitro::acousticconnectrn::bridge::swift {
|
|
33
34
|
|
|
34
|
-
// pragma MARK: std::variant<std::string, double
|
|
35
|
+
// pragma MARK: std::variant<bool, std::string, double>
|
|
35
36
|
/**
|
|
36
|
-
* Wrapper struct for `std::variant<std::string, double
|
|
37
|
+
* Wrapper struct for `std::variant<bool, std::string, double>`.
|
|
37
38
|
* std::variant cannot be used in Swift because of a Swift bug.
|
|
38
39
|
* Not even specializing it works. So we create a wrapper struct.
|
|
39
40
|
*/
|
|
40
|
-
struct
|
|
41
|
-
std::variant<std::string, double
|
|
42
|
-
|
|
43
|
-
operator std::variant<std::string, double
|
|
41
|
+
struct std__variant_bool__std__string__double_ final {
|
|
42
|
+
std::variant<bool, std::string, double> variant;
|
|
43
|
+
std__variant_bool__std__string__double_(std::variant<bool, std::string, double> variant): variant(variant) { }
|
|
44
|
+
operator std::variant<bool, std::string, double>() const noexcept {
|
|
44
45
|
return variant;
|
|
45
46
|
}
|
|
46
|
-
inline size_t index() const {
|
|
47
|
+
inline size_t index() const noexcept {
|
|
47
48
|
return variant.index();
|
|
48
49
|
}
|
|
49
|
-
inline
|
|
50
|
+
inline bool get_0() const noexcept {
|
|
50
51
|
return std::get<0>(variant);
|
|
51
52
|
}
|
|
52
|
-
inline
|
|
53
|
+
inline std::string get_1() const noexcept {
|
|
53
54
|
return std::get<1>(variant);
|
|
54
55
|
}
|
|
55
|
-
inline
|
|
56
|
+
inline double get_2() const noexcept {
|
|
56
57
|
return std::get<2>(variant);
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
|
-
inline
|
|
60
|
-
return
|
|
60
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(bool value) noexcept {
|
|
61
|
+
return std__variant_bool__std__string__double_(value);
|
|
61
62
|
}
|
|
62
|
-
inline
|
|
63
|
-
return
|
|
63
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(const std::string& value) noexcept {
|
|
64
|
+
return std__variant_bool__std__string__double_(value);
|
|
64
65
|
}
|
|
65
|
-
inline
|
|
66
|
-
return
|
|
66
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(double value) noexcept {
|
|
67
|
+
return std__variant_bool__std__string__double_(value);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
// pragma MARK: std::
|
|
70
|
+
// pragma MARK: std::variant<nitro::NullType, std::string>
|
|
70
71
|
/**
|
|
71
|
-
*
|
|
72
|
+
* Wrapper struct for `std::variant<nitro::NullType, std::string>`.
|
|
73
|
+
* std::variant cannot be used in Swift because of a Swift bug.
|
|
74
|
+
* Not even specializing it works. So we create a wrapper struct.
|
|
72
75
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
struct std__variant_nitro__NullType__std__string_ final {
|
|
77
|
+
std::variant<nitro::NullType, std::string> variant;
|
|
78
|
+
std__variant_nitro__NullType__std__string_(std::variant<nitro::NullType, std::string> variant): variant(variant) { }
|
|
79
|
+
operator std::variant<nitro::NullType, std::string>() const noexcept {
|
|
80
|
+
return variant;
|
|
81
|
+
}
|
|
82
|
+
inline size_t index() const noexcept {
|
|
83
|
+
return variant.index();
|
|
84
|
+
}
|
|
85
|
+
inline nitro::NullType get_0() const noexcept {
|
|
86
|
+
return std::get<0>(variant);
|
|
87
|
+
}
|
|
88
|
+
inline std::string get_1() const noexcept {
|
|
89
|
+
return std::get<1>(variant);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
inline std__variant_nitro__NullType__std__string_ create_std__variant_nitro__NullType__std__string_(nitro::NullType value) noexcept {
|
|
93
|
+
return std__variant_nitro__NullType__std__string_(value);
|
|
94
|
+
}
|
|
95
|
+
inline std__variant_nitro__NullType__std__string_ create_std__variant_nitro__NullType__std__string_(const std::string& value) noexcept {
|
|
96
|
+
return std__variant_nitro__NullType__std__string_(value);
|
|
76
97
|
}
|
|
77
98
|
|
|
78
|
-
// pragma MARK: std::
|
|
99
|
+
// pragma MARK: std::optional<std::variant<nitro::NullType, std::string>>
|
|
79
100
|
/**
|
|
80
|
-
* Specialized version of `std::
|
|
101
|
+
* Specialized version of `std::optional<std::variant<nitro::NullType, std::string>>`.
|
|
81
102
|
*/
|
|
82
|
-
using
|
|
83
|
-
inline std::
|
|
84
|
-
std::
|
|
103
|
+
using std__optional_std__variant_nitro__NullType__std__string__ = std::optional<std::variant<nitro::NullType, std::string>>;
|
|
104
|
+
inline std::optional<std::variant<nitro::NullType, std::string>> create_std__optional_std__variant_nitro__NullType__std__string__(const std::variant<nitro::NullType, std::string>& value) noexcept {
|
|
105
|
+
return std::optional<std::variant<nitro::NullType, std::string>>(value);
|
|
106
|
+
}
|
|
107
|
+
inline bool has_value_std__optional_std__variant_nitro__NullType__std__string__(const std::optional<std::variant<nitro::NullType, std::string>>& optional) noexcept {
|
|
108
|
+
return optional.has_value();
|
|
109
|
+
}
|
|
110
|
+
inline std::variant<nitro::NullType, std::string> get_std__optional_std__variant_nitro__NullType__std__string__(const std::optional<std::variant<nitro::NullType, std::string>>& optional) noexcept {
|
|
111
|
+
return optional.value();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// pragma MARK: std::unordered_map<std::string, std::variant<bool, std::string, double>>
|
|
115
|
+
/**
|
|
116
|
+
* Specialized version of `std::unordered_map<std::string, std::variant<bool, std::string, double>>`.
|
|
117
|
+
*/
|
|
118
|
+
using std__unordered_map_std__string__std__variant_bool__std__string__double__ = std::unordered_map<std::string, std::variant<bool, std::string, double>>;
|
|
119
|
+
inline std::unordered_map<std::string, std::variant<bool, std::string, double>> create_std__unordered_map_std__string__std__variant_bool__std__string__double__(size_t size) noexcept {
|
|
120
|
+
std::unordered_map<std::string, std::variant<bool, std::string, double>> map;
|
|
85
121
|
map.reserve(size);
|
|
86
122
|
return map;
|
|
87
123
|
}
|
|
88
|
-
inline std::vector<std::string>
|
|
124
|
+
inline std::vector<std::string> get_std__unordered_map_std__string__std__variant_bool__std__string__double___keys(const std__unordered_map_std__string__std__variant_bool__std__string__double__& map) noexcept {
|
|
89
125
|
std::vector<std::string> keys;
|
|
90
126
|
keys.reserve(map.size());
|
|
91
127
|
for (const auto& entry : map) {
|
|
@@ -93,46 +129,49 @@ namespace margelo::nitro::acousticconnectrn::bridge::swift {
|
|
|
93
129
|
}
|
|
94
130
|
return keys;
|
|
95
131
|
}
|
|
96
|
-
inline
|
|
132
|
+
inline std::variant<bool, std::string, double> get_std__unordered_map_std__string__std__variant_bool__std__string__double___value(const std__unordered_map_std__string__std__variant_bool__std__string__double__& map, const std::string& key) noexcept {
|
|
133
|
+
return map.find(key)->second;
|
|
134
|
+
}
|
|
135
|
+
inline void emplace_std__unordered_map_std__string__std__variant_bool__std__string__double__(std__unordered_map_std__string__std__variant_bool__std__string__double__& map, const std::string& key, const std::variant<bool, std::string, double>& value) noexcept {
|
|
97
136
|
map.emplace(key, value);
|
|
98
137
|
}
|
|
99
138
|
|
|
100
|
-
// pragma MARK: std::shared_ptr<
|
|
139
|
+
// pragma MARK: std::shared_ptr<HybridAcousticConnectRNSpec>
|
|
101
140
|
/**
|
|
102
|
-
* Specialized version of `std::shared_ptr<
|
|
141
|
+
* Specialized version of `std::shared_ptr<HybridAcousticConnectRNSpec>`.
|
|
103
142
|
*/
|
|
104
|
-
using
|
|
105
|
-
std::shared_ptr<
|
|
106
|
-
void*
|
|
143
|
+
using std__shared_ptr_HybridAcousticConnectRNSpec_ = std::shared_ptr<HybridAcousticConnectRNSpec>;
|
|
144
|
+
std::shared_ptr<HybridAcousticConnectRNSpec> create_std__shared_ptr_HybridAcousticConnectRNSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
145
|
+
void* NON_NULL get_std__shared_ptr_HybridAcousticConnectRNSpec_(std__shared_ptr_HybridAcousticConnectRNSpec_ cppType);
|
|
107
146
|
|
|
108
|
-
// pragma MARK: std::weak_ptr<
|
|
109
|
-
using
|
|
110
|
-
inline
|
|
147
|
+
// pragma MARK: std::weak_ptr<HybridAcousticConnectRNSpec>
|
|
148
|
+
using std__weak_ptr_HybridAcousticConnectRNSpec_ = std::weak_ptr<HybridAcousticConnectRNSpec>;
|
|
149
|
+
inline std__weak_ptr_HybridAcousticConnectRNSpec_ weakify_std__shared_ptr_HybridAcousticConnectRNSpec_(const std::shared_ptr<HybridAcousticConnectRNSpec>& strong) noexcept { return strong; }
|
|
111
150
|
|
|
112
151
|
// pragma MARK: Result<bool>
|
|
113
152
|
using Result_bool_ = Result<bool>;
|
|
114
|
-
inline Result_bool_ create_Result_bool_(bool value) {
|
|
153
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
|
115
154
|
return Result<bool>::withValue(std::move(value));
|
|
116
155
|
}
|
|
117
|
-
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) {
|
|
156
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
|
118
157
|
return Result<bool>::withError(error);
|
|
119
158
|
}
|
|
120
159
|
|
|
121
|
-
// pragma MARK: Result<std::optional<std::string
|
|
122
|
-
using
|
|
123
|
-
inline
|
|
124
|
-
return Result<std::optional<std::string
|
|
160
|
+
// pragma MARK: Result<std::optional<std::variant<nitro::NullType, std::string>>>
|
|
161
|
+
using Result_std__optional_std__variant_nitro__NullType__std__string___ = Result<std::optional<std::variant<nitro::NullType, std::string>>>;
|
|
162
|
+
inline Result_std__optional_std__variant_nitro__NullType__std__string___ create_Result_std__optional_std__variant_nitro__NullType__std__string___(const std::optional<std::variant<nitro::NullType, std::string>>& value) noexcept {
|
|
163
|
+
return Result<std::optional<std::variant<nitro::NullType, std::string>>>::withValue(value);
|
|
125
164
|
}
|
|
126
|
-
inline
|
|
127
|
-
return Result<std::optional<std::string
|
|
165
|
+
inline Result_std__optional_std__variant_nitro__NullType__std__string___ create_Result_std__optional_std__variant_nitro__NullType__std__string___(const std::exception_ptr& error) noexcept {
|
|
166
|
+
return Result<std::optional<std::variant<nitro::NullType, std::string>>>::withError(error);
|
|
128
167
|
}
|
|
129
168
|
|
|
130
169
|
// pragma MARK: Result<double>
|
|
131
170
|
using Result_double_ = Result<double>;
|
|
132
|
-
inline Result_double_ create_Result_double_(double value) {
|
|
171
|
+
inline Result_double_ create_Result_double_(double value) noexcept {
|
|
133
172
|
return Result<double>::withValue(std::move(value));
|
|
134
173
|
}
|
|
135
|
-
inline Result_double_ create_Result_double_(const std::exception_ptr& error) {
|
|
174
|
+
inline Result_double_ create_Result_double_(const std::exception_ptr& error) noexcept {
|
|
136
175
|
return Result<double>::withError(error);
|
|
137
176
|
}
|
|
138
177
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AcousticConnectRN-Swift-Cxx-Umbrella.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -13,6 +13,7 @@ namespace margelo::nitro::acousticconnectrn { class HybridAcousticConnectRNSpec;
|
|
|
13
13
|
|
|
14
14
|
// Include C++ defined types
|
|
15
15
|
#include "HybridAcousticConnectRNSpec.hpp"
|
|
16
|
+
#include <NitroModules/Null.hpp>
|
|
16
17
|
#include <NitroModules/Result.hpp>
|
|
17
18
|
#include <exception>
|
|
18
19
|
#include <memory>
|
|
@@ -26,8 +27,9 @@ namespace margelo::nitro::acousticconnectrn { class HybridAcousticConnectRNSpec;
|
|
|
26
27
|
|
|
27
28
|
// Common C++ types used in Swift
|
|
28
29
|
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
29
|
-
#include <NitroModules/
|
|
30
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
30
31
|
#include <NitroModules/RuntimeError.hpp>
|
|
32
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
31
33
|
|
|
32
34
|
// Forward declarations of Swift defined types
|
|
33
35
|
// Forward declaration of `HybridAcousticConnectRNSpec_cxx` to properly resolve imports.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AcousticConnectRNAutolinking.mm
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
25
|
"AcousticConnectRN",
|
|
26
26
|
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
-
std::shared_ptr<
|
|
27
|
+
std::shared_ptr<HybridAcousticConnectRNSpec> hybridObject = AcousticConnectRN::AcousticConnectRNAutolinking::createAcousticConnectRN();
|
|
28
28
|
return hybridObject;
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
/// AcousticConnectRNAutolinking.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
8
12
|
public final class AcousticConnectRNAutolinking {
|
|
9
13
|
public typealias bridge = margelo.nitro.acousticconnectrn.bridge.swift
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
* Creates an instance of a Swift class that implements `HybridAcousticConnectRNSpec`,
|
|
13
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridAcousticConnectRNSpec_cxx`)
|
|
14
|
-
*
|
|
15
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridAcousticConnectRN`).
|
|
17
|
-
*/
|
|
18
|
-
public static func createAcousticConnectRN() -> bridge.std__shared_ptr_margelo__nitro__acousticconnectrn__HybridAcousticConnectRNSpec_ {
|
|
15
|
+
public static func createAcousticConnectRN() -> bridge.std__shared_ptr_HybridAcousticConnectRNSpec_ {
|
|
19
16
|
let hybridObject = HybridAcousticConnectRN()
|
|
20
|
-
return { () -> bridge.
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridAcousticConnectRNSpec_ in
|
|
21
18
|
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
22
19
|
return __cxxWrapped.getCxxPart()
|
|
23
20
|
}()
|
|
24
21
|
}
|
|
22
|
+
|
|
23
|
+
public static func isAcousticConnectRNRecyclable() -> Bool {
|
|
24
|
+
return HybridAcousticConnectRN.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
25
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridAcousticConnectRNSpecSwift.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridAcousticConnectRNSpecSwift.hpp"
|