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
|
/// HybridAcousticConnectRNSpecSwift.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
|
|
@@ -16,6 +16,7 @@ namespace AcousticConnectRN { class HybridAcousticConnectRNSpec_cxx; }
|
|
|
16
16
|
|
|
17
17
|
#include <string>
|
|
18
18
|
#include <variant>
|
|
19
|
+
#include <NitroModules/Null.hpp>
|
|
19
20
|
#include <optional>
|
|
20
21
|
#include <unordered_map>
|
|
21
22
|
|
|
@@ -47,10 +48,21 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
public:
|
|
50
|
-
// Get memory pressure
|
|
51
51
|
inline size_t getExternalMemorySize() noexcept override {
|
|
52
52
|
return _swiftPart.getMemorySize();
|
|
53
53
|
}
|
|
54
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
55
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridAcousticConnectRNSpecSwift>(other)) {
|
|
56
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
void dispose() noexcept override {
|
|
61
|
+
_swiftPart.dispose();
|
|
62
|
+
}
|
|
63
|
+
std::string toString() override {
|
|
64
|
+
return _swiftPart.toString();
|
|
65
|
+
}
|
|
54
66
|
|
|
55
67
|
public:
|
|
56
68
|
// Properties
|
|
@@ -82,7 +94,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
82
94
|
auto __value = std::move(__result.value());
|
|
83
95
|
return __value;
|
|
84
96
|
}
|
|
85
|
-
inline bool setConfigItemForKey(const std::string& key, const std::variant<std::string, double
|
|
97
|
+
inline bool setConfigItemForKey(const std::string& key, const std::variant<bool, std::string, double>& value, const std::string& moduleName) override {
|
|
86
98
|
auto __result = _swiftPart.setConfigItemForKey(key, value, moduleName);
|
|
87
99
|
if (__result.hasError()) [[unlikely]] {
|
|
88
100
|
std::rethrow_exception(__result.error());
|
|
@@ -98,7 +110,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
98
110
|
auto __value = std::move(__result.value());
|
|
99
111
|
return __value;
|
|
100
112
|
}
|
|
101
|
-
inline std::optional<std::string
|
|
113
|
+
inline std::optional<std::variant<nitro::NullType, std::string>> getStringItemForKey(const std::string& theDefault, const std::string& key, const std::string& moduleName) override {
|
|
102
114
|
auto __result = _swiftPart.getStringItemForKey(theDefault, key, moduleName);
|
|
103
115
|
if (__result.hasError()) [[unlikely]] {
|
|
104
116
|
std::rethrow_exception(__result.error());
|
|
@@ -114,7 +126,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
114
126
|
auto __value = std::move(__result.value());
|
|
115
127
|
return __value;
|
|
116
128
|
}
|
|
117
|
-
inline bool logCustomEvent(const std::string& eventName, const std::unordered_map<std::string, std::variant<std::string, double
|
|
129
|
+
inline bool logCustomEvent(const std::string& eventName, const std::unordered_map<std::string, std::variant<bool, std::string, double>>& values, double level) override {
|
|
118
130
|
auto __result = _swiftPart.logCustomEvent(eventName, values, std::forward<decltype(level)>(level));
|
|
119
131
|
if (__result.hasError()) [[unlikely]] {
|
|
120
132
|
std::rethrow_exception(__result.error());
|
|
@@ -122,7 +134,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
122
134
|
auto __value = std::move(__result.value());
|
|
123
135
|
return __value;
|
|
124
136
|
}
|
|
125
|
-
inline bool logSignal(const std::unordered_map<std::string, std::variant<std::string, double
|
|
137
|
+
inline bool logSignal(const std::unordered_map<std::string, std::variant<bool, std::string, double>>& values, double level) override {
|
|
126
138
|
auto __result = _swiftPart.logSignal(values, std::forward<decltype(level)>(level));
|
|
127
139
|
if (__result.hasError()) [[unlikely]] {
|
|
128
140
|
std::rethrow_exception(__result.error());
|
|
@@ -162,7 +174,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
162
174
|
auto __value = std::move(__result.value());
|
|
163
175
|
return __value;
|
|
164
176
|
}
|
|
165
|
-
inline bool logTextChangeEvent(double target, const std::string& controlId, const std::optional<std::string
|
|
177
|
+
inline bool logTextChangeEvent(double target, const std::string& controlId, const std::optional<std::variant<nitro::NullType, std::string>>& text) override {
|
|
166
178
|
auto __result = _swiftPart.logTextChangeEvent(std::forward<decltype(target)>(target), controlId, text);
|
|
167
179
|
if (__result.hasError()) [[unlikely]] {
|
|
168
180
|
std::rethrow_exception(__result.error());
|
|
@@ -178,7 +190,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
178
190
|
auto __value = std::move(__result.value());
|
|
179
191
|
return __value;
|
|
180
192
|
}
|
|
181
|
-
inline bool logScreenViewContextLoad(const std::optional<std::string
|
|
193
|
+
inline bool logScreenViewContextLoad(const std::optional<std::variant<nitro::NullType, std::string>>& logicalPageName, const std::optional<std::variant<nitro::NullType, std::string>>& referrer) override {
|
|
182
194
|
auto __result = _swiftPart.logScreenViewContextLoad(logicalPageName, referrer);
|
|
183
195
|
if (__result.hasError()) [[unlikely]] {
|
|
184
196
|
std::rethrow_exception(__result.error());
|
|
@@ -186,7 +198,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
186
198
|
auto __value = std::move(__result.value());
|
|
187
199
|
return __value;
|
|
188
200
|
}
|
|
189
|
-
inline bool logScreenViewContextUnload(const std::optional<std::string
|
|
201
|
+
inline bool logScreenViewContextUnload(const std::optional<std::variant<nitro::NullType, std::string>>& logicalPageName, const std::optional<std::variant<nitro::NullType, std::string>>& referrer) override {
|
|
190
202
|
auto __result = _swiftPart.logScreenViewContextUnload(logicalPageName, referrer);
|
|
191
203
|
if (__result.hasError()) [[unlikely]] {
|
|
192
204
|
std::rethrow_exception(__result.error());
|
|
@@ -226,7 +238,7 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
226
238
|
auto __value = std::move(__result.value());
|
|
227
239
|
return __value;
|
|
228
240
|
}
|
|
229
|
-
inline bool logDialogCustomEvent(const std::string& dialogId, const std::string& eventName, const std::unordered_map<std::string, std::variant<std::string, double
|
|
241
|
+
inline bool logDialogCustomEvent(const std::string& dialogId, const std::string& eventName, const std::unordered_map<std::string, std::variant<bool, std::string, double>>& values) override {
|
|
230
242
|
auto __result = _swiftPart.logDialogCustomEvent(dialogId, eventName, values);
|
|
231
243
|
if (__result.hasError()) [[unlikely]] {
|
|
232
244
|
std::rethrow_exception(__result.error());
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridAcousticConnectRNSpec.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 Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/// See ``HybridAcousticConnectRNSpec``
|
|
@@ -17,40 +16,48 @@ public protocol HybridAcousticConnectRNSpec_protocol: HybridObject {
|
|
|
17
16
|
func setBooleanConfigItemForKey(key: String, value: Bool, moduleName: String) throws -> Bool
|
|
18
17
|
func setStringItemForKey(key: String, value: String, moduleName: String) throws -> Bool
|
|
19
18
|
func setNumberItemForKey(key: String, value: Double, moduleName: String) throws -> Bool
|
|
20
|
-
func setConfigItemForKey(key: String, value:
|
|
19
|
+
func setConfigItemForKey(key: String, value: Variant_Bool_String_Double, moduleName: String) throws -> Bool
|
|
21
20
|
func getBooleanConfigItemForKey(theDefault: Bool, key: String, moduleName: String) throws -> Bool
|
|
22
|
-
func getStringItemForKey(theDefault: String, key: String, moduleName: String) throws ->
|
|
21
|
+
func getStringItemForKey(theDefault: String, key: String, moduleName: String) throws -> Variant_NullType_String?
|
|
23
22
|
func getNumberItemForKey(theDefault: Double, key: String, moduleName: String) throws -> Double
|
|
24
|
-
func logCustomEvent(eventName: String, values: Dictionary<String,
|
|
25
|
-
func logSignal(values: Dictionary<String,
|
|
23
|
+
func logCustomEvent(eventName: String, values: Dictionary<String, Variant_Bool_String_Double>, level: Double) throws -> Bool
|
|
24
|
+
func logSignal(values: Dictionary<String, Variant_Bool_String_Double>, level: Double) throws -> Bool
|
|
26
25
|
func logExceptionEvent(message: String, stackInfo: String, unhandled: Bool) throws -> Bool
|
|
27
26
|
func logLocation() throws -> Bool
|
|
28
27
|
func logLocationWithLatitudeLongitude(latitude: Double, longitude: Double, level: Double) throws -> Bool
|
|
29
28
|
func logClickEvent(target: Double, controlId: String) throws -> Bool
|
|
30
|
-
func logTextChangeEvent(target: Double, controlId: String, text:
|
|
29
|
+
func logTextChangeEvent(target: Double, controlId: String, text: Variant_NullType_String?) throws -> Bool
|
|
31
30
|
func setCurrentScreenName(logicalPageName: String) throws -> Bool
|
|
32
|
-
func logScreenViewContextLoad(logicalPageName:
|
|
33
|
-
func logScreenViewContextUnload(logicalPageName:
|
|
31
|
+
func logScreenViewContextLoad(logicalPageName: Variant_NullType_String?, referrer: Variant_NullType_String?) throws -> Bool
|
|
32
|
+
func logScreenViewContextUnload(logicalPageName: Variant_NullType_String?, referrer: Variant_NullType_String?) throws -> Bool
|
|
34
33
|
func logScreenLayout(name: String, delay: Double) throws -> Bool
|
|
35
34
|
func logDialogShowEvent(dialogId: String, dialogTitle: String, dialogType: String) throws -> Bool
|
|
36
35
|
func logDialogDismissEvent(dialogId: String, dismissReason: String) throws -> Bool
|
|
37
36
|
func logDialogButtonClickEvent(dialogId: String, buttonText: String, buttonIndex: Double) throws -> Bool
|
|
38
|
-
func logDialogCustomEvent(dialogId: String, eventName: String, values: Dictionary<String,
|
|
37
|
+
func logDialogCustomEvent(dialogId: String, eventName: String, values: Dictionary<String, Variant_Bool_String_Double>) throws -> Bool
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public extension HybridAcousticConnectRNSpec_protocol {
|
|
41
|
+
/// Default implementation of ``HybridObject.toString``
|
|
42
|
+
func toString() -> String {
|
|
43
|
+
return "[HybridObject AcousticConnectRN]"
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
/// See ``HybridAcousticConnectRNSpec``
|
|
42
|
-
|
|
48
|
+
open class HybridAcousticConnectRNSpec_base {
|
|
43
49
|
private weak var cxxWrapper: HybridAcousticConnectRNSpec_cxx? = nil
|
|
50
|
+
public init() { }
|
|
44
51
|
public func getCxxWrapper() -> HybridAcousticConnectRNSpec_cxx {
|
|
45
52
|
#if DEBUG
|
|
46
|
-
guard self is HybridAcousticConnectRNSpec else {
|
|
53
|
+
guard self is any HybridAcousticConnectRNSpec else {
|
|
47
54
|
fatalError("`self` is not a `HybridAcousticConnectRNSpec`! Did you accidentally inherit from `HybridAcousticConnectRNSpec_base` instead of `HybridAcousticConnectRNSpec`?")
|
|
48
55
|
}
|
|
49
56
|
#endif
|
|
50
57
|
if let cxxWrapper = self.cxxWrapper {
|
|
51
58
|
return cxxWrapper
|
|
52
59
|
} else {
|
|
53
|
-
let cxxWrapper = HybridAcousticConnectRNSpec_cxx(self as! HybridAcousticConnectRNSpec)
|
|
60
|
+
let cxxWrapper = HybridAcousticConnectRNSpec_cxx(self as! any HybridAcousticConnectRNSpec)
|
|
54
61
|
self.cxxWrapper = cxxWrapper
|
|
55
62
|
return cxxWrapper
|
|
56
63
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridAcousticConnectRNSpec_cxx.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 Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -17,7 +16,7 @@ import NitroModules
|
|
|
17
16
|
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
17
|
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
18
|
*/
|
|
20
|
-
|
|
19
|
+
open class HybridAcousticConnectRNSpec_cxx {
|
|
21
20
|
/**
|
|
22
21
|
* The Swift <> C++ bridge's namespace (`margelo::nitro::acousticconnectrn::bridge::swift`)
|
|
23
22
|
* from `AcousticConnectRN-Swift-Cxx-Bridge.hpp`.
|
|
@@ -33,7 +32,7 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
33
32
|
/**
|
|
34
33
|
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
34
|
*/
|
|
36
|
-
private var __cxxPart: bridge.
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridAcousticConnectRNSpec_
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* Create a new `HybridAcousticConnectRNSpec_cxx` that wraps the given `HybridAcousticConnectRNSpec`.
|
|
@@ -72,15 +71,15 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
73
|
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
-
* The C++ part is a `std::shared_ptr<
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridAcousticConnectRNSpec>`.
|
|
76
75
|
*/
|
|
77
|
-
public func getCxxPart() -> bridge.
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridAcousticConnectRNSpec_ {
|
|
78
77
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
79
|
return cachedCxxPart
|
|
81
80
|
} else {
|
|
82
|
-
let newCxxPart = bridge.
|
|
83
|
-
__cxxPart = bridge.
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridAcousticConnectRNSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridAcousticConnectRNSpec_(newCxxPart)
|
|
84
83
|
return newCxxPart
|
|
85
84
|
}
|
|
86
85
|
}
|
|
@@ -96,6 +95,31 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
96
95
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridAcousticConnectRNSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
99
123
|
// Properties
|
|
100
124
|
|
|
101
125
|
|
|
@@ -137,17 +161,17 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
137
161
|
}
|
|
138
162
|
|
|
139
163
|
@inline(__always)
|
|
140
|
-
public final func setConfigItemForKey(key: std.string, value: bridge.
|
|
164
|
+
public final func setConfigItemForKey(key: std.string, value: bridge.std__variant_bool__std__string__double_, moduleName: std.string) -> bridge.Result_bool_ {
|
|
141
165
|
do {
|
|
142
|
-
let __result = try self.__implementation.setConfigItemForKey(key: String(key), value: { () ->
|
|
166
|
+
let __result = try self.__implementation.setConfigItemForKey(key: String(key), value: { () -> Variant_Bool_String_Double in
|
|
143
167
|
let __variant = value
|
|
144
168
|
switch __variant.index() {
|
|
145
169
|
case 0:
|
|
146
170
|
let __actual = __variant.get_0()
|
|
147
|
-
return .first(
|
|
171
|
+
return .first(__actual)
|
|
148
172
|
case 1:
|
|
149
173
|
let __actual = __variant.get_1()
|
|
150
|
-
return .second(__actual)
|
|
174
|
+
return .second(String(__actual))
|
|
151
175
|
case 2:
|
|
152
176
|
let __actual = __variant.get_2()
|
|
153
177
|
return .third(__actual)
|
|
@@ -176,20 +200,27 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
176
200
|
}
|
|
177
201
|
|
|
178
202
|
@inline(__always)
|
|
179
|
-
public final func getStringItemForKey(theDefault: std.string, key: std.string, moduleName: std.string) -> bridge.
|
|
203
|
+
public final func getStringItemForKey(theDefault: std.string, key: std.string, moduleName: std.string) -> bridge.Result_std__optional_std__variant_nitro__NullType__std__string___ {
|
|
180
204
|
do {
|
|
181
205
|
let __result = try self.__implementation.getStringItemForKey(theDefault: String(theDefault), key: String(key), moduleName: String(moduleName))
|
|
182
|
-
let __resultCpp = { () -> bridge.
|
|
206
|
+
let __resultCpp = { () -> bridge.std__optional_std__variant_nitro__NullType__std__string__ in
|
|
183
207
|
if let __unwrappedValue = __result {
|
|
184
|
-
return bridge.
|
|
208
|
+
return bridge.create_std__optional_std__variant_nitro__NullType__std__string__({ () -> bridge.std__variant_nitro__NullType__std__string_ in
|
|
209
|
+
switch __unwrappedValue {
|
|
210
|
+
case .first(let __value):
|
|
211
|
+
return bridge.create_std__variant_nitro__NullType__std__string_(margelo.nitro.NullType.null)
|
|
212
|
+
case .second(let __value):
|
|
213
|
+
return bridge.create_std__variant_nitro__NullType__std__string_(std.string(__value))
|
|
214
|
+
}
|
|
215
|
+
}().variant)
|
|
185
216
|
} else {
|
|
186
217
|
return .init()
|
|
187
218
|
}
|
|
188
219
|
}()
|
|
189
|
-
return bridge.
|
|
220
|
+
return bridge.create_Result_std__optional_std__variant_nitro__NullType__std__string___(__resultCpp)
|
|
190
221
|
} catch (let __error) {
|
|
191
222
|
let __exceptionPtr = __error.toCpp()
|
|
192
|
-
return bridge.
|
|
223
|
+
return bridge.create_Result_std__optional_std__variant_nitro__NullType__std__string___(__exceptionPtr)
|
|
193
224
|
}
|
|
194
225
|
}
|
|
195
226
|
|
|
@@ -206,22 +237,22 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
206
237
|
}
|
|
207
238
|
|
|
208
239
|
@inline(__always)
|
|
209
|
-
public final func logCustomEvent(eventName: std.string, values: bridge.
|
|
240
|
+
public final func logCustomEvent(eventName: std.string, values: bridge.std__unordered_map_std__string__std__variant_bool__std__string__double__, level: Double) -> bridge.Result_bool_ {
|
|
210
241
|
do {
|
|
211
|
-
let __result = try self.__implementation.logCustomEvent(eventName: String(eventName), values: { () -> Dictionary<String,
|
|
212
|
-
var __dictionary = Dictionary<String,
|
|
213
|
-
let __keys = bridge.
|
|
242
|
+
let __result = try self.__implementation.logCustomEvent(eventName: String(eventName), values: { () -> Dictionary<String, Variant_Bool_String_Double> in
|
|
243
|
+
var __dictionary = Dictionary<String, Variant_Bool_String_Double>(minimumCapacity: values.size())
|
|
244
|
+
let __keys = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___keys(values)
|
|
214
245
|
for __key in __keys {
|
|
215
|
-
let __value = values
|
|
216
|
-
__dictionary[String(__key)] = { () ->
|
|
217
|
-
let __variant = bridge.
|
|
246
|
+
let __value = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___value(values, __key)
|
|
247
|
+
__dictionary[String(__key)] = { () -> Variant_Bool_String_Double in
|
|
248
|
+
let __variant = bridge.std__variant_bool__std__string__double_(__value)
|
|
218
249
|
switch __variant.index() {
|
|
219
250
|
case 0:
|
|
220
251
|
let __actual = __variant.get_0()
|
|
221
|
-
return .first(
|
|
252
|
+
return .first(__actual)
|
|
222
253
|
case 1:
|
|
223
254
|
let __actual = __variant.get_1()
|
|
224
|
-
return .second(__actual)
|
|
255
|
+
return .second(String(__actual))
|
|
225
256
|
case 2:
|
|
226
257
|
let __actual = __variant.get_2()
|
|
227
258
|
return .third(__actual)
|
|
@@ -241,22 +272,22 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
241
272
|
}
|
|
242
273
|
|
|
243
274
|
@inline(__always)
|
|
244
|
-
public final func logSignal(values: bridge.
|
|
275
|
+
public final func logSignal(values: bridge.std__unordered_map_std__string__std__variant_bool__std__string__double__, level: Double) -> bridge.Result_bool_ {
|
|
245
276
|
do {
|
|
246
|
-
let __result = try self.__implementation.logSignal(values: { () -> Dictionary<String,
|
|
247
|
-
var __dictionary = Dictionary<String,
|
|
248
|
-
let __keys = bridge.
|
|
277
|
+
let __result = try self.__implementation.logSignal(values: { () -> Dictionary<String, Variant_Bool_String_Double> in
|
|
278
|
+
var __dictionary = Dictionary<String, Variant_Bool_String_Double>(minimumCapacity: values.size())
|
|
279
|
+
let __keys = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___keys(values)
|
|
249
280
|
for __key in __keys {
|
|
250
|
-
let __value = values
|
|
251
|
-
__dictionary[String(__key)] = { () ->
|
|
252
|
-
let __variant = bridge.
|
|
281
|
+
let __value = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___value(values, __key)
|
|
282
|
+
__dictionary[String(__key)] = { () -> Variant_Bool_String_Double in
|
|
283
|
+
let __variant = bridge.std__variant_bool__std__string__double_(__value)
|
|
253
284
|
switch __variant.index() {
|
|
254
285
|
case 0:
|
|
255
286
|
let __actual = __variant.get_0()
|
|
256
|
-
return .first(
|
|
287
|
+
return .first(__actual)
|
|
257
288
|
case 1:
|
|
258
289
|
let __actual = __variant.get_1()
|
|
259
|
-
return .second(__actual)
|
|
290
|
+
return .second(String(__actual))
|
|
260
291
|
case 2:
|
|
261
292
|
let __actual = __variant.get_2()
|
|
262
293
|
return .third(__actual)
|
|
@@ -324,11 +355,24 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
324
355
|
}
|
|
325
356
|
|
|
326
357
|
@inline(__always)
|
|
327
|
-
public final func logTextChangeEvent(target: Double, controlId: std.string, text: bridge.
|
|
358
|
+
public final func logTextChangeEvent(target: Double, controlId: std.string, text: bridge.std__optional_std__variant_nitro__NullType__std__string__) -> bridge.Result_bool_ {
|
|
328
359
|
do {
|
|
329
|
-
let __result = try self.__implementation.logTextChangeEvent(target: target, controlId: String(controlId), text: { () ->
|
|
330
|
-
if
|
|
331
|
-
|
|
360
|
+
let __result = try self.__implementation.logTextChangeEvent(target: target, controlId: String(controlId), text: { () -> Variant_NullType_String? in
|
|
361
|
+
if bridge.has_value_std__optional_std__variant_nitro__NullType__std__string__(text) {
|
|
362
|
+
let __unwrapped = bridge.get_std__optional_std__variant_nitro__NullType__std__string__(text)
|
|
363
|
+
return { () -> Variant_NullType_String in
|
|
364
|
+
let __variant = bridge.std__variant_nitro__NullType__std__string_(__unwrapped)
|
|
365
|
+
switch __variant.index() {
|
|
366
|
+
case 0:
|
|
367
|
+
let __actual = __variant.get_0()
|
|
368
|
+
return .first(NullType.null)
|
|
369
|
+
case 1:
|
|
370
|
+
let __actual = __variant.get_1()
|
|
371
|
+
return .second(String(__actual))
|
|
372
|
+
default:
|
|
373
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
374
|
+
}
|
|
375
|
+
}()
|
|
332
376
|
} else {
|
|
333
377
|
return nil
|
|
334
378
|
}
|
|
@@ -354,17 +398,43 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
354
398
|
}
|
|
355
399
|
|
|
356
400
|
@inline(__always)
|
|
357
|
-
public final func logScreenViewContextLoad(logicalPageName: bridge.
|
|
401
|
+
public final func logScreenViewContextLoad(logicalPageName: bridge.std__optional_std__variant_nitro__NullType__std__string__, referrer: bridge.std__optional_std__variant_nitro__NullType__std__string__) -> bridge.Result_bool_ {
|
|
358
402
|
do {
|
|
359
|
-
let __result = try self.__implementation.logScreenViewContextLoad(logicalPageName: { () ->
|
|
360
|
-
if
|
|
361
|
-
|
|
403
|
+
let __result = try self.__implementation.logScreenViewContextLoad(logicalPageName: { () -> Variant_NullType_String? in
|
|
404
|
+
if bridge.has_value_std__optional_std__variant_nitro__NullType__std__string__(logicalPageName) {
|
|
405
|
+
let __unwrapped = bridge.get_std__optional_std__variant_nitro__NullType__std__string__(logicalPageName)
|
|
406
|
+
return { () -> Variant_NullType_String in
|
|
407
|
+
let __variant = bridge.std__variant_nitro__NullType__std__string_(__unwrapped)
|
|
408
|
+
switch __variant.index() {
|
|
409
|
+
case 0:
|
|
410
|
+
let __actual = __variant.get_0()
|
|
411
|
+
return .first(NullType.null)
|
|
412
|
+
case 1:
|
|
413
|
+
let __actual = __variant.get_1()
|
|
414
|
+
return .second(String(__actual))
|
|
415
|
+
default:
|
|
416
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
417
|
+
}
|
|
418
|
+
}()
|
|
362
419
|
} else {
|
|
363
420
|
return nil
|
|
364
421
|
}
|
|
365
|
-
}(), referrer: { () ->
|
|
366
|
-
if
|
|
367
|
-
|
|
422
|
+
}(), referrer: { () -> Variant_NullType_String? in
|
|
423
|
+
if bridge.has_value_std__optional_std__variant_nitro__NullType__std__string__(referrer) {
|
|
424
|
+
let __unwrapped = bridge.get_std__optional_std__variant_nitro__NullType__std__string__(referrer)
|
|
425
|
+
return { () -> Variant_NullType_String in
|
|
426
|
+
let __variant = bridge.std__variant_nitro__NullType__std__string_(__unwrapped)
|
|
427
|
+
switch __variant.index() {
|
|
428
|
+
case 0:
|
|
429
|
+
let __actual = __variant.get_0()
|
|
430
|
+
return .first(NullType.null)
|
|
431
|
+
case 1:
|
|
432
|
+
let __actual = __variant.get_1()
|
|
433
|
+
return .second(String(__actual))
|
|
434
|
+
default:
|
|
435
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
436
|
+
}
|
|
437
|
+
}()
|
|
368
438
|
} else {
|
|
369
439
|
return nil
|
|
370
440
|
}
|
|
@@ -378,17 +448,43 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
378
448
|
}
|
|
379
449
|
|
|
380
450
|
@inline(__always)
|
|
381
|
-
public final func logScreenViewContextUnload(logicalPageName: bridge.
|
|
451
|
+
public final func logScreenViewContextUnload(logicalPageName: bridge.std__optional_std__variant_nitro__NullType__std__string__, referrer: bridge.std__optional_std__variant_nitro__NullType__std__string__) -> bridge.Result_bool_ {
|
|
382
452
|
do {
|
|
383
|
-
let __result = try self.__implementation.logScreenViewContextUnload(logicalPageName: { () ->
|
|
384
|
-
if
|
|
385
|
-
|
|
453
|
+
let __result = try self.__implementation.logScreenViewContextUnload(logicalPageName: { () -> Variant_NullType_String? in
|
|
454
|
+
if bridge.has_value_std__optional_std__variant_nitro__NullType__std__string__(logicalPageName) {
|
|
455
|
+
let __unwrapped = bridge.get_std__optional_std__variant_nitro__NullType__std__string__(logicalPageName)
|
|
456
|
+
return { () -> Variant_NullType_String in
|
|
457
|
+
let __variant = bridge.std__variant_nitro__NullType__std__string_(__unwrapped)
|
|
458
|
+
switch __variant.index() {
|
|
459
|
+
case 0:
|
|
460
|
+
let __actual = __variant.get_0()
|
|
461
|
+
return .first(NullType.null)
|
|
462
|
+
case 1:
|
|
463
|
+
let __actual = __variant.get_1()
|
|
464
|
+
return .second(String(__actual))
|
|
465
|
+
default:
|
|
466
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
467
|
+
}
|
|
468
|
+
}()
|
|
386
469
|
} else {
|
|
387
470
|
return nil
|
|
388
471
|
}
|
|
389
|
-
}(), referrer: { () ->
|
|
390
|
-
if
|
|
391
|
-
|
|
472
|
+
}(), referrer: { () -> Variant_NullType_String? in
|
|
473
|
+
if bridge.has_value_std__optional_std__variant_nitro__NullType__std__string__(referrer) {
|
|
474
|
+
let __unwrapped = bridge.get_std__optional_std__variant_nitro__NullType__std__string__(referrer)
|
|
475
|
+
return { () -> Variant_NullType_String in
|
|
476
|
+
let __variant = bridge.std__variant_nitro__NullType__std__string_(__unwrapped)
|
|
477
|
+
switch __variant.index() {
|
|
478
|
+
case 0:
|
|
479
|
+
let __actual = __variant.get_0()
|
|
480
|
+
return .first(NullType.null)
|
|
481
|
+
case 1:
|
|
482
|
+
let __actual = __variant.get_1()
|
|
483
|
+
return .second(String(__actual))
|
|
484
|
+
default:
|
|
485
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
486
|
+
}
|
|
487
|
+
}()
|
|
392
488
|
} else {
|
|
393
489
|
return nil
|
|
394
490
|
}
|
|
@@ -450,22 +546,22 @@ public class HybridAcousticConnectRNSpec_cxx {
|
|
|
450
546
|
}
|
|
451
547
|
|
|
452
548
|
@inline(__always)
|
|
453
|
-
public final func logDialogCustomEvent(dialogId: std.string, eventName: std.string, values: bridge.
|
|
549
|
+
public final func logDialogCustomEvent(dialogId: std.string, eventName: std.string, values: bridge.std__unordered_map_std__string__std__variant_bool__std__string__double__) -> bridge.Result_bool_ {
|
|
454
550
|
do {
|
|
455
|
-
let __result = try self.__implementation.logDialogCustomEvent(dialogId: String(dialogId), eventName: String(eventName), values: { () -> Dictionary<String,
|
|
456
|
-
var __dictionary = Dictionary<String,
|
|
457
|
-
let __keys = bridge.
|
|
551
|
+
let __result = try self.__implementation.logDialogCustomEvent(dialogId: String(dialogId), eventName: String(eventName), values: { () -> Dictionary<String, Variant_Bool_String_Double> in
|
|
552
|
+
var __dictionary = Dictionary<String, Variant_Bool_String_Double>(minimumCapacity: values.size())
|
|
553
|
+
let __keys = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___keys(values)
|
|
458
554
|
for __key in __keys {
|
|
459
|
-
let __value = values
|
|
460
|
-
__dictionary[String(__key)] = { () ->
|
|
461
|
-
let __variant = bridge.
|
|
555
|
+
let __value = bridge.get_std__unordered_map_std__string__std__variant_bool__std__string__double___value(values, __key)
|
|
556
|
+
__dictionary[String(__key)] = { () -> Variant_Bool_String_Double in
|
|
557
|
+
let __variant = bridge.std__variant_bool__std__string__double_(__value)
|
|
462
558
|
switch __variant.index() {
|
|
463
559
|
case 0:
|
|
464
560
|
let __actual = __variant.get_0()
|
|
465
|
-
return .first(
|
|
561
|
+
return .first(__actual)
|
|
466
562
|
case 1:
|
|
467
563
|
let __actual = __variant.get_1()
|
|
468
|
-
return .second(__actual)
|
|
564
|
+
return .second(String(__actual))
|
|
469
565
|
case 2:
|
|
470
566
|
let __actual = __variant.get_2()
|
|
471
567
|
return .third(__actual)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_Bool_String_Double.swift
|
|
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
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
+
* JS type: `boolean | string | number`
|
|
13
|
+
*/
|
|
14
|
+
@frozen
|
|
15
|
+
public enum Variant_Bool_String_Double {
|
|
16
|
+
case first(Bool)
|
|
17
|
+
case second(String)
|
|
18
|
+
case third(Double)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public extension Variant_Bool_String_Double {
|
|
22
|
+
func asType<T>(_ type: T.Type = T.self) -> T? {
|
|
23
|
+
switch self {
|
|
24
|
+
case .first(let value): return value as? T
|
|
25
|
+
case .second(let value): return value as? T
|
|
26
|
+
case .third(let value): return value as? T
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
func isType<T>(_ type: T.Type = T.self) -> Bool {
|
|
30
|
+
return self.asType(type) != nil
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_String.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
+
* JS type: `null | string`
|
|
13
|
+
*/
|
|
14
|
+
@frozen
|
|
15
|
+
public enum Variant_NullType_String {
|
|
16
|
+
case first(NullType)
|
|
17
|
+
case second(String)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public extension Variant_NullType_String {
|
|
21
|
+
func asType<T>(_ type: T.Type = T.self) -> T? {
|
|
22
|
+
switch self {
|
|
23
|
+
case .first(let value): return value as? T
|
|
24
|
+
case .second(let value): return value as? T
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
func isType<T>(_ type: T.Type = T.self) -> Bool {
|
|
28
|
+
return self.asType(type) != nil
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridAcousticConnectRNSpec.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 "HybridAcousticConnectRNSpec.hpp"
|