Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.32.0 #43

Merged
merged 18 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
### Version 4.32.0 (20th October 2022)
#### Added
- Added ability to mark your app as COPPA compliant. You can enable this setting by calling `setCoppaCompliantEnabled` method of `AdjustConfig2dx` instance with boolean parameter `true`.
- Added ability to mark your Android app as app for the kids in accordance to Google Play Families policies. You can enable this setting by calling `setPlayStoreKidsAppEnabled` method of `AdjustConfig2dx` instance with boolean parameter `true` (Android only).
- Added `checkForNewAttStatus` method to `Adjust2dx` API to allow iOS apps to instruct to SDK to check if `att_status` might have changed in the meantime (iOS only).
- Added updated `trackAdRevenueNew` method to `Adjust2dx` API to allow unified way of tracking ad revenue with currently supported partners (AppLovin MAX, AdMob, IronSource, AdMost, Unity, Helium Chartboost). Make sure to include newly added `AdjustAdRevenue2dx.h` and `AdjustAdRevenue2dx.cpp` files to your `Android.mk` or `CMakeLists.txt` files.
- Added partner sharing settings to the third party sharing feature.
- Added `getLastDeeplink` getter to `Adjust2dx` API to be able to get last tracked deep link by the SDK (iOS only).
- Added support for `LinkMe` feature (iOS only).
- Added support to get Facebook install referrer information in attribution callback (Android only).

#### Changed
- Switched to adding permission `com.google.android.gms.permission.AD_ID` in the Android app's manifest by default.

#### Native SDKs
- [iOS@v4.32.1][ios_sdk_v4.32.1]
- [Android@v4.33.0][android_sdk_v4.33.0]

---

### Version 4.29.0 (14th September 2021)
#### Added
- Added possibility to get cost data information in attribution callback.
Expand Down Expand Up @@ -371,6 +391,7 @@
[ios_sdk_v4.23.2]: https://github.com/adjust/ios_sdk/tree/v4.23.2
[ios_sdk_v4.28.0]: https://github.com/adjust/ios_sdk/tree/v4.28.0
[ios_sdk_v4.29.6]: https://github.com/adjust/ios_sdk/tree/v4.29.6
[ios_sdk_v4.32.1]: https://github.com/adjust/ios_sdk/tree/v4.32.1

[android_sdk_v4.0.8]: https://github.com/adjust/android_sdk/tree/v4.0.8
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0
Expand All @@ -393,5 +414,6 @@
[android_sdk_v4.24.1]: https://github.com/adjust/android_sdk/tree/v4.24.1
[android_sdk_v4.27.0]: https://github.com/adjust/android_sdk/tree/v4.27.0
[android_sdk_v4.28.4]: https://github.com/adjust/android_sdk/tree/v4.28.4
[android_sdk_v4.33.0]: https://github.com/adjust/android_sdk/tree/v4.33.0

