@@ -57,8 +57,6 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
5757
5858 internal var settings : AdjustSettings ? = nil
5959
60- @Atomic var started = false
61-
6260 required public init ( name: String ) {
6361 self . name = name
6462 }
@@ -87,13 +85,9 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
8785 }
8886
8987 Adjust . appDidLaunch ( adjustConfig)
90-
91- started = true
9288 }
9389
9490 public func identify( event: IdentifyEvent ) -> IdentifyEvent ? {
95- guard started == true else { return event }
96-
9791 if let userId = event. userId, userId. count > 0 {
9892 Adjust . addSessionPartnerParameter ( " user_id " , value: userId)
9993 }
@@ -106,8 +100,6 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
106100 }
107101
108102 public func track( event: TrackEvent ) -> TrackEvent ? {
109- guard started == true else { return event }
110-
111103 if let anonId = event. anonymousId, anonId. count > 0 {
112104 Adjust . addSessionPartnerParameter ( " anonymous_id " , value: anonId)
113105 }
@@ -139,24 +131,17 @@ public class AdjustDestination: NSObject, DestinationPlugin, RemoteNotifications
139131 return event
140132 }
141133
142- public func screen( event: ScreenEvent ) -> ScreenEvent ? {
143- guard started == true else { return event }
144-
145- return event
146- }
147-
148134 public func reset( ) {
149- guard started == true else { return }
150135 Adjust . resetSessionPartnerParameters ( )
151136 }
152137
153138 public func registeredForRemoteNotifications( deviceToken: Data ) {
154- guard started == true else { return }
155139 Adjust . setDeviceToken ( deviceToken)
156140 }
157141}
158142
159143// MARK: - Adjust Delegate conformance
144+
160145extension AdjustDestination : AdjustDelegate {
161146 public func adjustAttributionChanged( _ attribution: ADJAttribution ? ) {
162147 let campaign : [ String : Any ] = [
@@ -177,6 +162,7 @@ extension AdjustDestination: AdjustDelegate {
177162 analytics? . track ( name: " Install Attributed " , properties: properties)
178163 }
179164}
165+
180166// MARK: - Support methods
181167
182168extension AdjustDestination {
@@ -204,16 +190,3 @@ extension AdjustDestination {
204190 return result
205191 }
206192}
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