Before you begin
Here’s what you need to do before updating to SDK v5:
SDK v5 supports SDK signature verification natively. If you currently use the SDK signature library, you need to uninstall this first.
If your app targets API versions lower than the following, you need to update your app before you can use SDK v5:
Install the beta SDK
To start using SDK v5, you need to add it as a dependency in your XCode project. To do this:
Remove any older versions of the SDK you currently have in your Podfile
.
Add the following line to your Podfile
:
Run pod install
to install the dependencies.
Update the initialization method
In SDK v4, the SDK is initialized by configuring an ADJConfig
object and passing it to the [Adjust appDidLaunch]
method.
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig (
environment : environment)
Adjust. appDidLaunch (adjustConfig)
NSString * yourAppToken = @"{YourAppToken}" ;
NSString * environment = ADJEnvironmentSandbox;
* adjustConfig = [ADJConfig configWithAppToken: yourAppToken;
environment: environment];
[Adjust appDidLaunch: adjustConfig];
In SDK v5, this method has been renamed to [Adjust initSdk]
.
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig (
environment : environment)
Adjust. initSdk (adjustConfig)
NSString * yourAppToken = @"{YourAppToken}" ;
NSString * environment = ADJEnvironmentSandbox;
ADJConfig * adjustConfig = [[ADJConfig alloc ] initWithAppToken: yourAppToken
environment: environment];
[Adjust initSdk: adjustConfig];
Configure the SDK Signature library
SDK v5 includes the SDK signature library . You can test this by following the testing steps in the Signature library integration guide .
Signature protection is inactive by default. To enable it, you need to enforce signature validation .
Changed APIs
The following APIs have been changed in SDK v5.
Disable and enable the SDK
In SDK v4, you can enable and disable the SDK by calling [Adjust setEnabled]
with a BOOL
value.
Call [Adjust setEnabled:NO]
to disable the SDK.
Call [Adjust setEnabled:YES]
to enable the SDK
Adjust. setEnabled ( false ) //disable SDK
Adjust. setEnabled ( true ) //enable SDK
[Adjust setEnabled:NO ]; // disable SDK
[Adjust setEnabled:YES ]; // enable SDK
In SDK v5, this feature is split into separate commands for clarity.
Call [Adjust disable]
to disable the SDK.
Call [Adjust enable]
to enable the SDK.
Adjust. disable () //disable SDK
Adjust. enable () //enable SDK
[Adjust disable ]; // disable SDK
[Adjust enable ]; // enable SDK
Send information in background
In SDK v4, you can call the [ADJConfig setSendInBackground]
method with a true
argument to enable the SDK to send information to Adjust while your app is running in the background.
adjustConfig. setSendInBackground ( true )
[adjustConfig setSendInBackground:YES ];
In SDK v5, you need to call the [ADJConfig enableSendingInBackground]
method with no arguments to enable the SDK to send information to Adjust while your app is running in the background.
adjustConfig. enableSendingInBackground ()
[adjustConfig enableSendingInBackground ];
Disable AdServices information reading
In SDK v4, you can call the [ADJConfig setAllowAdServicesInfoReading]
method with a false
argument to prevent the Adjust SDK from reading AdServices information.
adjustConfig. setAllowAdServicesInfoReading ( false )
[adjustConfig setAllowAdServicesInfoReading:NO ];
In SDK v5, you need to call the disableAdServices
method with no arguments to prevent the Adjust SDK from reading AdServices information.
adjustConfig. disableAdServices ()
[adjustConfig disableAdServices ];
Disable IDFA reading
In SDK v4, you can call the [ADJConfig setAllowIdfaReading]
method with a false
argument to prevent the Adjust SDK from reading the device’s IDFA.
adjustConfig. setAllowIdfaReading ( false )
[adjustConfig setAllowIdfaReading:NO ];
In SDK v5, you need to call the disableIdfaReading
method with no arguments to prevent the Adjust SDK from reading the device’s IDFA.
adjustConfig. disableIdfaReading ()
[adjustConfig disableIdfaReading ];
Enable cost data in attribution
In SDK v4, you can enable cost data in the device’s attribution information by calling the [ADJConfig setNeedsCost]
method with a true
argument.
adjustConfig. setNeedsCost ( true )
[adjustConfig setNeedsCost:YES ];
In SDK v5, you need to call the [ADJConfig enableCostDataInAttribution]
method with no arguments.
adjustConfig. enableCostDataInAttribution ()
[adjustConfig enableCostDataInAttribution ];
Enable LinkMe
In SDK v4, you can enable Adjust LinkMe by calling the [ADJConfig setLinkMeEnabled]
method with a true
argument.
adjustConfig. setLinkMeEnabled ( true )
[adjustConfig setLinkMeEnabled:YES ];
In SDK v5, you need to call the [ADJConfig enableLinkMe]
method with no arguments.
adjustConfig. enableLinkMe ()
[adjustConfig enableLinkMe ];
Only read device IDs once
In SDK v4, you can instruct the SDK to only read device identifiers one time upon startup by calling the [ADJConfig setReadDeviceInfoOnceEnabled]
method with a true
argument.
adjustConfig. setReadDeviceInfoOnceEnabled ( true )
[adjustConfig setReadDeviceInfoOnceEnabled:YES ];
In SDK v5, you need to call the [ADJConfig enableDeviceIdsReadingOnce]
method with no arguments.
adjustConfig. enableDeviceIdsReadingOnce ()
[adjustConfig enableDeviceIdsReadingOnce ];
Offline mode
In SDK v4, you can enable and disable offline mode the SDK by calling [Adjust setOfflineMode]
with a BOOL
argument.
Adjust. setOfflineMode ( true ) // put the SDK in offline mode
Adjust. setOfflineMode ( false ) // put the SDK back in online mode
[Adjust setOfflineMode:YES ]; // put the SDK in offline mode
[Adjust setOfflineMode:NO ]; // put the SDK back in online mode
In SDK v5, this feature is split into separate commands for clarity.
Call [Adjust switchToOfflineMode]
to set the SDK to offline mode.
Call [Adjust switchBackToOnlineMode]
to set the SDK back to online mode.
Adjust. switchToOfflineMode () // put the SDK in offline mode
Adjust. switchBackToOnlineMode () // put the SDK back in online mode
[Adjust switchToOfflineMode ]; // put the SDK in offline mode
[Adjust switchBackToOnlineMode ]; // put the SDK back in online mode
Push tokens
In SDK v4, you can set your push tokens using the [Adjust setDeviceToken]
method.
func application ( _ app: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Adjust. setDeviceToken (deviceToken)
- ( void )application:(UIApplication * )app didRegisterForRemoteNotificationsWithDeviceToken:( NSData * )deviceToken {
[Adjust setDeviceToken: deviceToken];
This method has been renamed to [Adjust setPushToken]
in SDK v5.
func application ( _ app: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken pushToken: Data) {
Adjust. setPushToken (pushToken)
- ( void )application:(UIApplication * )app didRegisterForRemoteNotificationsWithDeviceToken:( NSData * )pushToken {
[Adjust setPushToken: pushToken];
Session callback parameters
In SDK v4, you can add session parameters by passing a key-value pair to the [Adjust addSessionCallbackParameter]
method and remove individual parameters using the [Adjust removeSessionCallbackParameter]
method.
Adjust. addSessionCallbackParameter ( "foo" , value : "bar" )
Adjust. removeSessionCallbackParameter ( "foo" )
Adjust. resetSessionCallbackParameters ()
[Adjust addSessionCallbackParameter: @"foo" value: @"bar" ];
[Adjust removeSessionCallbackParameter: @"foo" ];
[Adjust resetSessionCallbackParameters ];
In SDK v5, session parameters are renamed to global parameters. Instead of assigning the key and value as positional arguments, SDK v5 uses the forKey
instance method to assign values to keys.
Adjust. addGlobalCallbackParameter ( "bar" , forKey : "foo" )
Adjust. removeGlobalCallbackParameter ( forKey : "foo" )
Adjust. removeGlobalCallbackParameters ()
[Adjust addGlobalCallbackParameter: @"bar" forKey: @"foo" ];
[Adjust removeGlobalCallbackParameterForKey: @"foo" ];
[Adjust removeGlobalCallbackParameters ];
Session partner parameters
In SDK v4, you can add session partner parameters by passing a key-value pair to the [Adjust addSessionPartnerParameter]
method and remove individual parameters using the [Adjust removeSessionPartnerParameter]
method.
Adjust. addSessionPartnerParameter ( "foo" , value : "bar" )
Adjust. removeSessionPartnerParameter ( "foo" )
Adjust. resetSessionPartnerParameters ()
[Adjust addSessionPartnerParameter: @"foo" value: @"bar" ];
[Adjust removeSessionPartnerParameter: @"foo" ];
[Adjust resetSessionPartnerParameters ];
In SDK v5, session partner parameters are renamed to global partner parameters. Instead of assigning the key and value as positional arguments, SDK v5 uses the forKey
instance method to assign values to keys.
Adjust. addGlobalPartnerParameter ( "bar" , forKey : "foo" )
Adjust. removeGlobalPartnerParameter ( forKey : "foo" )
Adjust. removeGlobalPartnerParameters ()
[Adjust addGlobalPartnerParameter: @"bar" forKey: @"foo" ];
[Adjust removeGlobalPartnerParameterForKey: @"foo" ];
[Adjust removeGlobalPartnerParameters ];
Send subscription information
In SDK v4, you can use the ADJSubscription
class to create a payload of subscription information to send to Adjust.
let subscription = ADJSubscription (
transactionId : transactionId,
ADJSubscription * subscription = [[ADJSubscription alloc ] initWithPrice: price
transactionId: transactionId];
This class has been renamed to ADJAppStoreSubscription
in SDK v5 for clarity.
let subscription = ADJAppStoreSubscription (
transactionId : transactionId)
ADJAppStoreSubscription * subscription = [[ADJAppStoreSubscription alloc ]
transactionId:transactionId];
Event deduplication
In SDK v4, event deduplication is coupled with the event transaction ID
and is limited to a maximum of 10 unique IDs.
let event = ADJEvent ( eventToken : "eventToken" )
event. setTransactionId ( "deduplication_id" )
ADJEvent * event = [ADJEvent eventWithEventToken: @"event_token" ];
[event setTransactionId: @"deduplication_id" ];
[Adjust trackEvent: event];
In SDK v5, the feature is decoupled from transaction ID
. A new ID field called deduplicationId
has been added for event deduplication. Users can set a custom limit on the number of deduplicationId
that can be added to the list for identifying duplicate events. By default, the limit is set to 10 .
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig (
environment : environment)
adjustConfig. setEventDeduplicationIdsMaxSize ( 20 )
Adjust. initSdk (adjustConfig)
guard let event = ADJEvent ( eventToken : "eventToken" ) else { return }
event. setDeduplicationId ( "deduplication_id" )
NSString * yourAppToken = @"{YourAppToken}" ;
NSString * environment = ADJEnvironmentSandbox;
ADJConfig * adjustConfig = [[ADJConfig alloc ] initWithAppToken: yourAppToken
environment: environment];
[adjustConfig setEventDeduplicationIdsMaxSize:20 ];
[Adjust initSdk: adjustConfig];
ADJEvent * event = [[ADJEvent alloc ] initWithEventToken:kEventToken3 ];
[event setDeduplicationId: @"deduplication_id" ];
[Adjust trackEvent: event];
AdjustAttribution class
In SDK v4, the AdjustAttribution
calls has a property called adid
. In SDK v5, the adid
property has been removed from the AdjustAttribution
class. You can retrieve the device’s ADID using the [Adjust adidWithCompletionHandler]
getter method .
Reattribution using deep links
In SDK v4, you can pass your deep link information to the [Adjust appWillOpenUrl]
method.
options : [UIApplication.OpenURLOptionsKey: Any ] = [ : ]
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
Adjust. appWillOpen (incomingURL)
- ( BOOL )application:(UIApplication * )app
openURL:( NSURL * )incomingURL
options:( NSDictionary * )options {
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
[Adjust appWillOpenUrl: incomingURL];
In SDK v5, this has been renamed to [Adjust processDeeplink]
for clarity.
options : [UIApplication.OpenURLOptionsKey: Any ] = [ : ]
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
if let deeplink = ADJDeeplink ( deeplink : incomingURL) {
Adjust. processDeeplink (deeplink)
- ( BOOL )application:(UIApplication * )app
openURL:( NSURL * )incomingURL
options:( NSDictionary * )options {
// add your code below to handle deep link
// (for example, open deep link content)
// incomingURL object contains the deep link
// call the below method to send deep link to Adjust's servers
[Adjust processDeeplink: [[ADJDeeplink alloc ] initWithDeeplink: incomingURL]];
Deferred deep linking callback
In SDK v4, you can call the adjustDeepLinkResponse
method to handle deferred deep link callbacks.
func adjustDeeplinkResponse ( _ deeplink: URL ? ) -> Bool {
print ( "Deferred deep link callback called!" )
print ( String ( format : "Deferred deep link URL: %@" , deeplink.absoluteString))
// Allow Adjust SDK to open received deferred deep link.
// If you don't want it to open it, return false instead.
- ( BOOL )adjustDeeplinkResponse:( NSURL * )deeplink {
NSLog ( @"Deferred deep link callback called!" );
NSLog ( @"Deferred deep link URL: %@ " , [deeplink absoluteString ]);
// Allow Adjust SDK to open received deferred deep link.
// If you don't want it to open it, return NO; instead.
In SDK v5, this method is has been renamed to adjustDeferredDeeplinkReceived
for clarity. All arguments are the same.
func adjustDeferredDeeplinkReceived ( _ deeplink: URL ? ) -> Bool {
print ( "Deferred deep link callback called!" )
print ( String ( format : "Deferred deep link URL: %@" , deeplink.absoluteString))
// Allow Adjust SDK to open received deferred deep link.
// If you don't want it to open it, return false instead.
- ( BOOL )adjustDeferredDeeplinkReceived:( NSURL * )deeplink {
NSLog ( @"Deferred deep link callback called!" );
NSLog ( @"Deferred deep link URL: %@ " , [deeplink absoluteString ]);
// Allow Adjust SDK to open received deferred deep link.
// If you don't want it to open it, return NO; instead.
COPPA compliance
In SDK v4, you can mark your app as COPPA compliant by calling the setCoppaCompliantEnabled
method on your ADJConfig
instance with a boolean value.
adjustConfig. setCoppaCompliantEnabled ( true )
[adjustConfig setCoppaCompliantEnabled:YES ];
In SDK v5, this method has been renamed to enableCoppaCompliance
for clarity. This method takes no arguments.
adjustConfig ? . enableCoppaCompliance ()
[adjustConfig enableCoppaCompliance ];
Send ad revenue from a specific source
In SDK v4, ad revenue sources are defined as constants in the ADJConfig
class. In SDK v5, ad revenue sources need to be passed as a string.
let adRevenue = ADJAdRevenue ( source : ADJAdRevenueSourceAppLovinMAX); //v4
let adRevenue = ADJAdRevenue ( source : "applovin_max_sdk" ) //v5
ADJAdRevenue * revenue = [[ADJAdRevenue alloc ]
initWithSource:ADJAdRevenueSourceAppLovinMAX]; // v4
ADJAdRevenue * adRevenue = [[ADJAdRevenue alloc ]
initWithSource: @"applovin_max_sdk" ]; // v5
v4 v5 ADJAdRevenueSourceAppLovinMAX
"applovin_max_sdk"
ADJAdRevenueSourceAdMob
"admob_sdk"
ADJAdRevenueSourceIronSource
"ironsource_sdk"
ADJAdRevenueSourceAdMost
"admost_sdk"
ADJAdRevenueSourceUnity
"unity_sdk"
ADJAdRevenueSourceHeliumChartboost
"helium_chartboost_sdk"
ADJAdRevenueSourceADX
"adx_sdk"
ADJAdRevenueSourcePublisher
"publisher_sdk"
ADJAdRevenueSourceTradplus
"tradplus_sdk"
ADJAdRevenueSourceTopOn
"topon_sdk"
ADJAdRevenueSourceMopub
"mopub"
Set data residency and URL strategy
In SDK v4, URL strategy and data residency domains are defined as constants in the ADJConfig
class.
[adjustConfig setUrlStrategy: ADJDataResidencyEU];
In SDK v5, you need to pass your chosen domain or domains as an array. You can also set the following:
useSubdomains
(BOOL
): Whether the domain should be treated as an Adjust domain. If true
, the SDK will prefix the domains with Adjust-specific subdomains. If false
, the SDK will use the provided domain as-is, without adding any prefixes.
isDataResidency
(BOOL
): Whether the domain should be used for data residency.
[adjustConfig setUrlStrategy: domain useSubdomains:YES
Check the table below to see how to configure your URL strategy in SDK v5.
v4 v5 - main and fallback domain v5 - use sub domains v5 - is Data Residency ADJDataResidencyEU
"eu.adjust.com"
true
true
ADJDataResidencyTR
"tr.adjust.com"
true
true
ADJDataResidencyUS
"us.adjust.com"
true
true
ADJUrlStrategyChina
"adjust.world"
, "adjust.com"
true
false
ADJUrlStrategyCn
"adjust.cn"
, "adjust.com"
true
false
ADJUrlStrategyCnOnly
"adjust.cn"
true
false
ADJUrlStrategyIndia
"adjust.net.in"
, "adjust.com"
true
false
Examples
let domain = [ "adjust.net.in" , "adjust.com" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : false )
let domain = [ "adjust.world" , "adjust.com" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : false )
let domain = [ "adjust.cn" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : false )
let domain = [ "eu.adjust.com" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : true )
let domain = [ "tr.adjust.com" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : true )
let domain = [ "us.adjust.com" ]
adjustConfig. setUrlStrategy (domain, useSubdomains : true , isDataResidency : true )
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"adjust.net.in" , @"adjust.com" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:NO ];
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"adjust.world" , @"adjust.com" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:NO ];
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"adjust.cn" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:NO ];
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"eu.adjust.com" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:YES ];
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"tr.adjust.com" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:YES ];
NSArray * domain = [[ NSArray alloc ]
initWithObjects: @"us.adjust.com" , nil ];
[adjustConfig setUrlStrategy: domain useSubdomains:YES isDataResidency:YES ];
Disable SKAdNetwork communication
In SDK v4, you can prevent the SDK from communicating with SKAdNetwork by calling the [ADJConfig deactivateSKAdNetworkHandling]
method.
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig (
environment : environment)
adjustConfig. deactivateSKAdNetworkHandling ()
ADJConfig * adjustConfig = [[ADJConfig alloc ]
initWithAppToken: @"{YourAppToken}"
environment:ADJEnvironmentSandbox];
[adjustConfig deactivateSKAdNetworkHandling ];
In SDK v5, this method has been renamed to [ADJConfig disableSkanAttribution]
for clarity.
let yourAppToken = "{YourAppToken}"
let environment = ADJEnvironmentSandbox as? String
let adjustConfig = ADJConfig (
environment : environment)
adjustConfig ? . disableSkanAttribution ()
ADJConfig * adjustConfig = [[ADJConfig alloc ]
initWithAppToken: @"{YourAppToken}"
environment:ADJEnvironmentSandbox];
[adjustConfig disableSkanAttribution ];
Update conversion values
In SDK v4, you can use the updateConversionValue
method to send updated conversion values to Adjust. This method wraps Apple’s deprecated updateConversionValue
method and has been removed in SDK v5.
To update conversion values in SDK v5, use the [Adjust updateSkanConversionValue]
method with the following arguments:
conversionValue
(NSInteger
): The updated conversion value
coarseValue
(NSString
): The updated coarse conversion value
lockWindow
(BOOL
): Whether to send the postback before the conversion window ends
Adjust. updateSkanConversionValue (
coarseValue : SKAdNetwork.CoarseConversionValue.low. rawValue ,
lockWindow : false ) { error in
print ( String ( format : "An error occurred during completion: %@" , error))
[Adjust updateSkanConversionValue:1
coarseValue: SKAdNetworkCoarseConversionValueLow
withCompletionHandler: ^ ( NSError * _Nullable error) {
NSLog ( @"An error occurred during completion: %@ " , error);
App Tracking Transparency authorization wrapper
In SDK v4, you can handle changes to a user’s ATT authorization status using the [Adjust requestTrackingAuthorizationWithCompletionHandler]
method.
Adjust. requestTrackingAuthorization { status in
// ATTrackingManagerAuthorizationStatusNotDetermined case
// ATTrackingManagerAuthorizationStatusRestricted case
// ATTrackingManagerAuthorizationStatusDenied case
// ATTrackingManagerAuthorizationStatusAuthorized case
[Adjust requestTrackingAuthorizationWithCompletionHandler: ^ ( NSUInteger status) {
// ATTrackingManagerAuthorizationStatusNotDetermined case
// ATTrackingManagerAuthorizationStatusRestricted case
// ATTrackingManagerAuthorizationStatusDenied case
// ATTrackingManagerAuthorizationStatusAuthorized case
This has been renamed to [Adjust requestAppTrackingAuthorizationWithCompletionHandler]
in SDK v5 for clarity.
Adjust. requestAppTrackingAuthorization { status in
// ATTrackingManagerAuthorizationStatusNotDetermined case
// ATTrackingManagerAuthorizationStatusRestricted case
// ATTrackingManagerAuthorizationStatusDenied case
// ATTrackingManagerAuthorizationStatusAuthorized case
[Adjust requestAppTrackingAuthorizationWithCompletionHandler: ^ ( NSUInteger status) {
// ATTrackingManagerAuthorizationStatusNotDetermined case
// ATTrackingManagerAuthorizationStatusRestricted case
// ATTrackingManagerAuthorizationStatusDenied case
// ATTrackingManagerAuthorizationStatusAuthorized case
Get device information
In SDK v4, all device information getter methods run synchronously. In SDK v5, these methods have been changed to run asynchronously. You can add a callback function to handle the information when the asynchronous process completes
// add your completion handler
// add your completion handler
// add your completion handler
Adjust. sdkVersion { sdkVersion in
// add your completion handler
Adjust. isEnabled { isEnabled in
// add your completion handler
Adjust. attribution { attribution in
// add your completion handler
[Adjust adidWithCompletionHandler: ^ ( NSString * _Nullable adid) {
// add your completion handler
[Adjust idfaWithCompletionHandler: ^ ( NSString * _Nullable idfa) {
// add your completion handler
[Adjust idfvWithCompletionHandler: ^ ( NSString * _Nullable idfv) {
// add your completion handler
[Adjust sdkVersionWithCompletionHandler: ^ ( NSString * _Nullable sdkVersion) {
// add your completion handler
[Adjust isEnabledWithCompletionHandler: ^ ( BOOL isEnabled) {
// add your completion handler
[Adjust attributionWithCompletionHandler: ^ (ADJAttribution * _Nullable attribution) {
// add your completion handler
Removed APIs
The following APIs have been removed in SDK v5.
Event buffering
SDK v4 supports event buffering. This feature stores requests event, ad revenue, push tokens, and other information on a local buffer to send at a later date.
Adjust. setEventBufferingEnabled ( true )
[adjustConfig setEventBufferingEnabled:YES ];
This setting has been removed in SDK v5.
Custom user agent string
SDK v4 supports setting a custom User Agent by calling [AdjustConfig setUserAgent]
with a user agent string.
adjustConfig. setUserAgent ( "user_agent_value" )
[adjustConfig setUserAgent: @"user_agent_value" ];
This setting has been removed in SDK v5.
Set whether a device is known
In SDK v4, you can call the [AdjustConfig setIsDeviceKnown];
method to manually inform the SDK whether a device is known.
adjustConfig. setIsDeviceKnown ( true )
[adjustConfig setIsDeviceKnown:YES ];
This setting has been removed in SDK v5.
Delay SDK start
SDK v4 supports delaying the start of the SDK by calling [AdjustConfig setDelayStart];
with up to 10 seconds of delay.
adjustConfig. setDelayStart ( 10 )
[adjustConfig setDelayStart:10 ];
This setting has been removed in SDK v5.
Disable third party sharing globally
In SDK v4, you can call the Adjust.disableThirdPartySharing()
method to globally disable sharing information with third parties globally.
Adjust. disableThirdPartySharing ()
[Adjust disableThirdPartySharing ];
This feature has been removed from SDK v5. In SDK v5, use the [Adjust trackThirdPartySharing]
method to enable or disable third party sharing.
guard let adjustThirdPartySharing = ADJThirdPartySharing ( isEnabled : 0 ) else { return }
Adjust. trackThirdPartySharing (adjustThirdPartySharing)
ADJThirdPartySharing * adjustThirdPartySharing = [[ADJThirdPartySharing alloc ] initWithIsEnabled: @ NO ];
[Adjust trackThirdPartySharing: adjustThirdPartySharing];
Check for authorization status change
In SDK v4, you can use the [Adjust checkForNewAttStatus]
method to prompt the SDK to read a user’s ATT status and forward the information to Adjust’s servers.
Adjust. checkForNewAttStatus ()
[Adjust checkForNewAttStatus ];
This method has been removed in SDK v5.
Listen for conversion value updates
In SDK v4, you can use the adjustConversionValueUpdated
method to listen for SKAdNetwork updates.
func adjustConversionValueUpdated ( _ conversionValue: NSNumber) {
print ( "Conversion value updated callback called!" )
print ( String ( format : "Conversion value: %@" , conversionValue))
func adjustConversionValueUpdated ( _ fineValue: NSNumber, coarseValue : String , lockWindow : NSNumber) {
print ( "Conversion value updated callback called!" )
print ( String ( format : "Conversion value: %@" , fineValue))
print ( String ( format : "Coarse value: %@" , coarseValue))
print ( String ( format : "Lock window: %@" , lockWindow))
- ( void )adjustConversionValueUpdated:( NSNumber * )conversionValue {
NSLog ( @"Conversion value updated callback called!" );
NSLog ( @"Conversion value: %@ " , conversionValue);
- ( void )adjustConversionValueUpdated:( NSNumber * )fineValue
coarseValue:( NSString * )coarseValue
lockWindow:( NSNumber * )lockWindow {
NSLog ( @"Conversion value updated callback called!" );
NSLog ( @"Conversion value: %@ " , conversionValue);
NSLog ( @"Coarse value: %@ " , coarseValue);
NSLog ( @"Lock window: %@ " , lockWindow);
In SDK v5, these two methods have been replaced by a single adjustSkanUpdatedWithConversionData
method which returns an untyped dictionary. The following keys are currently supported:
conversion_value
: The updated conversion value.
coarse_value
: The updated coarse conversion value
lock_window
: Whether to send the postback before the conversion window ends
error
: Any error message returned by the update.
func adjustSkanUpdated ( withConversionData data: [ String : String ]) {
print ( "Conversion value updated callback called!" )
print ( String ( format : "Conversion value dictionary: \n %@" , data. description ))
- ( void )adjustSkanUpdatedWithConversionData:( NSDictionary < NSString * , NSString *> * )data {
NSLog ( @"Conversion value updated callback called!" );
NSLog ( @"Conversion value dictionary: \n%@ " , data.description);
Set an app secret
SDK v4 supports setting an App Secret by calling setAppSecret
method on your ADJConfig
instance to sign the SDK traffic with.
adjustConfig. setAppSecret (secretId, info1 : info1, info2 : info2, info3 : info3, info4 : info4)
[adjustConfig setAppSecret: secretId info1: info1 info2: info2 info3: info3 info4: info4];
This setting has been removed in SDK v5.
Removed plugins
The following plugins have been removed in SDK v5:
Criteo
Trademob
Sociomantic