[windows_sdk_v4.0.3]: https://github.com/adjust/windows_sdk/tree/v4.0.3
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2012-2019 adjust GmbH
Copyright (c) 2015-Present adjust GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
84 changes: 71 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad
* [AppTrackingTransparency framework](#att-framework)
* [App-tracking authorisation wrapper](#ata-wrapper)
* [Get current authorisation status](#ata-getter)
* [Check for ATT status change](#att-status-change)
* [SKAdNetwork framework](#skadn-framework)
* [Update SKAdNetwork conversion value](#skadn-update-conversion-value)
* [Conversion value updated callback](#skadn-cv-updated-callback)
Expand All @@ -46,7 +47,10 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad
* [Offline mode](#offline-mode)
* [Event buffering](#event-buffering)
* [GDPR right to be forgotten](#gdpr-forget-me)
* [Disable third-party sharing](#disable-third-party-sharing)
* [Third-party sharing](#third-party-sharing)
* [Disable third-party sharing](#disable-third-party-sharing)
* [Enable third-party sharing](#enable-third-party-sharing)
* [Measurement consent](#measurement-consent)
* [SDK signature](#sdk-signature)
* [Background tracking](#background-tracking)
* [Device IDs](#device-ids)
Expand All @@ -64,6 +68,8 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad
* [Deep link handling for iOS apps](#deeplinking-ios)
* [Deep link handling for Android apps](#deeplinking-android)
* [Data residency](#data-residency)
* [COPPA compliance](#coppa-compliance)
* [Play Store Kids Apps](#play-store-kids-apps)
* [License](#license)

## <a id="basic-integration"></a>Basic integration
Expand Down Expand Up @@ -92,7 +98,8 @@ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionFailure2dx.cpp \
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionSuccess2dx.cpp \
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStoreSubscription2dx.cpp \
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStoreSubscription2dx.cpp \
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustThirdPartySharing2dx.cpp
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustThirdPartySharing2dx.cpp \
$(LOCAL_PATH)/../../../Classes/Adjust/AdjustAdRevenue2dx.cpp
```

### <a id="sdk-project-settings"></a>Adjust project settings
Expand Down Expand Up @@ -401,6 +408,14 @@ To get the current app tracking authorization status you can call `getAppTrackin
* `3`: The user authorized access to IDFA
* `-1`: The status is not available

### <a id="att-status-change"></a>Check for ATT status change

In cases where you are not using [Adjust app-tracking authorization wrapper](#ata-wrapper), Adjust SDK will not be able to know immediately upon answering the dialog what is the new value of app-tracking status. In situations like this, if you would want Adjust SDK to read the new app-tracking status value and communicate it to our backend, make sure to make a call to this method:

```cpp
Adjust2dx::checkForNewAttStatus();
```

### <a id="skadn-framework"></a>SKAdNetwork framework

**Note**: This feature exists only in iOS platform.
Expand Down Expand Up @@ -986,32 +1001,58 @@ Adjust2dx::gdprForgetMe();

Upon receiving this information, Adjust will erase the user's data and the Adjust SDK will stop tracking the user. No requests from this device will be sent to Adjust in the future.

### <a id="disable-third-party-sharing"></a>Disable third-party sharing for specific users
## <a id="third-party-sharing"></a>Third-party sharing for specific users

You can notify Adjust when a user disables, enables, and re-enables data sharing with third-party partners.

You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes.
### <a id="disable-third-party-sharing"></a>Disable third-party sharing for specific users

Call the following method to instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend:

```cpp
Adjust2dx::disableThirdPartySharing();
AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(false);
Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing);
```

Upon receiving this information, Adjust will block the sharing of that specific user's data to partners and the Adjust SDK will continue to work as usual.

### <a id="sdk-signature"></a>SDK signature
### <a id="enable-third-party-sharing">Enable or re-enable third-party sharing for specific users</a>

An account manager must activate the Adjust SDK signature. Contact Adjust support (support@adjust.com) if you are interested in using this feature.
Call the following method to instruct the Adjust SDK to communicate the user's choice to share data or change data sharing, to the Adjust backend:

If the SDK signature has already been enabled on your account and you have access to App Secrets in your Adjust Dashboard, please use the method below to integrate the SDK signature into your app.
```cpp
AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true);
Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing);
```

Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.

An App Secret is set by passing all secret parameters (`secretId`, `info1`, `info2`, `info3`, `info4`) to `setAppSecret` method of `AdjustConfig` instance:
Call the following method to instruct the Adjust SDK to send the granular options to the Adjust backend:

```cpp
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);
adjustConfig.setAppSecret(secretId, info1, info2, info3, info4);
Adjust2dx::start(adjustConfig);
AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx();
adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar");
Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing);
```

### <a id="measurement-consent"></a>Consent measurement for specific users

You can notify Adjust when a user exercises their right to change data sharing with partners for marketing purposes, but they allow data sharing for statistical purposes.

Call the following method to instruct the Adjust SDK to communicate the user's choice to change data sharing, to the Adjust backend:

```cpp
Adjust2dx::trackMeasurementConsent(true);
```

Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.

### <a id="sdk-signature"></a>SDK signature

When you set up the SDK Signature, each SDK communication package is "signed". This lets Adjust’s servers easily detect and reject any install activity that is not legitimate.

There are just a few steps involved in setting up the SDK Signature. Please contact your Technical Account Manager or support@adjust.com to get started.

### <a id="background-tracking"></a>Background tracking

The default behavior of the Adjust SDK is to **pause sending HTTP requests while the app is in the background**. You can change this in your `AdjustConfig2dx` instance by calling the `setSendInBackground` method:
Expand Down Expand Up @@ -1224,6 +1265,23 @@ adjustConfig.setUrlStrategy(AdjustDataResidencyTR); // for Turkey data residency
adjustConfig.setUrlStrategy(AdjustDataResidencyUS); // for US data residency region
```

### <a id="coppa-compliance"></a>COPPA compliance

By default Adjust SDK doesn't mark app as COPPA compliant. In order to mark your app as COPPA compliant, make sure to call `setCoppaCompliantEnabled` method of `AdjustConfig2dx` instance with boolean parameter `true`:

```cpp
adjustConfig.setCoppaCompliantEnabled(true);
```

**Note:** By enabling this feature, third-party sharing will be automatically disabled for the users. If later during the app lifetime you decide not to mark app as COPPA compliant anymore, third-party sharing **will not be automatically re-enabled**. Instead, next to not marking your app as COPPA compliant anymore, you will need to explicitly re-enable third-party sharing in case you want to do that.

### <a id="play-store-kids-apps"></a>Play Store Kids Apps

By default Adjust SDK doesn't mark Android app as Play Store Kids App. In order to mark your app as the app which is targetting kids in Play Store, make sure to call `setPlayStoreKidsAppEnabled` method of `AdjustConfig2dx` instance with boolean parameter `true`:

```cpp
adjustConfig.setPlayStoreKidsAppEnabled(true);
```

[adjust]: http://adjust.com
[dashboard]: http://adjust.com
Expand Down Expand Up @@ -1252,7 +1310,7 @@ adjustConfig.setUrlStrategy(AdjustDataResidencyUS); // for US data residency reg

The Adjust SDK is licensed under the MIT License.

Copyright (c) 2012-2021 Adjust GmbH, http://www.adjust.com
Copyright (c) 2015-Present Adjust GmbH, http://www.adjust.com

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.29.0
4.32.0
35 changes: 35 additions & 0 deletions dist/ADJAdRevenue2dx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// ADJAdRevenue2dx.h
// Adjust SDK
//
// Created by Uglješa Erceg (@uerceg) on 14th October 2022.
// Copyright © 2022-Present Adjust GmbH. All rights reserved.
//

#ifndef _ADJUST_ADJADREVENUE2DX_H_
#define _ADJUST_ADJADREVENUE2DX_H_

#include <iostream>

class ADJAdRevenue2dx {
private:
void* adRevenue;
void initAdRevenue(std::string source);

public:
ADJAdRevenue2dx() {}
ADJAdRevenue2dx(std::string source) {
initAdRevenue(source);
}

void setRevenue(double amount, std::string currency);
void setAdImpressionsCount(int adImpressionsCount);
void setAdRevenueNetwork(std::string adRevenueNetwork);
void setAdRevenueUnit(std::string adRevenueUnit);
void setAdRevenuePlacement(std::string adRevenuePlacement);
void addCallbackParameter(std::string key, std::string value);
void addPartnerParameter(std::string key, std::string value);
void* getAdRevenue();
};

#endif /* _ADJUST_ADJADREVENUE2DX_H_ */
49 changes: 49 additions & 0 deletions dist/ADJAdRevenue2dx.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// ADJAdRevenue2dx.mm
// Adjust SDK
//
// Created by Uglješa Erceg (@uerceg) on 14th October 2022.
// Copyright © 2022-Present Adjust GmbH. All rights reserved.
//

#include "ADJAdRevenue2dx.h"
#include <AdjustSdk/ADJAdRevenue.h>

void ADJAdRevenue2dx::initAdRevenue(std::string source) {
adRevenue = [[ADJAdRevenue alloc] initWithSource:[NSString stringWithUTF8String:source.c_str()]];
}

void ADJAdRevenue2dx::setRevenue(double amount, std::string currency) {
[((ADJAdRevenue *)adRevenue) setRevenue:amount
currency:[NSString stringWithUTF8String:currency.c_str()]];
}

void ADJAdRevenue2dx::setAdImpressionsCount(int adImpressionsCount) {
[((ADJAdRevenue *)adRevenue) setAdImpressionsCount:adImpressionsCount];
}

void ADJAdRevenue2dx::setAdRevenueNetwork(std::string adRevenueNetwork) {
[((ADJAdRevenue *)adRevenue) setAdRevenueNetwork:[NSString stringWithUTF8String:adRevenueNetwork.c_str()]];
}

void ADJAdRevenue2dx::setAdRevenueUnit(std::string adRevenueUnit) {
[((ADJAdRevenue *)adRevenue) setAdRevenueUnit:[NSString stringWithUTF8String:adRevenueUnit.c_str()]];
}

void ADJAdRevenue2dx::setAdRevenuePlacement(std::string adRevenuePlacement) {
[((ADJAdRevenue *)adRevenue) setAdRevenuePlacement:[NSString stringWithUTF8String:adRevenuePlacement.c_str()]];
}

void ADJAdRevenue2dx::addCallbackParameter(std::string key, std::string value) {
[((ADJAdRevenue *)adRevenue) addCallbackParameter:[NSString stringWithUTF8String:key.c_str()]
value:[NSString stringWithUTF8String:value.c_str()]];
}

void ADJAdRevenue2dx::addPartnerParameter(std::string key, std::string value) {
[((ADJAdRevenue *)adRevenue) addPartnerParameter:[NSString stringWithUTF8String:key.c_str()]
value:[NSString stringWithUTF8String:value.c_str()]];
}

void* ADJAdRevenue2dx::getAdRevenue() {
return adRevenue;
}
4 changes: 4 additions & 0 deletions dist/ADJAdjust2dx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "ADJConfig2dx.h"
#include "ADJAppStoreSubscription2dx.h"
#include "ADJThirdPartySharing2dx.h"
#include "ADJAdRevenue2dx.h"
#include "AdjustAttribution2dx.h"

extern const std::string ADJEnvironmentSandbox2dx;
Expand All @@ -41,6 +42,7 @@ class ADJAdjust2dx {
static void resetSessionCallbackParameters();
static void resetSessionPartnerParameters();
static void trackAdRevenue(std::string source, std::string payload);
static void trackAdRevenueNew(ADJAdRevenue2dx adRevenue);
static bool isEnabled();
static std::string getIdfa();
static std::string getAdid();
Expand All @@ -51,6 +53,8 @@ class ADJAdjust2dx {
static void trackThirdPartySharing(ADJThirdPartySharing2dx thirdPartySharing);
static void trackMeasurementConsent(bool measurementConsent);
static void updateConversionValue(int conversionValue);
static void checkForNewAttStatus();
static std::string getLastDeeplink();
// For testing purposes only.
static void setTestOptions(std::map<std::string, std::string> testOptionsMap);
static void teardown();
Expand Down
26 changes: 25 additions & 1 deletion dist/ADJAdjust2dx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
[Adjust trackAdRevenue:[NSString stringWithUTF8String:source.c_str()] payload:dataPayload];
}

void ADJAdjust2dx::trackAdRevenueNew(ADJAdRevenue2dx adRevenue) {
[Adjust trackAdRevenue:(ADJAdRevenue *)adRevenue.getAdRevenue()];
}

bool ADJAdjust2dx::isEnabled() {
return [Adjust isEnabled];
}
Expand Down Expand Up @@ -167,6 +171,7 @@
std::string costType;
double costAmount;
std::string costCurrency;
std::string fbInstallReferrer = NULL;

if (nil != attribution) {
if (attribution.trackerToken != NULL) {
Expand Down Expand Up @@ -215,7 +220,8 @@
adid,
costType,
costAmount,
costCurrency);
costCurrency,
fbInstallReferrer);
return attribution2dx;
}

Expand All @@ -241,6 +247,24 @@
[Adjust trackMeasurementConsent:measurementConsent];
}

void ADJAdjust2dx::checkForNewAttStatus() {
[Adjust checkForNewAttStatus];
}

std::string ADJAdjust2dx::getLastDeeplink() {
NSURL *lastDeeplink = [Adjust lastDeeplink];
if (nil == lastDeeplink) {
return "";
}
NSString *strLastDeeplink = [lastDeeplink absoluteString];
if (nil == strLastDeeplink) {
return "";
}

std::string stdStrLastDeeplink = std::string([strLastDeeplink UTF8String]);
return stdStrLastDeeplink;
}

void ADJAdjust2dx::setTestOptions(std::map<std::string, std::string> testOptionsMap) {
AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init];
testOptions.baseUrl = [NSString stringWithUTF8String:testOptionsMap["baseUrl"].c_str()];
Expand Down
2 changes: 2 additions & 0 deletions dist/ADJConfig2dx.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class ADJConfig2dx {
void setIsDeviceKnown(bool isDeviceKnown);
void setUrlStrategy(std::string urlStrategy);
void deactivateSkAdNetworkHandling();
void setCoppaCompliantEnabled(bool isEnabled);
void setLinkMeEnabled(bool isEnabled);
void setAttributionCallback(void(*callbackMethod)(AdjustAttribution2dx attribution));
void setEventSuccessCallback(void(*callbackMethod)(AdjustEventSuccess2dx eventSuccess));
void setEventFailureCallback(void(*callbackMethod)(AdjustEventFailure2dx eventFailure));
Expand Down
8 changes: 8 additions & 0 deletions dist/ADJConfig2dx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
[((ADJConfig *)config) deactivateSKAdNetworkHandling];
}

void ADJConfig2dx::setCoppaCompliantEnabled(bool isEnabled) {
((ADJConfig *)config).coppaCompliantEnabled = isEnabled;
}

void ADJConfig2dx::setLinkMeEnabled(bool isEnabled) {
((ADJConfig *)config).linkMeEnabled = isEnabled;
}

void ADJConfig2dx::setAttributionCallback(void (*callbackMethod)(AdjustAttribution2dx attribution)) {
attributionCallback = callbackMethod;
}
Expand Down
Loading