@applicaster/quick-brick-native-apple 5.13.2 → 5.13.3-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.13.
|
|
3
|
+
"version": "5.13.3-alpha.0",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"ios": "12.0",
|
|
6
6
|
"tvos": "12.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.13.
|
|
19
|
+
"tag": "@@applicaster/quick-brick-native-apple/5.13.3-alpha.0"
|
|
20
20
|
},
|
|
21
21
|
"requires_arc": true,
|
|
22
22
|
"source_files": "universal/**/*.{m,swift}",
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// Copyright © 2018 Applicaster LTD. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
|
+
import os.log
|
|
9
10
|
import React
|
|
10
11
|
import UIKit
|
|
11
12
|
import XrayLogger
|
|
@@ -169,6 +170,13 @@ extension ReactNativeManager: RCTBridgeDelegate {
|
|
|
169
170
|
}
|
|
170
171
|
return nil
|
|
171
172
|
}
|
|
173
|
+
|
|
174
|
+
public func extraModules(for bridge: RCTBridge!) -> [RCTBridgeModule]! {
|
|
175
|
+
let qbExceptionManager = QBExceptionManager()
|
|
176
|
+
let rctException = RCTExceptionsManager(delegate: qbExceptionManager)
|
|
177
|
+
|
|
178
|
+
return [rctException, qbExceptionManager]
|
|
179
|
+
}
|
|
172
180
|
}
|
|
173
181
|
|
|
174
182
|
extension ReactNativeManager: QuickBrickManagerDelegate {
|
|
@@ -217,3 +225,49 @@ extension ReactNativeManager: QuickBrickManagerDelegate {
|
|
|
217
225
|
EventsBus.post(EventsBus.Event(type: EventsBusType(.forceAppReload)))
|
|
218
226
|
}
|
|
219
227
|
}
|
|
228
|
+
|
|
229
|
+
class QBExceptionManager: RCTExceptionsManager, RCTExceptionsManagerDelegate {
|
|
230
|
+
public lazy var logger = Logger.getLogger(for: ReactNativeManagerLogs.subsystem)
|
|
231
|
+
|
|
232
|
+
func handleSoftJSException(withMessage message: String?, stack: [Any]?, exceptionId: NSNumber) {
|
|
233
|
+
guard let message = message,
|
|
234
|
+
let stack = stack else {
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
let logOrigin = OSLog(subsystem: "\(Self.self)", category: "handleSoftJSException")
|
|
239
|
+
os_log("message: %@, stack: %@",
|
|
240
|
+
log: logOrigin,
|
|
241
|
+
type: .error,
|
|
242
|
+
message, stack)
|
|
243
|
+
|
|
244
|
+
logger?.errorLog(message: ReactNativeManagerLogs.handleSoftJSException.message,
|
|
245
|
+
category: ReactNativeManagerLogs.handleSoftJSException.category,
|
|
246
|
+
data: [
|
|
247
|
+
"message": message,
|
|
248
|
+
"stack": stack,
|
|
249
|
+
"exceptionId": "\(exceptionId)",
|
|
250
|
+
])
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
func handleFatalJSException(withMessage message: String?, stack: [Any]?, exceptionId: NSNumber) {
|
|
254
|
+
guard let message = message,
|
|
255
|
+
let stack = stack else {
|
|
256
|
+
return
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
let logOrigin = OSLog(subsystem: "\(Self.self)", category: "handleFatalJSException")
|
|
260
|
+
os_log("message: %@, stack: %@",
|
|
261
|
+
log: logOrigin,
|
|
262
|
+
type: .error,
|
|
263
|
+
message, stack)
|
|
264
|
+
|
|
265
|
+
logger?.errorLog(message: ReactNativeManagerLogs.handleFatalJSException.message,
|
|
266
|
+
category: ReactNativeManagerLogs.handleFatalJSException.category,
|
|
267
|
+
data: [
|
|
268
|
+
"message": message,
|
|
269
|
+
"stack": stack,
|
|
270
|
+
"exceptionId": "\(exceptionId)",
|
|
271
|
+
])
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -19,4 +19,6 @@ public struct ReactNativeManagerLogs: XrayLoggerTemplateProtocol {
|
|
|
19
19
|
public static var presentingReactViewController = LogTemplate(message: "Presenting React ViewController")
|
|
20
20
|
public static var setRightToLeftFlagError = LogTemplate(message: "Error setting RTL")
|
|
21
21
|
public static var failedToLoadJson = LogTemplate(message: "Failed to load json")
|
|
22
|
+
public static var handleSoftJSException = LogTemplate(message: "Soft JS Exception")
|
|
23
|
+
public static var handleFatalJSException = LogTemplate(message: "Fatal JS Exception")
|
|
22
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-native-apple",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.3-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"
|