@applicaster/quick-brick-native-apple 5.20.0 → 5.20.1-alpha.0

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": "5.20.0",
3
+ "version": "5.20.1-alpha.0",
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/5.20.0"
19
+ "tag": "@@applicaster/quick-brick-native-apple/5.20.1-alpha.0"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -126,7 +126,7 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
126
126
  }
127
127
  }
128
128
 
129
- @objc public func switchLayout(layoutId: String,
129
+ @objc public func switchLayout(_ layoutId: String,
130
130
  options _: [String: Any]?,
131
131
  resolver: @escaping RCTPromiseResolveBlock,
132
132
  rejecter: @escaping RCTPromiseRejectBlock)
@@ -144,14 +144,15 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
144
144
  }
145
145
 
146
146
  applicationData.cellStylesUrlContent(for: layoutId) { cellStylesUrlContent in
147
- guard let _ = cellStylesUrlContent,
148
- self.saveLayoutId(id: layoutId)
149
- else {
150
- rejecter("4", Errors.switchToNewLayoutMessage, nil)
151
- return
147
+ DispatchQueue.main.async {
148
+ guard let _ = cellStylesUrlContent,
149
+ self.saveLayoutId(id: layoutId)
150
+ else {
151
+ rejecter("4", Errors.switchToNewLayoutMessage, nil)
152
+ return
153
+ }
154
+ resolver(true)
152
155
  }
153
-
154
- resolver(true)
155
156
  }
156
157
  }
157
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-native-apple",
3
- "version": "5.20.0",
3
+ "version": "5.20.1-alpha.0",
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"