@@ -38,7 +38,7 @@ export class AdjustPlugin extends DestinationPlugin {
38
38
const adjustConfig = new AdjustConfig ( this . settings . appToken , environment ) ;
39
39
40
40
if ( this . hasRegisteredCallback === false ) {
41
- adjustConfig . setAttributionCallbackListener ( ( attribution ) => {
41
+ adjustConfig . setAttributionCallback ( ( attribution ) => {
42
42
const trackPayload = {
43
43
provider : 'Adjust' ,
44
44
trackerToken : attribution . trackerToken ,
@@ -55,28 +55,33 @@ export class AdjustPlugin extends DestinationPlugin {
55
55
} ) ;
56
56
this . hasRegisteredCallback = true ;
57
57
}
58
+ //Removed from react-native-adjust v5 (https://dev.adjust.com/en/sdk/migration/react-native/v4-to-v5)
59
+ //TO DO : Remove commented lines in next release
60
+ // const bufferingEnabled = this.settings.setEventBufferingEnabled;
61
+ // if (bufferingEnabled === true) {
62
+ // adjustConfig.setEventBufferingEnabled(bufferingEnabled);
63
+ // }
58
64
59
- const bufferingEnabled = this . settings . setEventBufferingEnabled ;
60
- if ( bufferingEnabled === true ) {
61
- adjustConfig . setEventBufferingEnabled ( bufferingEnabled ) ;
62
- }
63
-
64
- const useDelay = this . settings . setDelay ;
65
- if ( useDelay === true ) {
66
- const delayTime = this . settings . delayTime ;
67
- if ( delayTime !== null && delayTime !== undefined ) {
68
- adjustConfig . setDelayStart ( delayTime ) ;
69
- }
70
- }
65
+ // const useDelay = this.settings.setDelay;
66
+ // if (useDelay === true) {
67
+ // const delayTime = this.settings.delayTime;
68
+ // if (delayTime !== null && delayTime !== undefined) {
69
+ // adjustConfig.setDelayStart(delayTime);
70
+ // }
71
+ // }
71
72
72
- Adjust . create ( adjustConfig ) ;
73
+ //create has been replaced with initSDK in v5
74
+ //TO DO : Remove commented lines in next release
75
+ //Adjust.create(adjustConfig);
76
+ Adjust . initSdk ( adjustConfig ) ;
73
77
}
74
78
identify ( event : IdentifyEventType ) {
75
79
identify ( event ) ;
76
80
return event ;
77
81
}
78
82
79
83
track ( event : TrackEventType ) {
84
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
80
85
track ( event , this . settings ! ) ;
81
86
return event ;
82
87
}
0 commit comments