@applicaster/quick-brick-native-apple 6.6.2 → 6.6.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "QuickBrickApple",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.3",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": "14.0",
|
|
6
6
|
"tvos": "14.0"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"authors": "Applicaster LTD.",
|
|
17
17
|
"source": {
|
|
18
18
|
"git": "https://github.com/applicaster/Zapp-Frameworks.git",
|
|
19
|
-
"tag": "@@applicaster/quick-brick-native-apple/6.6.
|
|
19
|
+
"tag": "@@applicaster/quick-brick-native-apple/6.6.3"
|
|
20
20
|
},
|
|
21
21
|
"requires_arc": true,
|
|
22
22
|
"source_files": "universal/**/*.{m,swift}",
|
|
@@ -83,6 +83,7 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
83
83
|
|
|
84
84
|
let remoteConfigJsonString = remoteConfig.getJsonString()
|
|
85
85
|
resolver(remoteConfigJsonString)
|
|
86
|
+
|
|
86
87
|
case .pluginConfigurations:
|
|
87
88
|
guard let pluginsContent = applicationData.pluginsUrlContent() else {
|
|
88
89
|
rejecter(Errors.canNotGetPluginsContent.code, Errors.canNotGetPluginsContent.message, nil)
|
|
@@ -91,6 +92,7 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
91
92
|
|
|
92
93
|
let jsonString = JsonHelper.convertObjectToJsonString(object: pluginsContent, options: [])
|
|
93
94
|
resolver(jsonString)
|
|
95
|
+
|
|
94
96
|
case .layout:
|
|
95
97
|
guard let layoutId = getActiveOrDefaultFallbackLayoutId() else {
|
|
96
98
|
if let layoutContent = applicationData.layoutUrlContent() {
|
|
@@ -103,14 +105,19 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
103
105
|
return
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
guard let layoutUrlContent else {
|
|
108
|
-
|
|
108
|
+
Task {
|
|
109
|
+
guard let layoutUrlContent = await applicationData.layoutUrlContent(for: layoutId) else {
|
|
110
|
+
DispatchQueue.main.async {
|
|
111
|
+
rejecter(Errors.canNotGetLayoutContentFromId.code, Errors.canNotGetLayoutContentFromId.message, nil)
|
|
112
|
+
}
|
|
109
113
|
return
|
|
110
114
|
}
|
|
111
115
|
|
|
112
|
-
|
|
116
|
+
DispatchQueue.main.async {
|
|
117
|
+
resolver(layoutUrlContent.getJsonString())
|
|
118
|
+
}
|
|
113
119
|
}
|
|
120
|
+
|
|
114
121
|
case .cellStyles:
|
|
115
122
|
guard let layoutId = getActiveOrDefaultFallbackLayoutId() else {
|
|
116
123
|
if let cellStylesContent = applicationData.cellStylesUrlContent() {
|
|
@@ -122,14 +129,19 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
122
129
|
return
|
|
123
130
|
}
|
|
124
131
|
|
|
125
|
-
|
|
126
|
-
guard let cellStylesUrlContent else {
|
|
127
|
-
|
|
132
|
+
Task {
|
|
133
|
+
guard let cellStylesUrlContent = await applicationData.cellStylesUrlContent(for: layoutId) else {
|
|
134
|
+
DispatchQueue.main.async {
|
|
135
|
+
rejecter(Errors.canNotGetCellStylesContent.code, Errors.canNotGetCellStylesContent.message, nil)
|
|
136
|
+
}
|
|
128
137
|
return
|
|
129
138
|
}
|
|
130
139
|
|
|
131
|
-
|
|
140
|
+
DispatchQueue.main.async {
|
|
141
|
+
resolver(cellStylesUrlContent.getJsonString())
|
|
142
|
+
}
|
|
132
143
|
}
|
|
144
|
+
|
|
133
145
|
case .styles:
|
|
134
146
|
guard let stylesURLContent = applicationData.stylesUrlContent() else {
|
|
135
147
|
rejecter(Errors.canNotGetStylesContent.code, Errors.canNotGetStylesContent.message, nil)
|
|
@@ -138,18 +150,37 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
138
150
|
|
|
139
151
|
let stylesURLContentJsonString = stylesURLContent.getJsonString()
|
|
140
152
|
resolver(stylesURLContentJsonString)
|
|
153
|
+
|
|
141
154
|
case .pipesEndpoints:
|
|
142
155
|
guard let pipesEndpointContent = applicationData.pipesEndpointContent() else {
|
|
143
156
|
rejecter(Errors.canNotGetPipesEndpointContent.code, Errors.canNotGetPipesEndpointContent.message, nil)
|
|
144
157
|
return
|
|
145
158
|
}
|
|
146
159
|
resolver(pipesEndpointContent.getJsonString())
|
|
160
|
+
|
|
147
161
|
case .presetsMapping:
|
|
148
|
-
guard let
|
|
149
|
-
|
|
162
|
+
guard let layoutId = getActiveOrDefaultFallbackLayoutId() else {
|
|
163
|
+
if let presetsMappingContent = applicationData.presetsMappingContent() {
|
|
164
|
+
let presetsMappingContentJsonString = presetsMappingContent.getJsonString()
|
|
165
|
+
resolver(presetsMappingContentJsonString)
|
|
166
|
+
} else {
|
|
167
|
+
rejecter(Errors.canNotGetPresetsMappingContent.code, Errors.canNotGetPresetsMappingContent.message, nil)
|
|
168
|
+
}
|
|
150
169
|
return
|
|
151
170
|
}
|
|
152
|
-
|
|
171
|
+
|
|
172
|
+
Task {
|
|
173
|
+
guard let presetsMappingContent = await applicationData.presetsMappingContent(for: layoutId) else {
|
|
174
|
+
DispatchQueue.main.async {
|
|
175
|
+
rejecter(Errors.canNotGetPresetsMappingContent.code, Errors.canNotGetPresetsMappingContent.message, nil)
|
|
176
|
+
}
|
|
177
|
+
return
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
DispatchQueue.main.async {
|
|
181
|
+
resolver(presetsMappingContent.getJsonString())
|
|
182
|
+
}
|
|
183
|
+
}
|
|
153
184
|
}
|
|
154
185
|
}
|
|
155
186
|
|
|
@@ -163,22 +194,21 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
|
|
|
163
194
|
return
|
|
164
195
|
}
|
|
165
196
|
|
|
166
|
-
|
|
167
|
-
guard let _ = layoutUrlContent
|
|
168
|
-
|
|
197
|
+
Task {
|
|
198
|
+
guard let _ = await applicationData.layoutUrlContent(for: layoutId),
|
|
199
|
+
let _ = await applicationData.cellStylesUrlContent(for: layoutId),
|
|
200
|
+
self.saveActiveLayoutId(id: layoutId) else {
|
|
201
|
+
DispatchQueue.main.async {
|
|
202
|
+
rejecter(Errors.switchToNewLayoutMessage.code, Errors.switchToNewLayoutMessage.message, nil)
|
|
203
|
+
}
|
|
169
204
|
return
|
|
170
205
|
}
|
|
171
206
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
rejecter(Errors.switchToNewLayoutMessage.code, Errors.switchToNewLayoutMessage.message, nil)
|
|
178
|
-
return
|
|
179
|
-
}
|
|
180
|
-
resolver(true)
|
|
181
|
-
}
|
|
207
|
+
// optional presets mapping
|
|
208
|
+
let _ = await applicationData.presetsMappingContent(for: layoutId)
|
|
209
|
+
|
|
210
|
+
DispatchQueue.main.async {
|
|
211
|
+
resolver(true)
|
|
182
212
|
}
|
|
183
213
|
}
|
|
184
214
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-native-apple",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.3",
|
|
4
4
|
"description": "iOS and tvOS native code for QuickBrick applications. This package is used to provide native logic for QuickBrick",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|