@applicaster/quick-brick-native-apple 5.22.4-alpha.0 → 5.22.5
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.22.
|
|
3
|
+
"version": "5.22.5",
|
|
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.22.
|
|
19
|
+
"tag": "@@applicaster/quick-brick-native-apple/5.22.5"
|
|
20
20
|
},
|
|
21
21
|
"requires_arc": true,
|
|
22
22
|
"source_files": "universal/**/*.{m,swift}",
|
|
@@ -11,9 +11,11 @@ import ZappCore
|
|
|
11
11
|
|
|
12
12
|
@objc(PushBridge)
|
|
13
13
|
class PushBridge: NSObject, RCTBridgeModule {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
enum Errors {
|
|
15
|
+
static let addTagsErrorCode = "error_add_tags"
|
|
16
|
+
static let removeTagsErrorCode = "error_remove_tags"
|
|
17
|
+
static let getTagsErrorCode = "error_get_tags"
|
|
18
|
+
}
|
|
17
19
|
|
|
18
20
|
static func moduleName() -> String! {
|
|
19
21
|
"PushBridge"
|
|
@@ -42,7 +44,7 @@ class PushBridge: NSObject, RCTBridgeModule {
|
|
|
42
44
|
case .success:
|
|
43
45
|
resolver(true)
|
|
44
46
|
case let .failure(error):
|
|
45
|
-
rejecter(
|
|
47
|
+
rejecter(Errors.addTagsErrorCode, error.description, nil)
|
|
46
48
|
}
|
|
47
49
|
})
|
|
48
50
|
}
|
|
@@ -61,7 +63,7 @@ class PushBridge: NSObject, RCTBridgeModule {
|
|
|
61
63
|
case .success:
|
|
62
64
|
resolver(true)
|
|
63
65
|
case let .failure(error):
|
|
64
|
-
rejecter(
|
|
66
|
+
rejecter(Errors.removeTagsErrorCode, error.localizedDescription, nil)
|
|
65
67
|
}
|
|
66
68
|
})
|
|
67
69
|
}
|
|
@@ -71,8 +73,15 @@ class PushBridge: NSObject, RCTBridgeModule {
|
|
|
71
73
|
/// - Parameters:
|
|
72
74
|
/// - resolver: resolver when everything succeed
|
|
73
75
|
@objc func getRegisteredTags(_ resolver: @escaping RCTPromiseResolveBlock,
|
|
74
|
-
rejecter
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
rejecter: @escaping RCTPromiseRejectBlock) {
|
|
77
|
+
FacadeConnector.connector?.push?.getDeviceTags { result in
|
|
78
|
+
switch result {
|
|
79
|
+
case let .success(tags):
|
|
80
|
+
let mergedTags = tags?.values.flatMap { $0 }
|
|
81
|
+
resolver(mergedTags)
|
|
82
|
+
case let .failure(error):
|
|
83
|
+
rejecter(Errors.getTagsErrorCode, error.description, nil)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
}
|
|
78
87
|
}
|
|
@@ -144,13 +144,12 @@ public class FocusableGroupView: RCTTVView {
|
|
|
144
144
|
return true
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
/// Focus guide that will catch the focus of the groups
|
|
148
|
+
var focusGuide = UIFocusGuide()
|
|
149
|
+
|
|
147
150
|
/// Manager that connects View instance to FocusableGroupViewModule
|
|
148
151
|
var manager: FocusableGroupViewModule?
|
|
149
152
|
|
|
150
|
-
override init(bridge: RCTBridge) {
|
|
151
|
-
super.init(bridge: bridge)
|
|
152
|
-
}
|
|
153
|
-
|
|
154
153
|
public required init?(coder aDecoder: NSCoder) {
|
|
155
154
|
super.init(coder: aDecoder)
|
|
156
155
|
setupFocus()
|
|
@@ -161,12 +160,6 @@ public class FocusableGroupView: RCTTVView {
|
|
|
161
160
|
setupFocus()
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
func initializeFocusGuideIfNeeded() {
|
|
165
|
-
if focusGuide == nil {
|
|
166
|
-
focusGuide = UIFocusGuide()
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
163
|
/// Update customPrefferedFocusEnvironment
|
|
171
164
|
///
|
|
172
165
|
/// - Parameter view: view instance that should be preffered
|
|
@@ -176,8 +169,6 @@ public class FocusableGroupView: RCTTVView {
|
|
|
176
169
|
|
|
177
170
|
/// Setup Focus Guide for use
|
|
178
171
|
func setupFocus() {
|
|
179
|
-
initializeFocusGuideIfNeeded()
|
|
180
|
-
|
|
181
172
|
addLayoutGuide(focusGuide)
|
|
182
173
|
|
|
183
174
|
focusGuide.leftAnchor.constraint(equalTo: leftAnchor).isActive = true
|
|
@@ -29,7 +29,7 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
|
|
|
29
29
|
/// url of the react server
|
|
30
30
|
private var jsBundleUrl: URL? {
|
|
31
31
|
RCTBundleURLProvider.sharedSettings()?.jsLocation = reactNativePackagerRoot
|
|
32
|
-
return RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index")
|
|
32
|
+
return RCTBundleURLProvider.sharedSettings()?.jsBundleURL(forBundleRoot: "index", fallbackResource: nil)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/// url of the react bundle file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-native-apple",
|
|
3
|
-
"version": "5.22.
|
|
3
|
+
"version": "5.22.5",
|
|
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"
|