File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed
Plugins/Platforms/Vendors Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ internal class iOSVendorSystem: VendorSystem {
76
76
return connectionStatus ( )
77
77
}
78
78
79
+ override var requiredPlugins : [ PlatformPlugin ] {
80
+ return [ iOSLifecycleMonitor ( ) , DeviceToken ( ) ]
81
+ }
82
+
79
83
private func deviceModel( ) -> String {
80
84
var name : [ Int32 ] = [ CTL_HW, HW_MACHINE]
81
85
var size : Int = 2
@@ -157,6 +161,10 @@ internal class watchOSVendorSystem: VendorSystem {
157
161
return ConnectionStatus . unknown
158
162
}
159
163
164
+ override var requiredPlugins : [ PlatformPlugin ] {
165
+ return [ watchOSLifecycleMonitor ( ) ]
166
+ }
167
+
160
168
private func deviceModel( ) -> String {
161
169
var name : [ Int32 ] = [ CTL_HW, HW_MACHINE]
162
170
var size : Int = 2
@@ -227,6 +235,10 @@ internal class MacOSVendorSystem: VendorSystem {
227
235
return connectionStatus ( )
228
236
}
229
237
238
+ override var requiredPlugins : [ PlatformPlugin ] {
239
+ return [ macOSLifecycleMonitor ( ) , DeviceToken ( ) ]
240
+ }
241
+
230
242
private func deviceModel( ) -> String {
231
243
var systemInfo = utsname ( )
232
244
uname ( & systemInfo)
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ class LinuxVendorSystem: VendorSystem {
49
49
override var connection : ConnectionStatus {
50
50
return ConnectionStatus . unknown
51
51
}
52
+
53
+ override var requiredPlugins : [ PlatformPlugin ] {
54
+ return [ ]
55
+ }
52
56
}
53
57
54
58
#endif
Original file line number Diff line number Diff line change @@ -65,7 +65,11 @@ internal class VendorSystem {
65
65
return ConnectionStatus . unknown
66
66
}
67
67
68
- static var current : VendorSystem {
68
+ var requiredPlugins : [ PlatformPlugin ] {
69
+ return [ ]
70
+ }
71
+
72
+ static var current : VendorSystem = {
69
73
#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
70
74
return iOSVendorSystem ( )
71
75
#elseif os(macOS)
@@ -77,5 +81,5 @@ internal class VendorSystem {
77
81
#else
78
82
return VendorSystem ( )
79
83
#endif
80
- }
84
+ } ( )
81
85
}
Original file line number Diff line number Diff line change @@ -40,20 +40,24 @@ extension Analytics: Subscriber {
40
40
// add context plugin as well as it's platform specific internally.
41
41
// this must come first.
42
42
plugins. append ( Context ( ) )
43
+
44
+ plugins += VendorSystem . current. requiredPlugins
43
45
44
46
// setup lifecycle if desired
45
47
if configuration. values. trackApplicationLifecycleEvents {
46
48
#if os(iOS) || os(tvOS)
47
- plugins += [ iOSLifecycleMonitor ( ) , iOSLifecycleEvents ( ) , DeviceToken ( ) ]
49
+ plugins. append ( iOSLifecycleEvents ( ) )
48
50
#endif
49
51
#if os(watchOS)
50
- plugins += [ watchOSLifecycleMonitor ( ) , watchOSLifecycleEvents ( ) ]
52
+ plugins. append ( watchOSLifecycleEvents ( ) )
51
53
#endif
52
54
#if os(macOS)
53
- plugins += [ macOSLifecycleMonitor ( ) , DeviceToken ( ) ]
55
+ // placeholder - need to build this
56
+ //plugins.append(macOSLifecycleEvents())
54
57
#endif
55
58
#if os(Linux)
56
- plugins. append ( LinuxLifecycleMonitor ( ) )
59
+ // placeholder - not sure what this is yet
60
+ //plugins.append(LinuxLifecycleMonitor())
57
61
#endif
58
62
}
59
63
You can’t perform that action at this time.
0 commit comments