@applicaster/quick-brick-native-apple 5.20.0 → 5.20.2

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.2",
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.2"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -36,8 +36,7 @@ class PushBridge: NSObject, RCTBridgeModule {
36
36
  /// - rejecter: rejecter when something fails
37
37
  @objc func registerTags(_ tags: [String]?,
38
38
  resolver: @escaping RCTPromiseResolveBlock,
39
- rejecter: @escaping RCTPromiseRejectBlock)
40
- {
39
+ rejecter: @escaping RCTPromiseRejectBlock) {
41
40
  FacadeConnector.connector?.push?.addTags(tags, completion: { result in
42
41
  switch result {
43
42
  case .success:
@@ -56,8 +55,7 @@ class PushBridge: NSObject, RCTBridgeModule {
56
55
  /// - rejecter: rejecter when something fails
57
56
  @objc func unregisterTags(_ tags: [String]?,
58
57
  resolver: @escaping RCTPromiseResolveBlock,
59
- rejecter: @escaping RCTPromiseRejectBlock)
60
- {
58
+ rejecter: @escaping RCTPromiseRejectBlock) {
61
59
  FacadeConnector.connector?.push?.removeTags(tags, completion: { result in
62
60
  switch result {
63
61
  case .success:
@@ -73,8 +71,7 @@ class PushBridge: NSObject, RCTBridgeModule {
73
71
  /// - Parameters:
74
72
  /// - resolver: resolver when everything succeed
75
73
  @objc func getRegisteredTags(_ resolver: @escaping RCTPromiseResolveBlock,
76
- rejecter _: @escaping RCTPromiseResolveBlock)
77
- {
74
+ rejecter _: @escaping RCTPromiseResolveBlock) {
78
75
  let tags = FacadeConnector.connector?.push?.getDeviceTags()
79
76
  resolver(tags)
80
77
  }
@@ -30,8 +30,7 @@ public extension ReactNativeManager {
30
30
  {
31
31
  let userInfo = userInfo
32
32
  if let urlString = getLink(userInfo: userInfo),
33
- let url = URL(string: urlString)
34
- {
33
+ let url = URL(string: urlString) {
35
34
  UIApplication.shared.open(url,
36
35
  options: [:],
37
36
  completionHandler: nil)
@@ -91,8 +91,7 @@ class FocusableGroupManager {
91
91
  /// - itemId: Id of the FocusableView to search
92
92
  /// - Returns: FocusableView instance if exist in searched group, otherwise nil
93
93
  class func item(byGroupId groupId: String,
94
- andItemId itemId: String) -> FocusableView?
95
- {
94
+ andItemId itemId: String) -> FocusableView? {
96
95
  itemsForGroup(by: groupId).first(where: { $0.key == itemId })?.value
97
96
  }
98
97
 
@@ -109,15 +108,13 @@ class FocusableGroupManager {
109
108
  let itemId = itemId,
110
109
  let groupView = focusableGroups[groupId],
111
110
  let viewToFocus = FocusableGroupManager.item(byGroupId: groupId,
112
- andItemId: itemId)
113
- {
111
+ andItemId: itemId) {
114
112
  groupView.updatePrefferedFocusEnv(with: viewToFocus)
115
113
 
116
114
  var rootView: UIView? = groupView
117
115
  while rootView !== nil, rootView?.isReactRootView() == false {
118
116
  if let unwrapedRootView = rootView,
119
- let superView = unwrapedRootView.superview
120
- {
117
+ let superView = unwrapedRootView.superview {
121
118
  rootView = superView
122
119
  } else {
123
120
  rootView = nil
@@ -129,8 +126,7 @@ class FocusableGroupManager {
129
126
  }
130
127
 
131
128
  if let rootView = rootView,
132
- let superView = rootView.superview as? RCTRootView
133
- {
129
+ let superView = rootView.superview as? RCTRootView {
134
130
  superView.reactPreferredFocusedView = viewToFocus
135
131
  if needsForceUpdate == true {
136
132
  superView.setNeedsFocusUpdate()
@@ -57,8 +57,7 @@ public class FocusableGroupView: RCTTVView {
57
57
 
58
58
  while rootView?.superview != nil {
59
59
  if let unwrapedRootView = rootView,
60
- let superView = unwrapedRootView.superview
61
- {
60
+ let superView = unwrapedRootView.superview {
62
61
  rootView = superView
63
62
  if let superFocusGroup = rootView as? FocusableGroupView {
64
63
  if let newFocusData = customPrefferedFocusEnvironment as? [FocusableView],
@@ -110,13 +109,11 @@ public class FocusableGroupView: RCTTVView {
110
109
 
111
110
  if focusItemIsDescendant(nextFocuseItem: nextFocusedItem) == false {
112
111
  if resetFocusToInitialValue,
113
- let initialItemId = initialItemId
114
- {
112
+ let initialItemId = initialItemId {
115
113
  if tryTakePrefferedViewFromDependantGroups() == false {
116
114
  if let groupId = groupId,
117
115
  let initialItemView = FocusableGroupManager.item(byGroupId: groupId,
118
- andItemId: initialItemId)
119
- {
116
+ andItemId: initialItemId) {
120
117
  customPrefferedFocusEnvironment = [initialItemView]
121
118
  retVal = true
122
119
  }
@@ -208,8 +205,7 @@ public class FocusableGroupView: RCTTVView {
208
205
  params[GroupViewUpdateEvents.isActive] = false
209
206
  isFocusDisabled = false
210
207
  if resetFocusToInitialValue,
211
- let initialItemId = initialItemId
212
- {
208
+ let initialItemId = initialItemId {
213
209
  if let groupId = groupId {
214
210
  let groupItems = FocusableGroupManager.itemsForGroup(by: groupId)
215
211
  if let initialItemView = groupItems[initialItemId] {
@@ -37,8 +37,7 @@ public class FocusableView: ParallaxView {
37
37
  }
38
38
  DispatchQueue.main.async { [weak self] in
39
39
  if let groupId = self?.groupId,
40
- let focusableGroup = focusableGroups[groupId]
41
- {
40
+ let focusableGroup = focusableGroups[groupId] {
42
41
  // Update Prefered focus view in group
43
42
  focusableGroup.updatePrefferedFocusEnv(with: self!)
44
43
  }
@@ -86,8 +86,7 @@ extension UIView: AnyParallaxableView {
86
86
  } else {
87
87
  if subviews.count > 1,
88
88
  let rnView = subviews[1] as? RCTTVView,
89
- let subviews = findSubview(view: rnView)
90
- {
89
+ let subviews = findSubview(view: rnView) {
91
90
  subviews.filter { $0 !== options.glowContainerView }
92
91
  .enumerated()
93
92
  .forEach { (index: Int, subview: UIView) in
@@ -49,8 +49,7 @@ extension ParallaxEffectOptions {
49
49
  if case let bundle = Bundle(for: ParallaxView.self),
50
50
  let glowImage = UIImage(named: "gloweffect",
51
51
  in: bundle,
52
- compatibleWith: nil)
53
- {
52
+ compatibleWith: nil) {
54
53
  glowImage.accessibilityIdentifier = glowImageAccessibilityIdentifier
55
54
  let imageView = UIImageView(image: glowImage)
56
55
  imageView.contentMode = .scaleAspectFit
@@ -55,8 +55,7 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
55
55
  @objc public func getFile(_ type: String,
56
56
  options _: [String: Any]?,
57
57
  resolver: @escaping RCTPromiseResolveBlock,
58
- rejecter: @escaping RCTPromiseRejectBlock)
59
- {
58
+ rejecter: @escaping RCTPromiseRejectBlock) {
60
59
  guard let applicationData = FacadeConnector.connector?.applicationData else {
61
60
  rejecter("2", Errors.canNotAccessAppData, nil)
62
61
  return
@@ -126,11 +125,10 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
126
125
  }
127
126
  }
128
127
 
129
- @objc public func switchLayout(layoutId: String,
128
+ @objc public func switchLayout(_ layoutId: String,
130
129
  options _: [String: Any]?,
131
130
  resolver: @escaping RCTPromiseResolveBlock,
132
- rejecter: @escaping RCTPromiseRejectBlock)
133
- {
131
+ rejecter: @escaping RCTPromiseRejectBlock) {
134
132
  // Construct the layout and cell_style URLS
135
133
  guard let applicationData = FacadeConnector.connector?.applicationData else {
136
134
  rejecter("2", Errors.canNotAccessAppData, nil)
@@ -144,22 +142,22 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
144
142
  }
145
143
 
146
144
  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
145
+ DispatchQueue.main.async {
146
+ guard let _ = cellStylesUrlContent,
147
+ self.saveLayoutId(id: layoutId)
148
+ else {
149
+ rejecter("4", Errors.switchToNewLayoutMessage, nil)
150
+ return
151
+ }
152
+ resolver(true)
152
153
  }
153
-
154
- resolver(true)
155
154
  }
156
155
  }
157
156
  }
158
157
 
159
158
  // get the current layout id
160
159
  @objc public func getCurrentLayoutId(_ resolve: @escaping RCTPromiseResolveBlock,
161
- rejecter: @escaping RCTPromiseRejectBlock)
162
- {
160
+ rejecter: @escaping RCTPromiseRejectBlock) {
163
161
  guard let layoutId = getLayoutId() else {
164
162
  getDefaultLayoutId(resolve, rejecter: rejecter)
165
163
  return
@@ -170,8 +168,7 @@ class AppLoaderBridge: NSObject, RCTBridgeModule {
170
168
 
171
169
  // get the defualt layout id
172
170
  @objc public func getDefaultLayoutId(_ resolve: @escaping RCTPromiseResolveBlock,
173
- rejecter: @escaping RCTPromiseRejectBlock)
174
- {
171
+ rejecter: @escaping RCTPromiseRejectBlock) {
175
172
  guard let applicationData = FacadeConnector.connector?.applicationData else {
176
173
  rejecter("2", Errors.canNotAccessAppData, nil)
177
174
  return
@@ -34,8 +34,7 @@ class LocalNotificationBridge: NSObject, RCTBridgeModule {
34
34
 
35
35
  @objc func cancelLocalNotifications(_ identifiers: [String]?,
36
36
  resolver: @escaping RCTPromiseResolveBlock,
37
- rejecter: @escaping RCTPromiseRejectBlock)
38
- {
37
+ rejecter: @escaping RCTPromiseRejectBlock) {
39
38
  guard let identifiers = identifiers else {
40
39
  rejecter(Errors.failedToCancelLocalNotifications,
41
40
  nil,
@@ -57,8 +56,7 @@ class LocalNotificationBridge: NSObject, RCTBridgeModule {
57
56
 
58
57
  @objc public func presentLocalNotification(_ payload: [AnyHashable: Any]?,
59
58
  resolver: @escaping RCTPromiseResolveBlock,
60
- rejecter: @escaping RCTPromiseRejectBlock)
61
- {
59
+ rejecter: @escaping RCTPromiseRejectBlock) {
62
60
  guard let payload = payload as [AnyHashable: Any]? else {
63
61
  return
64
62
  }
@@ -45,8 +45,7 @@ class OfflineAssetsBridge: NSObject, RCTBridgeModule {
45
45
  @objc public func storeFiles(_ filesList: [[String: Any]]?,
46
46
  options: [String: Any]?,
47
47
  resolver: @escaping RCTPromiseResolveBlock,
48
- rejecter: @escaping RCTPromiseRejectBlock)
49
- {
48
+ rejecter: @escaping RCTPromiseRejectBlock) {
50
49
  // Request Header configuration:
51
50
  let configuration = URLSessionConfiguration.default
52
51
  let session = URLSession(configuration: configuration)
@@ -67,8 +66,7 @@ class OfflineAssetsBridge: NSObject, RCTBridgeModule {
67
66
  files.forEach { item in
68
67
  if let urlString = item[Params.url] as? String,
69
68
  let url = URL(string: urlString),
70
- let filePath = item[Params.file] as? String
71
- {
69
+ let filePath = item[Params.file] as? String {
72
70
  let filePathUrl = URL(fileURLWithPath: filePath.replacingOccurrences(of: "file://", with: ""))
73
71
  let task = FetchTask(url: url,
74
72
  saveTo: filePathUrl,
@@ -92,8 +90,7 @@ class OfflineAssetsBridge: NSObject, RCTBridgeModule {
92
90
  }
93
91
 
94
92
  @objc public func getFilesDirectory(_ resolver: @escaping RCTPromiseResolveBlock,
95
- rejecter: @escaping RCTPromiseRejectBlock)
96
- {
93
+ rejecter: @escaping RCTPromiseRejectBlock) {
97
94
  let folderName = "OfflineAssets"
98
95
 
99
96
  if let folderUrl = FileManager.default.getContentFolder(appendingFolderName: folderName) {
@@ -107,8 +104,7 @@ class OfflineAssetsBridge: NSObject, RCTBridgeModule {
107
104
 
108
105
  @objc public func delete(_ path: String?,
109
106
  resolver: @escaping RCTPromiseResolveBlock,
110
- rejecter: @escaping RCTPromiseRejectBlock)
111
- {
107
+ rejecter: @escaping RCTPromiseRejectBlock) {
112
108
  var success = false
113
109
  let fileManager = FileManager.default
114
110
 
@@ -147,14 +143,12 @@ class OfflineAssetsBridge: NSObject, RCTBridgeModule {
147
143
  var retValue = [FetchTaskOption]()
148
144
 
149
145
  if let boolValue = options?["overrideExistingFiles"] as? Bool,
150
- boolValue == true
151
- {
146
+ boolValue == true {
152
147
  retValue.append(.overrideExistingFiles)
153
148
  }
154
149
 
155
150
  if let boolValue = options?["abortOnFail"] as? Bool,
156
- boolValue == true
157
- {
151
+ boolValue == true {
158
152
  retValue.append(.abortOnFail)
159
153
  }
160
154
 
@@ -43,8 +43,7 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
43
43
 
44
44
  @objc public func isPluginEnabled(_ identifier: String?,
45
45
  resolver: @escaping RCTPromiseResolveBlock,
46
- rejecter: @escaping RCTPromiseRejectBlock)
47
- {
46
+ rejecter: @escaping RCTPromiseRejectBlock) {
48
47
  guard let identifier = identifier else {
49
48
  rejecter(Errors.noIdentifierCode,
50
49
  Errors.noIdentifierBody,
@@ -62,8 +61,7 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
62
61
 
63
62
  @objc public func disablePlugin(_ identifier: String?,
64
63
  resolver: @escaping RCTPromiseResolveBlock,
65
- rejecter: @escaping RCTPromiseRejectBlock)
66
- {
64
+ rejecter: @escaping RCTPromiseRejectBlock) {
67
65
  guard let identifier = identifier else {
68
66
  rejecter(Errors.noIdentifierCode,
69
67
  Errors.noIdentifierBody,
@@ -83,8 +81,7 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
83
81
 
84
82
  @objc public func disableAllPlugins(_ pluginType: String?,
85
83
  resolver: @escaping RCTPromiseResolveBlock,
86
- rejecter: @escaping RCTPromiseRejectBlock)
87
- {
84
+ rejecter: @escaping RCTPromiseRejectBlock) {
88
85
  guard let pluginType = pluginType else {
89
86
  rejecter(Errors.noTypeCode,
90
87
  Errors.noTypeBody,
@@ -105,8 +102,7 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
105
102
 
106
103
  @objc public func enablePlugin(_ identifier: String?,
107
104
  resolver: @escaping RCTPromiseResolveBlock,
108
- rejecter: @escaping RCTPromiseRejectBlock)
109
- {
105
+ rejecter: @escaping RCTPromiseRejectBlock) {
110
106
  guard let identifier = identifier else {
111
107
  rejecter(Errors.noIdentifierCode,
112
108
  Errors.noIdentifierBody,
@@ -128,8 +124,7 @@ class PluginsManagerBridge: NSObject, RCTBridgeModule {
128
124
 
129
125
  @objc public func enableAllPlugins(_ pluginType: String?,
130
126
  resolver: @escaping RCTPromiseResolveBlock,
131
- rejecter: @escaping RCTPromiseRejectBlock)
132
- {
127
+ rejecter: @escaping RCTPromiseRejectBlock) {
133
128
  guard let pluginType = pluginType else {
134
129
  rejecter(Errors.noTypeCode,
135
130
  Errors.noTypeBody,
@@ -137,8 +137,7 @@ class ReactNativeCommunicationModule: NSObject, RCTBridgeModule {
137
137
 
138
138
  @objc func setAppLanguage(_ language: String?,
139
139
  resolver: @escaping RCTPromiseResolveBlock,
140
- rejecter: @escaping RCTPromiseRejectBlock)
141
- {
140
+ rejecter: @escaping RCTPromiseRejectBlock) {
142
141
  let storageKey = "forcedLanguageCode"
143
142
 
144
143
  guard let language = language else {
@@ -170,8 +169,7 @@ class ReactNativeCommunicationModule: NSObject, RCTBridgeModule {
170
169
 
171
170
  if storage.localStorageSetValue(for: storageKey,
172
171
  value: language,
173
- namespace: nil) == true
174
- {
172
+ namespace: nil) == true {
175
173
  resolver(true)
176
174
  } else {
177
175
  rejecter(ReactNativeCommunicationModuleError.errorCode,
@@ -12,8 +12,7 @@ import ZappCore
12
12
  extension ReactNativeManager: UIApplicationDelegate {
13
13
  public func application(_ app: UIApplication,
14
14
  open url: URL,
15
- options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool
16
- {
15
+ options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
17
16
  RCTLinkingManager.application(app,
18
17
  open: url,
19
18
  options: options)
@@ -58,8 +58,7 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
58
58
  if reactNativePackagerRoot == "dev" ||
59
59
  reactNativePackagerRoot == "localhost" ||
60
60
  reactNativePackagerRoot == "localhost:8081" ||
61
- reactNativePackagerRoot.isIPv4WithPort
62
- {
61
+ reactNativePackagerRoot.isIPv4WithPort {
63
62
  retVal = true
64
63
  }
65
64
 
@@ -74,8 +73,7 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
74
73
  // MARK: UserInterfaceLayerProtocol
75
74
 
76
75
  public required init(launchOptions: [UIApplication.LaunchOptionsKey: Any]?,
77
- applicationData: [String: Any] = [:])
78
- {
76
+ applicationData: [String: Any] = [:]) {
79
77
  super.init()
80
78
  self.launchOptions = launchOptions
81
79
 
@@ -46,8 +46,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
46
46
  /// - rejecter: rejecter when something fails
47
47
  @objc public func setItem(_ key: String?, value: String?, namespace: String?,
48
48
  resolver: @escaping RCTPromiseResolveBlock,
49
- rejecter: @escaping RCTPromiseRejectBlock)
50
- {
49
+ rejecter: @escaping RCTPromiseRejectBlock) {
51
50
  guard let key = key,
52
51
  let value = value,
53
52
  let storage = FacadeConnector.connector?.storage
@@ -58,8 +57,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
58
57
 
59
58
  if storage.localStorageSetValue(for: key,
60
59
  value: value,
61
- namespace: namespace) == true
62
- {
60
+ namespace: namespace) == true {
63
61
  resolver(true)
64
62
  } else {
65
63
  rejecter(Errors.errorCode, Errors.errorMessageSet, nil)
@@ -76,8 +74,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
76
74
  @objc public func getItem(_ key: String?,
77
75
  namespace: String?,
78
76
  resolver: @escaping RCTPromiseResolveBlock,
79
- rejecter: @escaping RCTPromiseRejectBlock)
80
- {
77
+ rejecter: @escaping RCTPromiseRejectBlock) {
81
78
  guard let key = key,
82
79
  let storage = FacadeConnector.connector?.storage
83
80
  else {
@@ -99,8 +96,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
99
96
  @objc public func removeItem(_ key: String?,
100
97
  namespace: String?,
101
98
  resolver: @escaping RCTPromiseResolveBlock,
102
- rejecter: @escaping RCTPromiseRejectBlock)
103
- {
99
+ rejecter: @escaping RCTPromiseRejectBlock) {
104
100
  guard let key = key,
105
101
  let storage = FacadeConnector.connector?.storage
106
102
  else {
@@ -121,8 +117,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
121
117
  /// - rejecter: rejecter when something fails
122
118
  @objc public func getAllItems(_ namespace: String?,
123
119
  resolver: @escaping RCTPromiseResolveBlock,
124
- rejecter: @escaping RCTPromiseRejectBlock)
125
- {
120
+ rejecter: @escaping RCTPromiseRejectBlock) {
126
121
  guard let storage = FacadeConnector.connector?.storage else {
127
122
  rejecter(Errors.errorCode, Errors.errorMessageGet, nil)
128
123
  return
@@ -144,8 +139,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
144
139
  value: String?,
145
140
  namespace: String?,
146
141
  resolver: @escaping RCTPromiseResolveBlock,
147
- rejecter: @escaping RCTPromiseRejectBlock)
148
- {
142
+ rejecter: @escaping RCTPromiseRejectBlock) {
149
143
  guard let key = key,
150
144
  let value = value,
151
145
  let storage = FacadeConnector.connector?.storage
@@ -156,8 +150,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
156
150
 
157
151
  if storage.keychainStorageSetValue(for: key,
158
152
  value: value,
159
- namespace: namespace) == true
160
- {
153
+ namespace: namespace) == true {
161
154
  resolver(true)
162
155
  } else {
163
156
  rejecter(Errors.errorCode, Errors.errorMessageSet, nil)
@@ -174,8 +167,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
174
167
  @objc public func getKeychainItem(_ key: String?,
175
168
  namespace: String?,
176
169
  resolver: @escaping RCTPromiseResolveBlock,
177
- rejecter: @escaping RCTPromiseRejectBlock)
178
- {
170
+ rejecter: @escaping RCTPromiseRejectBlock) {
179
171
  guard let key = key,
180
172
  let storage = FacadeConnector.connector?.storage
181
173
  else {
@@ -197,8 +189,7 @@ class LocalStorageBridge: NSObject, RCTBridgeModule {
197
189
  @objc public func removeKeychainItem(_ key: String?,
198
190
  namespace: String?,
199
191
  resolver: @escaping RCTPromiseResolveBlock,
200
- rejecter: @escaping RCTPromiseRejectBlock)
201
- {
192
+ rejecter: @escaping RCTPromiseRejectBlock) {
202
193
  guard let key = key,
203
194
  let storage = FacadeConnector.connector?.storage
204
195
  else {
@@ -46,8 +46,7 @@ class SessionStorageBridge: NSObject, RCTBridgeModule {
46
46
  /// - rejecter: rejecter when something fails
47
47
  @objc public func setItem(_ key: String?, value: String?, namespace: String?,
48
48
  resolver: @escaping RCTPromiseResolveBlock,
49
- rejecter: @escaping RCTPromiseRejectBlock)
50
- {
49
+ rejecter: @escaping RCTPromiseRejectBlock) {
51
50
  guard let key = key,
52
51
  let value = value,
53
52
  let storage = FacadeConnector.connector?.storage
@@ -58,8 +57,7 @@ class SessionStorageBridge: NSObject, RCTBridgeModule {
58
57
 
59
58
  if storage.sessionStorageSetValue(for: key,
60
59
  value: value,
61
- namespace: namespace) == true
62
- {
60
+ namespace: namespace) == true {
63
61
  resolver(true)
64
62
  } else {
65
63
  rejecter(Errors.errorCode, Errors.errorMessageSet, nil)
@@ -75,8 +73,7 @@ class SessionStorageBridge: NSObject, RCTBridgeModule {
75
73
  /// - rejecter: rejecter when something fails
76
74
  @objc public func getItem(_ key: String?, namespace: String?,
77
75
  resolver: @escaping RCTPromiseResolveBlock,
78
- rejecter: @escaping RCTPromiseRejectBlock)
79
- {
76
+ rejecter: @escaping RCTPromiseRejectBlock) {
80
77
  guard let key = key,
81
78
  let storage = FacadeConnector.connector?.storage
82
79
  else {
@@ -99,8 +96,7 @@ class SessionStorageBridge: NSObject, RCTBridgeModule {
99
96
  @objc public func removeItem(_ key: String?,
100
97
  namespace: String?,
101
98
  resolver: @escaping RCTPromiseResolveBlock,
102
- rejecter: @escaping RCTPromiseRejectBlock)
103
- {
99
+ rejecter: @escaping RCTPromiseRejectBlock) {
104
100
  guard let key = key,
105
101
  let storage = FacadeConnector.connector?.storage
106
102
  else {
@@ -121,8 +117,7 @@ class SessionStorageBridge: NSObject, RCTBridgeModule {
121
117
  /// - rejecter: rejecter when something fails
122
118
  @objc public func getAllItems(_ namespace: String?,
123
119
  resolver: @escaping RCTPromiseResolveBlock,
124
- rejecter: @escaping RCTPromiseRejectBlock)
125
- {
120
+ rejecter: @escaping RCTPromiseRejectBlock) {
126
121
  guard let storage = FacadeConnector.connector?.storage else {
127
122
  rejecter(Errors.errorCode, Errors.errorMessageGet, nil)
128
123
  return
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.2",
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"