sparkling-debug-tool 2.1.0-rc.12 → 2.1.0-rc.16
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.
|
@@ -22,6 +22,12 @@ object SparklingDebugTool {
|
|
|
22
22
|
|
|
23
23
|
@JvmStatic
|
|
24
24
|
fun init(application: Application) {
|
|
25
|
+
// Preset values must be set BEFORE LynxEnv flags so the DevTool
|
|
26
|
+
// service picks them up during initialization.
|
|
27
|
+
LynxDevToolService.INSTANCE.setLynxDebugPresetValue(true)
|
|
28
|
+
LynxDevToolService.INSTANCE.setLogBoxPresetValue(true)
|
|
29
|
+
LynxDevToolService.INSTANCE.setLoadJsBridge(true)
|
|
30
|
+
|
|
25
31
|
LynxServiceCenter.inst().registerService(LynxDevToolService.INSTANCE)
|
|
26
32
|
LynxEnv.inst().enableLynxDebug(true)
|
|
27
33
|
LynxEnv.inst().enableDevtool(true)
|
|
@@ -5,15 +5,30 @@
|
|
|
5
5
|
import Foundation
|
|
6
6
|
import Lynx
|
|
7
7
|
import UIKit
|
|
8
|
+
import DebugRouter
|
|
8
9
|
|
|
9
10
|
@objcMembers
|
|
10
11
|
public class SparklingDebugTool: NSObject {
|
|
11
12
|
private static let devURLKey = "sparkling.debug.dev_url"
|
|
12
13
|
|
|
13
14
|
public static func setup() {
|
|
14
|
-
LynxEnv
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// Preset values must be set BEFORE LynxEnv flags so the DevTool
|
|
16
|
+
// service picks them up during initialization.
|
|
17
|
+
|
|
18
|
+
if let devtool = LynxServices.getInstanceWith(LynxServiceDevToolProtocol.self)
|
|
19
|
+
as? LynxServiceDevToolProtocol {
|
|
20
|
+
devtool.logBoxPresetValue = true
|
|
21
|
+
devtool.lynxDebugPresetValue = true
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let env = LynxEnv.sharedInstance()
|
|
25
|
+
env.lynxDebugEnabled = true
|
|
26
|
+
env.devtoolEnabled = true
|
|
27
|
+
env.logBoxEnabled = true
|
|
28
|
+
|
|
29
|
+
// Enable DebugRouter so the DevTool desktop app can discover and
|
|
30
|
+
// connect to this app (via USB or network).
|
|
31
|
+
DebugRouter.instance().enableAllSessions()
|
|
17
32
|
}
|
|
18
33
|
|
|
19
34
|
public static func devURL(fallback: String) -> String {
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
-
|
|
5
1
|
Pod::Spec.new do |s|
|
|
6
2
|
s.name = 'Sparkling-DebugTool'
|
|
7
|
-
s.version =
|
|
8
|
-
s.summary =
|
|
9
|
-
s.description =
|
|
3
|
+
s.version = "2.1.0-rc.16"
|
|
4
|
+
s.summary = "Sparkling debug tool SDK"
|
|
5
|
+
s.description = "Sparkling debug tool SDK"
|
|
10
6
|
s.license = { :type => 'Apache-2.0' }
|
|
11
7
|
s.author = 'TikTok'
|
|
12
8
|
s.homepage = 'https://github.com/tiktok/sparkling'
|
|
@@ -16,12 +12,11 @@ Pod::Spec.new do |s|
|
|
|
16
12
|
s.static_framework = true
|
|
17
13
|
|
|
18
14
|
s.source_files = [
|
|
19
|
-
'packages/sparkling-debug-tool/ios/Sources/**/*.{h,m,swift}',
|
|
20
|
-
'ios/Sources/**/*.{h,m,swift}',
|
|
21
15
|
'Sources/**/*.{h,m,swift}'
|
|
22
16
|
]
|
|
23
17
|
|
|
24
18
|
s.dependency 'Lynx', '~> 3.6.0'
|
|
25
19
|
s.dependency 'LynxService/Devtool', '~> 3.6.0'
|
|
26
20
|
s.dependency 'LynxDevtool/Framework', '~> 3.6.0'
|
|
21
|
+
s.dependency 'DebugRouter'
|
|
27
22
|
end
|