The Adjust Unreal SDK has been updated to v5. Follow this guide to migrate from v4 to the latest version.
The Adjust SDK v4 was compatible with Unreal Engine 4, but due to some breaking changes that were introduced, it is no longer compatible with Unreal Engine 5. Adjust SDK v5 is now compatible with Unreal Engine 5. Adjust SDK v5 is not compatible with Unreal Engine 4.
The minimum supported iOS and Android versions have been updated. If your app targets a lower version, update it first.
- iOS: 12.0
- Android: API 21
In Unreal SDK v5, the initialization method has changed from UAdjust::Initialize
to UAdjust::InitSdk
.
UAdjust::InitSdk(adjustConfig);
In Unreal SDK v5, all the Android permissions are added automatically via underlying native Android SDK v5. Those permissions are:
android.permission.INTERNET
com.google.android.gms.permission.AD_ID
for allowing access to Google advertising ID.
Depending on your app and preferences, the access to Google advertising ID might be something you would like to revoke. You can remove this permission with the following snippet to your AndroidManifest.xml
file:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
Learn more about Adjust's COPPA compliance.
Below is the complete list of changed, renamed, and removed APIs in Unreal SDK v5.
Each section includes a reference to the previous and current API implementations, as well as a minimal code snippet that illustrates how to use the latest version.
The following APIs have changed in Unreal SDK v5.
The SetEnabled
method has been renamed. Unreal SDK v5 introduces two separate methods, for clarity:
- Call
Adjust::Disable
to disable the SDK. - Call
Adjust::Enable
to enable the SDK.
Adjust::Disable(); // disable SDK
Adjust::Enable(); // enable SDK
In addition to this, IsEnabled
getter of the UAdjust
class is no longer returning bool
value, but is asynchronous instead. Before invoking Adjust::IsEnabled
which no longer returns any value, you need to declare a callback to which the SDK enabled status will be reported.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnIsEnabledGetterDelegate, bool, IsEnabled);
// ...
UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = Adjust)
FOnIsEnabledGetterDelegate OnIsEnabledGetterDelegate;
The SetOfflineMode
method has been renamed. Unreal SDK v5 introduces two separate methods, for clarity:
- Call
UAdjust::SwitchToOfflineMode
to set the SDK to offline mode. - Call
UAdjust::SwitchBackToOnlineMode
to set the SDK back to online mode.
The SendInBackground
field of the FAdjustConfig
structure has been renamed to IsSendingInBackgroundEnabled
.
In Unreal SDK v5, Adid
field has been removed from FAdjustAttribution
structure.
In Unreal SDK v5, event deduplication is decoupled from the TransactionId
field of the FAdjustEvent
structure. To prevent measuring duplicated events, use the DeduplicationId
ID field.
In Unreal SDK v5, the session callback parameters have been renamed to global callback parameters together with corresponding methods.
UAdjust::AddGlobalCallbackParameter("user_id", "855");
UAdjust::RemoveGlobalCallbackParameter("user_id");
UAdjust::RemoveGlobalCallbackParameters();
In Unreal SDK v5, the session partner parameters have been renamed to global partner parameters together with corresponding methods.
UAdjust::AddGlobalPartnerParameter("user_id", "855");
UAdjust::RemoveGlobalPartnerParameter("user_id");
UAdjust::RemoveGlobalPartnerParameters();
In Unreal SDK v5, the AppWillOpenUrl
method of the UAdjust
class has been renamed to ProcessDeeplink
.
To process a deep link, you now need to create a new FAdjustDeeplink
structure, assign the deep link string to Deeplink
field of the structure and pass the structure to the UAdjust::ProcessDeeplink
method.
FAdjustDeeplink adjustDeeplink;
adjustDeeplink.Deeplink = "your-app-scheme://link-content";
UAdjust::ProcessDeeplink(adjustDeeplink);
In Unreal SDK v5, the OpenDeferredDeeplink
field of the FAdjustConfig
structure has been renamed to IsDeferredDeeplinkOpeningEnabled
.
In Unreal SDK v5, the HandleSkAdNetwork
field from the FAdjustConfig
structure has been renamed to IsSkanAttributionEnabled
.
In Unreal SDK v5, the RequestTrackingAuthorizationWithCompletionHandler
method of the UAdjust
class has been renamed to RequestAppTrackingAuthorization
for clarity.
In unreal SDK v5, the AllowAdServicesInfoReading
field from the FAdjustConfig
structure has been renamed to IsAdServicesEnabled
.
Obtaining of the Adjust ID is now asynchronous. GetAdid
method of the UAdjust
class no longer returns FString
, but void
instead. In order to obtain Adjust ID, you need to declare a callback method on the UAdjustDelegates
object where the results will be returned and invoke UAdjust::GetAdid
afterwards.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAdidGetterDelegate, const FString&, Adid);
// ...
UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = Adjust)
FOnAdidGetterDelegate OnAdidGetterDelegate;
Getter for IDFA has been changed in the same way as Adjust ID getter. Before invoking UAdjust::GetIdfa
(which returns no value in Unreal SDK v5), you need to declare a callback method on the UAdjustDelegates
object where the IDFA value will be returned.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnIdfaGetterDelegate, const FString&, Idfa);
// ...
UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = Adjust)
FOnIdfaGetterDelegate OnIdfaGetterDelegate;
Getter for Amazon advertising ID has been changed in the same way as IDFA getter. Before invoking UAdjust::GetAmazonAdId
(which returns no value in Unreal SDK v5), you need to declare a callback method on the UAdjustDelegates
object where the Amazon advertising ID value will be returned.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAmazonAdIdGetterDelegate, const FString&, AmazonAdId);
// ...
UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = Adjust)
FOnAmazonAdIdGetterDelegate OnAmazonAdIdGetterDelegate;
Similar to getters above, attribution getter is also asynchronous in Unreal SDK v5. Before invoking UAdjust::GetAttribution
, you should set your callback method on UAdjustDelegates
object.
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAttributionGetterDelegate, const FAdjustAttribution&, Attribution);
// ...
UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = Adjust)
FOnAttributionGetterDelegate OnAttributionGetterDelegate;
The following APIs have been removed from Unreal SDK v5.
- The
DelayStart
field of theFAdjustConfig
structure has been removed. - The
SendFirstPackages
method of theUAdjust
class has been removed. - The
EventBuffering
field of theFAdjustConfig
structure has been removed. - The
IsDeviceKnown
field of theFAdjustConfig
structure has been removed. - The
PreinstallTracking
field of theFAdjustConfig
structure has been removed. - The
AllowiAdInfoReading
field of theFAdjustConfig
structure has been removed. - The
UserAgent
field of theFAdjustConfig
structure has been removed. - The
UrlStrategy
field of theFAdjustConfig
structure has been removed (temporarily).
The DisableThirdPartySharing
method of the UAdjust
class has been removed.
To disable all third-party sharing in Unreal SDK v5, use the TrackThirdPartySharing
method of the UAdjust
class.
FAdjustThirdPartySharing adjustThirdPartySharing;
adjustThirdPartySharing.Sharing = EAdjustThirdPartySharingState::Disable;
UAdjust::TrackThirdPartySharing(adjustThirdPartySharing);
The SecretId
, Info1
, Info2
, Info3
and Info4
fields of the FAdjustConfig
structure have been removed.
The SDK signature library is bundled in Adjust SDKs v5 and enabled by default. To configure the anti-spoofing solution in the Adjust Dashboard, follow the integration guide for your platform.
This feature has been removed. If your Unreal app uses the Huawei referrer API, contact your Adjust representative or email [email protected] before you upgrade.