@@ -41,16 +41,16 @@ import Segment
41
41
An implementation of the Example Analytics device mode destination as a plugin.
42
42
*/
43
43
44
- class ExampleDestination : DestinationPlugin {
45
- let timeline = Timeline ( )
46
- let type = PluginType . destination
44
+ public class ExampleDestination : DestinationPlugin {
45
+ public let timeline = Timeline ( )
46
+ public let type = PluginType . destination
47
47
// TODO: Fill this out with your settings key that matches your destination in the Segment App
48
- let key = " Example "
49
- var analytics : Analytics ? = nil
48
+ public let key = " Example "
49
+ public var analytics : Analytics ? = nil
50
50
51
51
private var exampleSettings : ExampleSettings ?
52
52
53
- func update( settings: Settings , type: UpdateType ) {
53
+ public func update( settings: Settings , type: UpdateType ) {
54
54
// Skip if you have a singleton and don't want to keep updating via settings.
55
55
guard type == . initial else { return }
56
56
@@ -62,7 +62,7 @@ class ExampleDestination: DestinationPlugin {
62
62
// TODO: initialize partner SDK here
63
63
}
64
64
65
- func identify( event: IdentifyEvent ) -> IdentifyEvent ? {
65
+ public func identify( event: IdentifyEvent ) -> IdentifyEvent ? {
66
66
67
67
if let _ = event. traits? . dictionaryValue {
68
68
// TODO: Do something with traits if they exist
@@ -73,7 +73,7 @@ class ExampleDestination: DestinationPlugin {
73
73
return event
74
74
}
75
75
76
- func track( event: TrackEvent ) -> TrackEvent ? {
76
+ public func track( event: TrackEvent ) -> TrackEvent ? {
77
77
78
78
var returnEvent = event
79
79
@@ -88,7 +88,7 @@ class ExampleDestination: DestinationPlugin {
88
88
return returnEvent
89
89
}
90
90
91
- func screen( event: ScreenEvent ) -> ScreenEvent ? {
91
+ public func screen( event: ScreenEvent ) -> ScreenEvent ? {
92
92
93
93
if let _ = event. properties? . dictionaryValue {
94
94
// TODO: Do something with properties if they exist
@@ -99,7 +99,7 @@ class ExampleDestination: DestinationPlugin {
99
99
return event
100
100
}
101
101
102
- func group( event: GroupEvent ) -> GroupEvent ? {
102
+ public func group( event: GroupEvent ) -> GroupEvent ? {
103
103
104
104
if let _ = event. traits? . dictionaryValue {
105
105
// TODO: Do something with traits if they exist
@@ -110,7 +110,7 @@ class ExampleDestination: DestinationPlugin {
110
110
return event
111
111
}
112
112
113
- func alias( event: AliasEvent ) -> AliasEvent ? {
113
+ public func alias( event: AliasEvent ) -> AliasEvent ? {
114
114
115
115
// TODO: Do something with previousId & userId in partner SDK
116
116
0 commit comments