@@ -57,8 +57,6 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
57
57
58
58
internal var settings : AdjustSettings ? = nil
59
59
60
- @Atomic var started = false
61
-
62
60
required public init ( name: String ) {
63
61
self . name = name
64
62
}
@@ -87,13 +85,9 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
87
85
}
88
86
89
87
Adjust . appDidLaunch ( adjustConfig)
90
-
91
- started = true
92
88
}
93
89
94
90
public func identify( event: IdentifyEvent ) -> IdentifyEvent ? {
95
- guard started == true else { return event }
96
-
97
91
if let userId = event. userId, userId. count > 0 {
98
92
Adjust . addSessionPartnerParameter ( " user_id " , value: userId)
99
93
}
@@ -106,8 +100,6 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
106
100
}
107
101
108
102
public func track( event: TrackEvent ) -> TrackEvent ? {
109
- guard started == true else { return event }
110
-
111
103
if let anonId = event. anonymousId, anonId. count > 0 {
112
104
Adjust . addSessionPartnerParameter ( " anonymous_id " , value: anonId)
113
105
}
@@ -139,24 +131,17 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
139
131
return event
140
132
}
141
133
142
- public func screen( event: ScreenEvent ) -> ScreenEvent ? {
143
- guard started == true else { return event }
144
-
145
- return event
146
- }
147
-
148
134
public func reset( ) {
149
- guard started == true else { return }
150
135
Adjust . resetSessionPartnerParameters ( )
151
136
}
152
137
153
138
public func registeredForRemoteNotifications( deviceToken: Data ) {
154
- guard started == true else { return }
155
139
Adjust . setDeviceToken ( deviceToken)
156
140
}
157
141
}
158
142
159
143
// MARK: - Adjust Delegate conformance
144
+
160
145
extension AdjustDestination : AdjustDelegate {
161
146
public func adjustAttributionChanged( _ attribution: ADJAttribution ? ) {
162
147
let campaign : [ String : Any ] = [
@@ -177,6 +162,7 @@ extension AdjustDestination: AdjustDelegate {
177
162
analytics? . track ( name: " Install Attributed " , properties: properties)
178
163
}
179
164
}
165
+
180
166
// MARK: - Support methods
181
167
182
168
extension AdjustDestination {
@@ -204,16 +190,3 @@ extension AdjustDestination {
204
190
return result
205
191
}
206
192
}
207
-
208
- // we are missing support for:
209
- /*
210
- reset()
211
- flush()
212
- receivedRemoteNotification
213
- failedToRegisterForRemoteNotification
214
- registerForRemoteNotifications(deviceToken:)
215
- handleActionWithIdentifier
216
- continueUserActivity
217
- openURL:options:
218
- */
219
-
0 commit comments