diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3fdaee3..8c3ce12 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,23 @@
+### Version 4.33.0 (13th March 2023)
+#### Added
+- Added support for SKAN 4.0.
+- Added partner sharing settings to the third party sharing feature.
+- Added `getLastDeeplink` getter to `Adjust` API to be able to get last tracked deep link by the SDK for iOS platform.
+- Added support for `LinkMe` feature.
+- Added support to get Facebook install referrer information in attribution callback.
+- Added ability to mark your app as COPPA compliant. You can enable this setting by passing `true` as value of `coppaCompliant` key when initializing Adjust SDK.
+- 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 `true` as value of `playStoreKidsApp` key when initializing Adjust SDK.
+- Added `checkForNewAttStatus` method to `Adjust` API to allow iOS apps to instruct to SDK to check if `att_status` might have changed in the meantime.
+
+#### Changed
+- Switched to adding permission `com.google.android.gms.permission.AD_ID` in the Android app's mainfest by default.
+
+#### Native SDKs
+- [Android@v4.33.3][android_sdk_v4.33.3]
+- [iOS@v4.33.4][ios_sdk_v4.33.4]
+
+---
+
### Version 4.29.3 (26th January 2022)
#### Changed
- Updated native SDKs to latest versions.
@@ -212,6 +232,7 @@
[ios_sdk_v4.29.1]: https://github.com/adjust/ios_sdk/tree/v4.29.1
[ios_sdk_v4.29.2]: https://github.com/adjust/ios_sdk/tree/v4.29.2
[ios_sdk_v4.29.6]: https://github.com/adjust/ios_sdk/tree/v4.29.6
+[ios_sdk_v4.33.4]: https://github.com/adjust/ios_sdk/tree/v4.33.4
[android_sdk_v4.12.0]: https://github.com/adjust/android_sdk/tree/v4.12.0
[android_sdk_v4.12.1]: https://github.com/adjust/android_sdk/tree/v4.12.1
@@ -228,3 +249,4 @@
[android_sdk_v4.28.1]: https://github.com/adjust/android_sdk/tree/v4.28.1
[android_sdk_v4.28.8]: https://github.com/adjust/android_sdk/tree/v4.28.8
[android_sdk_v4.28.9]: https://github.com/adjust/android_sdk/tree/v4.28.9
+[android_sdk_v4.33.3]: https://github.com/adjust/android_sdk/tree/v4.33.3
diff --git a/README.md b/README.md
index bee927c..54a455b 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ This is the Adjust™ plugin for Solar2D (ex Corona SDK). You can read more abou
* [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-value)
* [Conversion value updated callback](#skadn-cv-updated-callback)
@@ -117,7 +118,7 @@ You can now add the Adjust SDK to your Corona Enterprise app project. The Adjust
Inside your Android Studio app project, create a `libs` folder inside of your app folder and add the `plugin.adjust.jar` file to it. After that, please update your app's `build.gradle` file and add the following lines to your `dependencies` section:
```
-compile 'com.adjust.sdk:adjust-android:4.28.9'
+compile 'com.adjust.sdk:adjust-android:4.33.3'
compile 'com.android.installreferrer:installreferrer:2.2'
```
@@ -194,7 +195,9 @@ If you are targeting Android 12 and above (API level 31), you need to add the `c
```
-For more information, see [Google's `AdvertisingIdClient.Info` documentation](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid).
+For more information, see [Google's `AdvertisingIdClient.Info` documentation](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid).
+
+**Note**: As of SDK v4.33.0, this permission is being automatically added by Adjust SDK, so you don't need to do it on your own.
### Google Play Services
@@ -203,7 +206,7 @@ Since August 1, 2014, apps in the Google Play Store must use the [Google adverti
Open the `build.gradle` file of your app and find the `dependencies` block. Add the following line:
```
-compile 'com.google.android.gms:play-services-analytics:11.8.0'
+compile 'com.google.android.gms:play-services-ads-identifier:18.0.1'
```
To check whether the analytics part of the Google Play Services library has been successfully added to your app, you should start your app by configuring the SDK to run in `SANDBOX` mode and set the log level to `VERBOSE`. After that, track a session or some events in your app and observe the list of parameters in the verbose logs which are being read once the session or event has been tracked. If you see a parameter called `gps_adid` in there, you have successfully added the analytics part of the Google Play Services library to your app and our SDK is reading the necessary information from it.
@@ -275,7 +278,6 @@ As of v4.23.0, the Adjust SDK supports install tracking on Huawei devices with H
You can add following iOS frameworks to your generated Xcode project to take advantage of additional features:
-* `iAd.framework` - needed for Apple Search Ads tracking
* `AdServices.framework` - needed for Apple Search Ads tracking
* `AdSupport.framework` - needed for reading iOS Advertising Id (IDFA)
* `StoreKit.framework` - needed for communication with `SKAdNetwork` framework
@@ -352,6 +354,14 @@ elseif status == "3" then print("[Adjust]: ATTrackingManagerAuthorizationStatusA
end
```
+### Check for ATT status change
+
+In cases where you are not using [Adjust app-tracking authorization wrapper](#ad-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:
+
+```lua
+adjust.checkForNewAttStatus();
+```
+
### SKAdNetwork framework
**Note**: This feature exists only in iOS platform.
@@ -775,6 +785,7 @@ local function attributionListener(event)
print("Cost Type: " .. json_attribution.costType)
print("Cost Amount: " .. json_attribution.costAmount)
print("Cost Currency: " .. json_attribution.costCurrency)
+ print("FB install referrer: " .. json_attribution.fbInstallReferrer)
end
-- ...
@@ -794,18 +805,18 @@ adjust.create({
Within the listener function you have access to the `attribution` parameters. Here is a quick summary of their properties:
-- `trackerToken` the tracker token of the current attribution
-- `trackerName` the tracker name of the current attribution
-- `network` the network grouping level of the current attribution
-- `campaign` the campaign grouping level of the current attribution
-- `adgroup` the ad group grouping level of the current attribution
-- `creative` the creative grouping level of the current attribution
-- `clickLabel` the click label of the current attribution
-- `adid` the Adjust device identifier
-- `costType` the cost type, use `needsCost` to request this value
-- `costAmount` the price, use `needsCost` to request this value
-- `costCurrency` the currency used, use `needsCost` to request this value
-
+- `trackerToken` the tracker token of the current attribution
+- `trackerName` the tracker name of the current attribution
+- `network` the network grouping level of the current attribution
+- `campaign` the campaign grouping level of the current attribution
+- `adgroup` the ad group grouping level of the current attribution
+- `creative` the creative grouping level of the current attribution
+- `clickLabel` the click label of the current attribution
+- `adid` the Adjust device identifier
+- `costType` the cost type, use `needsCost` to request this value
+- `costAmount` the price, use `needsCost` to request this value
+- `costCurrency` the currency used, use `needsCost` to request this value
+- `fbInstallReferrer` the Facebook install referrer information
Please make sure to consider our [applicable attribution data policies][attribution-data].
@@ -1029,26 +1040,9 @@ Upon receiving this information, Adjust will block the sharing of that specific
### SDK signature
-An account manager must activate the Adjust SDK signature. Contact Adjust support (support@adjust.com) if you are interested in using this feature.
-
-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.
-
-An App Secret is set by passing all secret parameters (`secretId`, `info1`, `info2`, `info3`, `info4`) when making the `adjust.create` method call:
+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.
-```lua
-local adjust = require "plugin.adjust"
-
-adjust.create({
- appToken = "{YourAppToken}",
- environment = "SANDBOX",
- logLevel = "VERBOSE",
- secretId = aaa,
- info1 = bbb,
- info2 = ccc,
- info3 = ddd,
- info4 = eee
-})
-```
+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.
### Background tracking
diff --git a/VERSION b/VERSION
index 763892f..f468c16 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.29.3
+4.33.0
diff --git a/dist/libplugin_adjust.a b/dist/libplugin_adjust.a
index ad5e4ee..44e0d03 100644
Binary files a/dist/libplugin_adjust.a and b/dist/libplugin_adjust.a differ
diff --git a/dist/plugin.adjust.jar b/dist/plugin.adjust.jar
index 0bf85a3..b63e015 100644
Binary files a/dist/plugin.adjust.jar and b/dist/plugin.adjust.jar differ
diff --git a/dist_directory b/dist_directory
index 473384d..47f90b8 160000
--- a/dist_directory
+++ b/dist_directory
@@ -1 +1 @@
-Subproject commit 473384d4388eef1a5ab415ece927c9453192316b
+Subproject commit 47f90b885df15d605dce563cae939a4efd35c658
diff --git a/ext/android/sdk b/ext/android/sdk
index 4e1356c..43b88df 160000
--- a/ext/android/sdk
+++ b/ext/android/sdk
@@ -1 +1 @@
-Subproject commit 4e1356c0340b036d44cbcfa29e9f8017988ed0ba
+Subproject commit 43b88df52828aed755cc7f12fba9149008d50dde
diff --git a/ext/ios/sdk b/ext/ios/sdk
index 0a126dd..6ae0388 160000
--- a/ext/ios/sdk
+++ b/ext/ios/sdk
@@ -1 +1 @@
-Subproject commit 0a126dd237edcae3caff075241d4463cf1259611
+Subproject commit 6ae03883c3b7d22e72e2a5937ad5dd8765d9c31d
diff --git a/plugin/Corona/main.lua b/plugin/Corona/main.lua
index 082ada5..d5915eb 100644
--- a/plugin/Corona/main.lua
+++ b/plugin/Corona/main.lua
@@ -33,6 +33,7 @@ local function attributionListener(event)
print("[Adjust]: Cost type: " .. json_attribution.costType)
print("[Adjust]: Cost amount: " .. json_attribution.costAmount)
print("[Adjust]: Cost currency: " .. json_attribution.costCurrency)
+ print("[Adjust]: FB install referrer: " .. json_attribution.fbInstallReferrer)
end
local function sessionTrackingSuccessListener(event)
@@ -80,7 +81,16 @@ local function deferredDeeplinkListener(event)
end
local function conversionValueUpdatedListener(event)
- print("[Adjust]: Update conversion value: " .. event.message)
+ print("[Adjust]: Pre-SKAN4 conversion value update callback pinged!")
+ if event.message ~= nil then print("[Adjust]: Conversion value: " .. event.message) end
+end
+
+local function skan4ConversionValueUpdatedListener(event)
+ local json_skan4_update = json.decode(event.message)
+ print("[Adjust]: SKAN4 conversion value update callback pinged!")
+ if json_skan4_update.fineValue ~= nil then print("[Adjust]: Conversion value: " .. json_skan4_update.fineValue) end
+ if json_skan4_update.coarseValue ~= nil then print("[Adjust]: Coarse value: " .. json_skan4_update.coarseValue) end
+ if json_skan4_update.lockWindow ~= nil then print("[Adjust]: Lock window: " .. json_skan4_update.lockWindow) end
end
-- initialize Adjust SDK
@@ -92,6 +102,7 @@ adjust.setSessionTrackingSuccessListener(sessionTrackingSuccessListener)
adjust.setSessionTrackingFailureListener(sessionTrackingFailureListener)
adjust.setDeferredDeeplinkListener(deferredDeeplinkListener)
adjust.setConversionValueUpdatedListener(conversionValueUpdatedListener)
+adjust.setSkan4ConversionValueUpdatedListener(skan4ConversionValueUpdatedListener)
adjust.addSessionCallbackParameter("scp1", "scp1_value1")
adjust.addSessionCallbackParameter("scp2", "scp2_value2")
@@ -126,6 +137,9 @@ adjust.create({
-- info2 = ccc,
-- info3 = ddd,
-- info4 = eee,
+ -- coppaCompliant = true,
+ -- linkMeEnabled = true,
+ -- playStoreKidsApp = true,
})
adjust.requestTrackingAuthorizationWithCompletionHandler(function(event)
@@ -151,7 +165,14 @@ local function handleTrackSimpleEvent(event)
adjust.trackEvent({
eventToken = "g3mfiw"
})
- adjust.updateConversionValue(6)
+ -- adjust.updateConversionValueWithCallback(6, function(event)
+ -- print("[Adjust]: Update conversion value pre-SKAN4 style error = " .. event.message)
+ -- end)
+ -- adjust.updateConversionValueWithSkan4Callback(6, "low", false, function(event)
+ -- print("[Adjust]: Update conversion value SKAN4 style error = " .. event.message)
+ -- end)
+ -- adjust.checkForNewAttStatus()
+ -- adjust.updateConversionValue(6)
-- adjust.trackMeasurementConsent(true)
-- adjust.trackThirdPartySharing({
-- enabled = true,
@@ -167,6 +188,13 @@ local function handleTrackSimpleEvent(event)
-- value = "NFB-value",
-- },
-- },
+ -- partnerSharingSettings = {
+ -- {
+ -- partnerName = "facebook",
+ -- install = true,
+ -- sessions = false,
+ -- },
+ -- },
-- })
-- adjust.trackAppStoreSubscription({
-- price = "6.66",
@@ -469,6 +497,7 @@ local function handleGetAttribution(event)
print("Cost type: " .. json_attribution.costType)
print("Cost amount: " .. json_attribution.costAmount)
print("Cost currency: " .. json_attribution.costCurrency)
+ print("FB install referrer: " .. json_attribution.fbInstallReferrer)
end)
end
end
diff --git a/plugin/android/app/libs/plugin.adjust.jar b/plugin/android/app/libs/plugin.adjust.jar
index 0bf85a3..b63e015 100644
Binary files a/plugin/android/app/libs/plugin.adjust.jar and b/plugin/android/app/libs/plugin.adjust.jar differ
diff --git a/plugin/android/build.gradle.kts b/plugin/android/build.gradle.kts
index 1e61134..7347fa2 100644
--- a/plugin/android/build.gradle.kts
+++ b/plugin/android/build.gradle.kts
@@ -5,7 +5,7 @@ buildscript {
}
dependencies {
classpath(kotlin("gradle-plugin", version = "1.3.70"))
- classpath("com.android.tools.build:gradle:4.1.3")
+ classpath("com.android.tools.build:gradle:4.2.2")
classpath("com.beust:klaxon:5.0.1")
}
}
diff --git a/plugin/android/gradle/wrapper/gradle-wrapper.properties b/plugin/android/gradle/wrapper/gradle-wrapper.properties
index fe6fbbf..e058df2 100644
--- a/plugin/android/gradle/wrapper/gradle-wrapper.properties
+++ b/plugin/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
diff --git a/plugin/android/plugin/build.gradle b/plugin/android/plugin/build.gradle
index 071db5b..912b75f 100644
--- a/plugin/android/plugin/build.gradle
+++ b/plugin/android/plugin/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 32
+ compileSdkVersion 33
defaultConfig {
minSdkVersion 15
- targetSdkVersion 32
+ targetSdkVersion 33
versionCode 1
versionName "1.0"
}
@@ -30,5 +30,5 @@ task extractPluginJar() {
dependencies {
implementation ':Corona@aar'
- api 'com.adjust.sdk:adjust-android:4.28.9'
+ api 'com.adjust.sdk:adjust-android:4.33.3'
}
diff --git a/plugin/android/plugin/src/main/AndroidManifest.xml b/plugin/android/plugin/src/main/AndroidManifest.xml
index ebda9fc..31ba7c8 100644
--- a/plugin/android/plugin/src/main/AndroidManifest.xml
+++ b/plugin/android/plugin/src/main/AndroidManifest.xml
@@ -3,6 +3,7 @@
+
mapPartnerSharingSettings = L.checkJavaObject(3, Map.class);
+ String partnerName = (String) mapPartnerSharingSettings.get("partnerName");
+ for (Map.Entry entry : mapPartnerSharingSettings.entrySet()) {
+ if (!entry.getKey().equals("partnerName")) {
+ adjustThirdPartySharing.addPartnerSharingSetting(
+ partnerName,
+ entry.getKey(),
+ (Boolean) entry.getValue());
+ }
+ }
+ L.pop(1);
+ }
+ }
+ L.pop(1);
+
Adjust.trackThirdPartySharing(adjustThirdPartySharing);
return 0;
}
@@ -1337,6 +1391,16 @@ private int adjust_setConversionValueUpdatedListener(LuaState L) {
return 0;
}
+ // Public API.
+ private int adjust_setSkan4ConversionValueUpdatedListener(LuaState L) {
+ // Hardcoded listener index for ADJUST.
+ int listenerIndex = 1;
+ if (CoronaLua.isListener(L, listenerIndex, "ADJUST")) {
+ this.skan4ConversionValueUpdatedListener = CoronaLua.newRef(L, listenerIndex);
+ }
+ return 0;
+ }
+
// For testing purposes only.
private int adjust_onResume(LuaState L) {
String param = L.checkString(1);
@@ -1860,6 +1924,18 @@ public int invoke(LuaState L) {
}
}
+ private class SetSkan4ConversionValueUpdatedListenerWrapper implements NamedJavaFunction {
+ @Override
+ public String getName() {
+ return "setSkan4ConversionValueUpdatedListener";
+ }
+
+ @Override
+ public int invoke(LuaState L) {
+ return adjust_setSkan4ConversionValueUpdatedListener(L);
+ }
+ }
+
private class GetIdfaWrapper implements NamedJavaFunction {
@Override
public String getName() {
@@ -1883,6 +1959,19 @@ public int invoke(LuaState luaState) {
return 0;
}
}
+
+ private class CheckForNewAttStatus implements NamedJavaFunction {
+ @Override
+ public String getName() {
+ return "checkForNewAttStatus";
+ }
+
+ @Override
+ public int invoke(LuaState L) {
+ return 0;
+ }
+ }
+
private class UpdateConversionValueWrapper implements NamedJavaFunction {
@Override
public String getName() {
@@ -1894,6 +1983,27 @@ public int invoke(LuaState luaState) {
}
}
+ private class UpdateConversionValueWithCallbackWrapper implements NamedJavaFunction {
+ @Override
+ public String getName() {
+ return "updateConversionValueWithCallback";
+ }
+ @Override
+ public int invoke(LuaState luaState) {
+ return 0;
+ }
+ }
+
+ private class UpdateConversionValueWithSkan4CallbackWrapper implements NamedJavaFunction {
+ @Override
+ public String getName() {
+ return "updateConversionValueWithSkan4Callback";
+ }
+ @Override
+ public int invoke(LuaState luaState) {
+ return 0;
+ }
+ }
private class RequestTrackingAuthorizationWithCompletionHandlerWrapper implements NamedJavaFunction {
@Override
diff --git a/plugin/android/plugin/src/main/java/plugin/adjust/LuaUtil.java b/plugin/android/plugin/src/main/java/plugin/adjust/LuaUtil.java
index b2eab7b..4660fe6 100644
--- a/plugin/android/plugin/src/main/java/plugin/adjust/LuaUtil.java
+++ b/plugin/android/plugin/src/main/java/plugin/adjust/LuaUtil.java
@@ -29,6 +29,7 @@ final public class LuaUtil {
private static final String ATTRIBUTION_COST_TYPE = "costType";
private static final String ATTRIBUTION_COST_AMOUNT = "costAmount";
private static final String ATTRIBUTION_COST_CURRENCY = "costCurrency";
+ private static final String ATTRIBUTION_FB_INSTALL_REFERRER = "fbInstallReferrer";
private static final String EVENT_SUCCESS_MESSAGE = "message";
private static final String EVENT_SUCCESS_TIMESTAMP = "timestamp";
@@ -75,6 +76,7 @@ public static Map attributionToMap(AdjustAttribution attribution) {
map.put(ATTRIBUTION_COST_TYPE, null != attribution.costType ? attribution.costType : "");
map.put(ATTRIBUTION_COST_AMOUNT, null != attribution.costAmount && !attribution.costAmount.isNaN() ? attribution.costAmount : "");
map.put(ATTRIBUTION_COST_CURRENCY, null != attribution.costCurrency ? attribution.costCurrency : "");
+ map.put(ATTRIBUTION_FB_INSTALL_REFERRER, null != attribution.fbInstallReferrer ? attribution.fbInstallReferrer : "");
return map;
}
diff --git a/plugin/ios/App-Info.plist b/plugin/ios/App-Info.plist
index 2162da5..1de30ef 100644
--- a/plugin/ios/App-Info.plist
+++ b/plugin/ios/App-Info.plist
@@ -40,5 +40,16 @@
We will we will track you (clap clap stomp)
UIStatusBarStyle
UIStatusBarStyleBlackTranslucent
+ CFBundleURLTypes
+
+
+ CFBundleURLName
+ com.adjust.examples
+ CFBundleURLSchemes
+
+ adjust-example
+
+
+
diff --git a/plugin/ios/Plugin/ADJConfig.h b/plugin/ios/Plugin/ADJConfig.h
index bd7858c..2a51924 100644
--- a/plugin/ios/Plugin/ADJConfig.h
+++ b/plugin/ios/Plugin/ADJConfig.h
@@ -77,12 +77,25 @@
- (BOOL)adjustDeeplinkResponse:(nullable NSURL *)deeplink;
/**
- * @brief Optional delegate method that gets called when Adjust SDK sets conversion value for the user.
+ * @brief Optional SKAdNetwork pre 4.0 style delegate method that gets called when Adjust SDK sets conversion value for the user.
*
* @param conversionValue Conversion value used by Adjust SDK to invoke updateConversionValue: API.
*/
- (void)adjustConversionValueUpdated:(nullable NSNumber *)conversionValue;
+/**
+ * @brief Optional SKAdNetwork 4.0 style delegate method that gets called when Adjust SDK sets conversion value for the user.
+ * You can use this callback even with using pre 4.0 SKAdNetwork.
+ * In that case you can expect coarseValue and lockWindow values to be nil.
+ *
+ * @param fineValue Conversion value set by Adjust SDK.
+ * @param coarseValue Coarse value set by Adjust SDK.
+ * @param lockWindow Lock window set by Adjust SDK.
+ */
+- (void)adjustConversionValueUpdated:(nullable NSNumber *)fineValue
+ coarseValue:(nullable NSString *)coarseValue
+ lockWindow:(nullable NSNumber *)lockWindow;
+
@end
/**
@@ -153,7 +166,7 @@
/**
* @brief Enables/disables reading of iAd framework data needed for ASA tracking.
*/
-@property (nonatomic, assign) BOOL allowiAdInfoReading;
+@property (nonatomic, assign) BOOL allowiAdInfoReading DEPRECATED_MSG_ATTRIBUTE("Apple Search Ads attribution with usage of iAd.framework has been sunset by Apple as of February 7th 2023");
/**
* @brief Enables/disables reading of AdServices framework data needed for attribution.
@@ -214,6 +227,11 @@
*/
@property (nonatomic, copy, readwrite, nullable) NSString *urlStrategy;
+/**
+ * @brief Enables/disables linkMe
+ */
+@property (nonatomic, assign) BOOL linkMeEnabled;
+
/**
* @brief Get configuration object for the initialization of the Adjust SDK.
*
@@ -258,9 +276,14 @@
/**
* @brief Check if adjust configuration object is valid.
- *
+ *
* @return Boolean indicating whether adjust config object is valid or not.
*/
- (BOOL)isValid;
+
+/**
+ * @brief Enable COPPA (Children's Online Privacy Protection Act) compliant for the application.
+ */
+@property (nonatomic, assign) BOOL coppaCompliantEnabled;
@end
diff --git a/plugin/ios/Plugin/ADJThirdPartySharing.h b/plugin/ios/Plugin/ADJThirdPartySharing.h
index 610ca80..29bceff 100644
--- a/plugin/ios/Plugin/ADJThirdPartySharing.h
+++ b/plugin/ios/Plugin/ADJThirdPartySharing.h
@@ -10,14 +10,19 @@
@interface ADJThirdPartySharing : NSObject
+@property (nonatomic, nullable, readonly, strong) NSNumber *enabled;
+@property (nonatomic, nonnull, readonly, strong) NSMutableDictionary *granularOptions;
+@property (nonatomic, nonnull, readonly, strong) NSMutableDictionary *partnerSharingSettings;
+
- (nullable id)initWithIsEnabledNumberBool:(nullable NSNumber *)isEnabledNumberBool;
- (void)addGranularOption:(nonnull NSString *)partnerName
key:(nonnull NSString *)key
value:(nonnull NSString *)value;
-@property (nonatomic, nullable, readonly, strong) NSNumber *enabled;
-@property (nonatomic, nonnull, readonly, strong) NSMutableDictionary *granularOptions;
+- (void)addPartnerSharingSetting:(nonnull NSString *)partnerName
+ key:(nonnull NSString *)key
+ value:(BOOL)value;
@end
diff --git a/plugin/ios/Plugin/Adjust.h b/plugin/ios/Plugin/Adjust.h
index 9010240..06e39da 100644
--- a/plugin/ios/Plugin/Adjust.h
+++ b/plugin/ios/Plugin/Adjust.h
@@ -2,7 +2,7 @@
// Adjust.h
// Adjust SDK
//
-// V4.29.6
+// V4.33.4
// Created by Christian Wellenbrock (@wellle) on 23rd July 2013.
// Copyright (c) 2012-2021 Adjust GmbH. All rights reserved.
//
@@ -28,7 +28,6 @@
@property (nonatomic, assign) BOOL teardown;
@property (nonatomic, assign) BOOL deleteState;
@property (nonatomic, assign) BOOL noBackoffWait;
-@property (nonatomic, assign) BOOL iAdFrameworkEnabled;
@property (nonatomic, assign) BOOL adServicesFrameworkEnabled;
@property (nonatomic, assign) BOOL enableSigning;
@property (nonatomic, assign) BOOL disableSigning;
@@ -49,12 +48,16 @@ extern NSString * __nonnull const ADJAdRevenueSourceMopub;
extern NSString * __nonnull const ADJAdRevenueSourceAdMob;
extern NSString * __nonnull const ADJAdRevenueSourceIronSource;
extern NSString * __nonnull const ADJAdRevenueSourceAdMost;
+extern NSString * __nonnull const ADJAdRevenueSourceUnity;
+extern NSString * __nonnull const ADJAdRevenueSourceHeliumChartboost;
+extern NSString * __nonnull const ADJAdRevenueSourcePublisher;
/**
* Constants for country app's URL strategies.
*/
extern NSString * __nonnull const ADJUrlStrategyIndia;
extern NSString * __nonnull const ADJUrlStrategyChina;
+extern NSString * __nonnull const ADJUrlStrategyCn;
extern NSString * __nonnull const ADJDataResidencyEU;
extern NSString * __nonnull const ADJDataResidencyTR;
extern NSString * __nonnull const ADJDataResidencyUS;
@@ -305,17 +308,62 @@ extern NSString * __nonnull const ADJDataResidencyUS;
/**
* @brief Getter for app tracking authorization status.
*
- * return Value of app tracking authorization status.
+ * @return Value of app tracking authorization status.
*/
+ (int)appTrackingAuthorizationStatus;
/**
- * @brief Adjust wrapper for updateConversionValue: method.
+ * @brief Adjust wrapper for SKAdNetwork's updateConversionValue: method.
*
* @param conversionValue Conversion value you would like SDK to set for given user.
*/
+ (void)updateConversionValue:(NSInteger)conversionValue;
+/**
+ * @brief Adjust wrapper for SKAdNetwork's updatePostbackConversionValue:completionHandler: method.
+ *
+ * @param conversionValue Conversion value you would like SDK to set for given user.
+ * @param completion Completion handler you can provide to catch and handle any errors.
+ */
++ (void)updatePostbackConversionValue:(NSInteger)conversionValue
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
+/**
+ * @brief Adjust wrapper for SKAdNetwork's updatePostbackConversionValue:coarseValue:completionHandler: method.
+ *
+ * @param fineValue Conversion value you would like SDK to set for given user.
+ * @param coarseValue One of the possible SKAdNetworkCoarseConversionValue values.
+ * @param completion Completion handler you can provide to catch and handle any errors.
+ */
++ (void)updatePostbackConversionValue:(NSInteger)fineValue
+ coarseValue:(nonnull NSString *)coarseValue
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
+/**
+ * @brief Adjust wrapper for SKAdNetwork's updatePostbackConversionValue:coarseValue:lockWindow:completionHandler: method.
+ *
+ * @param fineValue Conversion value you would like SDK to set for given user.
+ * @param coarseValue One of the possible SKAdNetworkCoarseConversionValue values.
+ * @param lockWindow A Boolean value that indicates whether to send the postback before the conversion window ends.
+ * @param completion Completion handler you can provide to catch and handle any errors.
+ */
++ (void)updatePostbackConversionValue:(NSInteger)fineValue
+ coarseValue:(nonnull NSString *)coarseValue
+ lockWindow:(BOOL)lockWindow
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
+/**
+ * @brief Instruct to Adjust SDK to check current state of att_status.
+ */
++ (void)checkForNewAttStatus;
+
+/**
+ * @brief Get the last deep link which has opened the app.
+ *
+ * @return Last deep link which has opened the app.
+ */
++ (nullable NSURL *)lastDeeplink;
+
/**
* @brief Method used for internal testing only. Don't use it in production.
*/
@@ -384,10 +432,26 @@ extern NSString * __nonnull const ADJDataResidencyUS;
- (void)updateConversionValue:(NSInteger)conversionValue;
+- (void)updatePostbackConversionValue:(NSInteger)conversionValue
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
+- (void)updatePostbackConversionValue:(NSInteger)fineValue
+ coarseValue:(nonnull NSString *)coarseValue
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
+- (void)updatePostbackConversionValue:(NSInteger)fineValue
+ coarseValue:(nonnull NSString *)coarseValue
+ lockWindow:(BOOL)lockWindow
+ completionHandler:(void (^_Nullable)(NSError *_Nullable error))completion;
+
- (void)trackThirdPartySharing:(nonnull ADJThirdPartySharing *)thirdPartySharing;
- (void)trackMeasurementConsent:(BOOL)enabled;
- (void)trackAdRevenue:(nonnull ADJAdRevenue *)adRevenue;
+- (void)checkForNewAttStatus;
+
+- (nullable NSURL *)lastDeeplink;
+
@end
diff --git a/plugin/ios/Plugin/AdjustPlugin.h b/plugin/ios/Plugin/AdjustPlugin.h
index 790e0ab..b3fc1a4 100644
--- a/plugin/ios/Plugin/AdjustPlugin.h
+++ b/plugin/ios/Plugin/AdjustPlugin.h
@@ -2,7 +2,7 @@
// AdjustPlugin.h
// Adjust SDK
//
-// V4.29.3
+// V4.33.0
// Created by Abdullah Obaied (@obaied) on 11th September 2017.
// Copyright (c) 2017-2022 Adjust GmbH. All rights reserved.
//
diff --git a/plugin/ios/Plugin/AdjustPlugin.mm b/plugin/ios/Plugin/AdjustPlugin.mm
index 1d0c9d3..23e5246 100644
--- a/plugin/ios/Plugin/AdjustPlugin.mm
+++ b/plugin/ios/Plugin/AdjustPlugin.mm
@@ -21,8 +21,11 @@
#define EVENT_GET_AMAZON_AD_ID @"adjust_getAmazonAdId"
#define EVENT_GET_SDK_VERSION @"adjust_getSdkVersion"
#define EVENT_GET_AUTHORIZATION_STATUS @"adjust_requestTrackingAuthorizationWithCompletionHandler"
+#define EVENT_GET_LAST_DEEPLINK @"adjust_getLastDeeplink"
+#define EVENT_UPDATE_CONVERSION_VALUE_WITH_CALLBACK @"adjust_updateConversionValueWithCallback"
+#define EVENT_UPDATE_CONVERSION_VALUE_WITH_SKAN4_CALLBACK @"adjust_updateConversionValueWithSkan4Callback"
-#define SDK_PREFIX @"corona4.29.3"
+#define SDK_PREFIX @"corona4.33.0"
// ----------------------------------------------------------------------------
@@ -40,6 +43,7 @@
void InitializeSessionTrackingFailureListener(CoronaLuaRef listener);
void InitializeDeferredDeeplinkListener(CoronaLuaRef listener);
void InitializeConversionValueUpdatedListener(CoronaLuaRef listener);
+ void InitializeSkan4ConversionValueUpdatedListener(CoronaLuaRef listener);
CoronaLuaRef GetAttributionChangedListener() const { return attributionChangedListener; }
CoronaLuaRef GetEventTrackingSuccessListener() const { return eventTrackingSuccessListener; }
@@ -48,6 +52,7 @@
CoronaLuaRef GetSessionTrackingFailureListener() const { return sessionTrackingFailureListener; }
CoronaLuaRef GetDeferredDeeplinkListener() const { return deferredDeeplinkListener; }
CoronaLuaRef GetConversionValueUpdatedListener() const { return conversionValueUpdatedListener; }
+ CoronaLuaRef GetSkan4ConversionValueUpdatedListener() const { return skan4ConversionValueUpdatedListener; }
static int Open(lua_State *L);
static Self *ToLibrary(lua_State *L);
@@ -86,6 +91,11 @@
static int setSessionTrackingFailureListener(lua_State *L);
static int setDeferredDeeplinkListener(lua_State *L);
static int setConversionValueUpdatedListener(lua_State *L);
+ static int setSkan4ConversionValueUpdatedListener(lua_State *L);
+ static int checkForNewAttStatus(lua_State *L);
+ static int getLastDeeplink(lua_State *L);
+ static int updateConversionValueWithCallback(lua_State *L);
+ static int updateConversionValueWithSkan4Callback(lua_State *L);
// Android specific.
static int getGoogleAdId(lua_State *L);
@@ -109,6 +119,7 @@
CoronaLuaRef sessionTrackingFailureListener;
CoronaLuaRef deferredDeeplinkListener;
CoronaLuaRef conversionValueUpdatedListener;
+ CoronaLuaRef skan4ConversionValueUpdatedListener;
};
// ----------------------------------------------------------------------------
@@ -124,7 +135,8 @@
sessionTrackingSuccessListener(NULL),
sessionTrackingFailureListener(NULL),
deferredDeeplinkListener(NULL),
-conversionValueUpdatedListener(NULL) {}
+conversionValueUpdatedListener(NULL),
+skan4ConversionValueUpdatedListener(NULL) {}
void AdjustPlugin::InitializeAttributionListener(CoronaLuaRef listener) {
@@ -155,6 +167,10 @@
conversionValueUpdatedListener = listener;
}
+void AdjustPlugin::InitializeSkan4ConversionValueUpdatedListener(CoronaLuaRef listener) {
+ skan4ConversionValueUpdatedListener = listener;
+}
+
int
AdjustPlugin::Open(lua_State *L) {
// Register __gc callback.
@@ -186,6 +202,7 @@
{ "setSessionTrackingFailureListener", setSessionTrackingFailureListener },
{ "setDeferredDeeplinkListener", setDeferredDeeplinkListener },
{ "setConversionValueUpdatedListener", setConversionValueUpdatedListener },
+ { "setSkan4ConversionValueUpdatedListener", setSkan4ConversionValueUpdatedListener },
{ "isEnabled", isEnabled },
{ "getIdfa", getIdfa },
{ "getSdkVersion", getSdkVersion },
@@ -198,6 +215,10 @@
{ "updateConversionValue", updateConversionValue },
{ "trackThirdPartySharing", trackThirdPartySharing },
{ "trackMeasurementConsent", trackMeasurementConsent },
+ { "checkForNewAttStatus", checkForNewAttStatus },
+ { "getLastDeeplink", getLastDeeplink },
+ { "updateConversionValueWithCallback", updateConversionValueWithCallback },
+ { "updateConversionValueWithSkan4Callback", updateConversionValueWithSkan4Callback },
{ "getGoogleAdId", getGoogleAdId },
{ "getAmazonAdId", getAmazonAdId },
{ "trackPlayStoreSubscription", trackPlayStoreSubscription },
@@ -227,6 +248,7 @@
CoronaLuaDeleteRef(L, library->GetEventTrackingFailureListener());
CoronaLuaDeleteRef(L, library->GetDeferredDeeplinkListener());
CoronaLuaDeleteRef(L, library->GetConversionValueUpdatedListener());
+ CoronaLuaDeleteRef(L, library->GetSkan4ConversionValueUpdatedListener());
delete library;
return 0;
@@ -253,12 +275,13 @@
BOOL isDeviceKnown = NO;
BOOL sendInBackground = NO;
BOOL eventBufferingEnabled = NO;
- BOOL allowiAdInfoReading = YES;
BOOL allowAdServicesInfoReading = YES;
BOOL allowIdfaReading = YES;
BOOL handleSkAdNetwork = YES;
BOOL needsCost = NO;
BOOL shouldLaunchDeferredDeeplink = YES;
+ BOOL coppaCompliant = NO;
+ BOOL linkMeEnabled = NO;
NSString *appToken = nil;
NSString *userAgent = nil;
NSString *environment = nil;
@@ -307,7 +330,7 @@
allowSuppressLogLevel:(logLevel == ADJLogLevelSuppress)];
// SDK prefix.
- [adjustConfig setSdkPrefix:@"corona4.29.3"];
+ [adjustConfig setSdkPrefix:@"corona4.33.0"];
// Log level.
[adjustConfig setLogLevel:logLevel];
@@ -320,14 +343,6 @@
}
lua_pop(L, 1);
- // iAd info reading.
- lua_getfield(L, 1, "allowiAdInfoReading");
- if (!lua_isnil(L, 2)) {
- allowiAdInfoReading = lua_toboolean(L, 2);
- [adjustConfig setAllowiAdInfoReading:allowiAdInfoReading];
- }
- lua_pop(L, 1);
-
// AdServices info reading.
lua_getfield(L, 1, "allowAdServicesInfoReading");
if (!lua_isnil(L, 2)) {
@@ -397,6 +412,8 @@
[adjustConfig setUrlStrategy:ADJUrlStrategyChina];
} else if ([urlStrategy isEqualToString:@"india"]) {
[adjustConfig setUrlStrategy:ADJUrlStrategyIndia];
+ } else if ([urlStrategy isEqualToString:@"cn"]) {
+ [adjustConfig setUrlStrategy:ADJUrlStrategyCn];
} else if ([urlStrategy isEqualToString:@"data-residency-eu"]) {
[adjustConfig setUrlStrategy:ADJDataResidencyEU];
} else if ([urlStrategy isEqualToString:@"data-residency-tr"]) {
@@ -481,6 +498,22 @@
[adjustConfig setAppSecret:secretId info1:info1 info2:info2 info3:info3 info4:info4];
}
+ // COPPA compliance.
+ lua_getfield(L, 1, "coppaCompliant");
+ if (!lua_isnil(L, 2)) {
+ coppaCompliant = lua_toboolean(L, 2);
+ [adjustConfig setCoppaCompliantEnabled:coppaCompliant];
+ }
+ lua_pop(L, 1);
+
+ // LinkMe feature.
+ lua_getfield(L, 1, "linkMeEnabled");
+ if (!lua_isnil(L, 2)) {
+ linkMeEnabled = lua_toboolean(L, 2);
+ [adjustConfig setLinkMeEnabled:linkMeEnabled];
+ }
+ lua_pop(L, 1);
+
// Callbacks.
Self *library = ToLibrary(L);
BOOL isAttributionChangedListenerImplmented = library->GetAttributionChangedListener() != NULL;
@@ -490,6 +523,7 @@
BOOL isSessionTrackingFailureListenerImplmented = library->GetSessionTrackingFailureListener() != NULL;
BOOL isDeferredDeeplinkListenerImplemented = library->GetDeferredDeeplinkListener() != NULL;
BOOL isConversionValueUpdatedListenerImplemented = library->GetConversionValueUpdatedListener() != NULL;
+ BOOL isSkan4ConversionValueUpdatedListenerImplemented = library->GetConversionValueUpdatedListener() != NULL;
if (isAttributionChangedListenerImplmented
|| isEventTrackingSuccessListenerImplmented
@@ -497,7 +531,8 @@
|| isSessionTrackingSuccessListenerImplmented
|| isSessionTrackingFailureListenerImplmented
|| isDeferredDeeplinkListenerImplemented
- || isConversionValueUpdatedListenerImplemented) {
+ || isConversionValueUpdatedListenerImplemented
+ || isSkan4ConversionValueUpdatedListenerImplemented) {
[adjustConfig setDelegate:
[AdjustSdkDelegate getInstanceWithSwizzleOfAttributionChangedCallback:library->GetAttributionChangedListener()
eventTrackingSuccessCallback:library->GetEventTrackingSuccessListener()
@@ -506,6 +541,7 @@
sessionTrackingFailureCallback:library->GetSessionTrackingFailureListener()
deferredDeeplinkCallback:library->GetDeferredDeeplinkListener()
conversionValueUpdatedCallback:library->GetConversionValueUpdatedListener()
+ skan4ConversionValueUpdatedCallback:library->GetSkan4ConversionValueUpdatedListener()
shouldLaunchDeferredDeeplink:shouldLaunchDeferredDeeplink
andLuaState:L]];
}
@@ -796,6 +832,17 @@
return 0;
}
+// Public API.
+int AdjustPlugin::setSkan4ConversionValueUpdatedListener(lua_State *L) {
+ int listenerIndex = 1;
+ if (CoronaLuaIsListener(L, listenerIndex, "ADJUST")) {
+ Self *library = ToLibrary(L);
+ CoronaLuaRef listener = CoronaLuaNewRef(L, listenerIndex);
+ library->InitializeSkan4ConversionValueUpdatedListener(listener);
+ }
+ return 0;
+}
+
// Public API.
int AdjustPlugin::setEnabled(lua_State *L) {
BOOL enabled = lua_toboolean(L, 1);
@@ -1125,6 +1172,45 @@
return 0;
}
+// Public API.
+int AdjustPlugin::updateConversionValueWithCallback(lua_State *L) {
+ NSInteger value = lua_tointeger(L, 1);
+ int listenerIndex = 2;
+ if (CoronaLuaIsListener(L, listenerIndex, "ADJUST")) {
+ CoronaLuaRef listener = CoronaLuaNewRef(L, listenerIndex);
+ [Adjust updatePostbackConversionValue:value completionHandler:^(NSError * _Nullable error) {
+ [AdjustSdkDelegate dispatchEvent:EVENT_UPDATE_CONVERSION_VALUE_WITH_CALLBACK
+ withState:L
+ callback:listener
+ andMessage:[error localizedDescription]];
+ }];
+ }
+ return 0;
+}
+
+// Public API.
+int AdjustPlugin::updateConversionValueWithSkan4Callback(lua_State *L) {
+ NSInteger conversionValue = lua_tointeger(L, 1);
+ const char* coarseValue = lua_tostring(L, 2);
+ BOOL lockWindow = lua_toboolean(L, 3);
+ int listenerIndex = 4;
+ if (coarseValue != NULL) {
+ if (CoronaLuaIsListener(L, listenerIndex, "ADJUST")) {
+ CoronaLuaRef listener = CoronaLuaNewRef(L, listenerIndex);
+ [Adjust updatePostbackConversionValue:conversionValue
+ coarseValue:[NSString stringWithUTF8String:coarseValue]
+ lockWindow:lockWindow
+ completionHandler:^(NSError * _Nullable error) {
+ [AdjustSdkDelegate dispatchEvent:EVENT_UPDATE_CONVERSION_VALUE_WITH_SKAN4_CALLBACK
+ withState:L
+ callback:listener
+ andMessage:[error localizedDescription]];
+ }];
+ }
+ }
+ return 0;
+}
+
// Public API.
int AdjustPlugin::trackThirdPartySharing(lua_State *L) {
if (!lua_istable(L, 1)) {
@@ -1156,6 +1242,25 @@
}
lua_pop(L, 1);
+ // Partner sharing settings.
+ lua_getfield(L, 1, "partnerSharingSettings");
+ if (!lua_isnil(L, 2) && lua_istable(L, 2)) {
+ NSDictionary *dict = CoronaLuaCreateDictionary(L, 2);
+ for (id key in dict) {
+ NSDictionary *partnerSharingSettings = [dict objectForKey:key];
+ // partnerSharingSettings dictionary contains one KVP whose key is for sure partnerName
+ // we need to extract the remaining KVPs and attach them to that partner sharing settings
+ for (id keySetting in partnerSharingSettings) {
+ if (![keySetting isEqualToString:@"partnerName"]) {
+ [adjustThirdPartySharing addPartnerSharingSetting:partnerSharingSettings[@"partnerName"]
+ key:keySetting
+ value:[[partnerSharingSettings objectForKey:keySetting] boolValue]];
+ }
+ }
+ }
+ }
+ lua_pop(L, 1);
+
[Adjust trackThirdPartySharing:adjustThirdPartySharing];
return 0;
@@ -1168,6 +1273,32 @@
return 0;
}
+// Public API.
+int AdjustPlugin::checkForNewAttStatus(lua_State *L) {
+ [Adjust checkForNewAttStatus];
+ return 0;
+}
+
+// Public API.
+int AdjustPlugin::getLastDeeplink(lua_State *L) {
+ int listenerIndex = 1;
+ if (CoronaLuaIsListener(L, listenerIndex, "ADJUST")) {
+ CoronaLuaRef listener = CoronaLuaNewRef(L, listenerIndex);
+ NSURL *lastDeeplink = [Adjust lastDeeplink];
+ NSString *lastDeeplinkString;
+ if (nil != lastDeeplink) {
+ lastDeeplinkString = [lastDeeplink absoluteString];
+ if (nil == lastDeeplinkString) {
+ lastDeeplinkString = @"";
+ }
+ } else {
+ lastDeeplinkString = @"";
+ }
+ [AdjustSdkDelegate dispatchEvent:EVENT_GET_LAST_DEEPLINK withState:L callback:listener andMessage:lastDeeplinkString];
+ }
+ return 0;
+}
+
// Android specific.
// Public API.
int AdjustPlugin::getGoogleAdId(lua_State *L) {
@@ -1306,12 +1437,6 @@
}
lua_pop(L, 1);
- lua_getfield(L, 1, "iAdFrameworkEnabled");
- if (!lua_isnil(L, 2)) {
- testOptions.iAdFrameworkEnabled = lua_toboolean(L, 2);
- }
- lua_pop(L, 1);
-
lua_getfield(L, 1, "adServicesFrameworkEnabled");
if (!lua_isnil(L, 2)) {
testOptions.adServicesFrameworkEnabled = lua_toboolean(L, 2);
diff --git a/plugin/ios/Plugin/AdjustSdk.a b/plugin/ios/Plugin/AdjustSdk.a
index 00c57e1..ac5fc8e 100644
Binary files a/plugin/ios/Plugin/AdjustSdk.a and b/plugin/ios/Plugin/AdjustSdk.a differ
diff --git a/plugin/ios/Plugin/AdjustSdkDelegate.h b/plugin/ios/Plugin/AdjustSdkDelegate.h
index 57f7fbc..2b776fa 100644
--- a/plugin/ios/Plugin/AdjustSdkDelegate.h
+++ b/plugin/ios/Plugin/AdjustSdkDelegate.h
@@ -16,6 +16,7 @@
#define ADJ_SESSION_TRACKING_FAILURE @"adjust_sessionTrackingFailure"
#define ADJ_DEFERRED_DEEPLINK @"adjust_deferredDeeplink"
#define ADJ_CONVERSION_VALUE_UPDATED @"adjust_conversionValueUpdated"
+#define ADJ_SKAN4_CONVERSION_VALUE_UPDATED @"adjust_skan4ConversionValueUpdated"
/**
* @brief Adjust delegate singleton which takes care of bridging between native SDK and Lua callbacks.
@@ -62,6 +63,11 @@
*/
@property (nonatomic) CoronaLuaRef conversionValueUpdatedCallback;
+/**
+ * @brief Conversion value updated callback (SKAN4) reference.
+ */
+@property (nonatomic) CoronaLuaRef skan4ConversionValueUpdatedCallback;
+
/**
* @brief Should deferred deep link be opened or not.
*/
@@ -70,15 +76,16 @@
/**
* @brief Obtain static instance of AdjustSdkDelegate.
*
- * @param attributionCallback Attribution callback reference.
- * @param eventTrackingSuccessCallback Event success callback reference.
- * @param eventTrackingFailureCallback Event failure callback reference.
- * @param sessionTrackingSuccessCallback Session success callback reference.
- * @param sessionTrackingFailureCallback Session failure callback reference.
- * @param deferredDeeplinkCallback Deferred deep link callback reference.
- * @param conversionValueUpdatedCallback Conversion value updated callback reference.
- * @param shouldLaunchDeferredDeeplink Should deferred deep link be opened or not.
- * @param luaState Lua state object.
+ * @param attributionCallback Attribution callback reference.
+ * @param eventTrackingSuccessCallback Event success callback reference.
+ * @param eventTrackingFailureCallback Event failure callback reference.
+ * @param sessionTrackingSuccessCallback Session success callback reference.
+ * @param sessionTrackingFailureCallback Session failure callback reference.
+ * @param deferredDeeplinkCallback Deferred deep link callback reference.
+ * @param conversionValueUpdatedCallback Conversion value updated callback reference.
+ * @param skan4conversionValueUpdatedCallback Conversion value updated callback reference.
+ * @param shouldLaunchDeferredDeeplink Should deferred deep link be opened or not.
+ * @param luaState Lua state object.
*
* @returns Static instance of AdjustSdkDelegate.
*/
@@ -89,6 +96,7 @@
sessionTrackingFailureCallback:(CoronaLuaRef)sessionTrackingFailureCallback
deferredDeeplinkCallback:(CoronaLuaRef)deferredDeeplinkCallback
conversionValueUpdatedCallback:(CoronaLuaRef)conversionValueUpdatedCallback
+ skan4ConversionValueUpdatedCallback:(CoronaLuaRef)skan4ConversionValueUpdatedCallback
shouldLaunchDeferredDeeplink:(BOOL)shouldLaunchDeferredDeeplink
andLuaState:(lua_State *)luaState;
diff --git a/plugin/ios/Plugin/AdjustSdkDelegate.m b/plugin/ios/Plugin/AdjustSdkDelegate.m
index 8494326..8329ad5 100644
--- a/plugin/ios/Plugin/AdjustSdkDelegate.m
+++ b/plugin/ios/Plugin/AdjustSdkDelegate.m
@@ -33,6 +33,9 @@ @implementation AdjustSdkDelegate
NSString * const KEY_JSON_RESPONSE = @"jsonResponse";
NSString * const KEY_WILL_RETRY = @"willRetry";
NSString * const KEY_CALLBACK_ID = @"callbackId";
+NSString * const KEY_FINE_VALUE = @"fineValue";
+NSString * const KEY_COARSE_VALUE = @"coarseValue";
+NSString * const KEY_LOCK_WINDOW = @"lockWindow";
#pragma mark - Object lifecycle methods
@@ -53,6 +56,7 @@ + (id)getInstanceWithSwizzleOfAttributionChangedCallback:(CoronaLuaRef)attributi
sessionTrackingFailureCallback:(CoronaLuaRef)sessionTrackingFailureCallback
deferredDeeplinkCallback:(CoronaLuaRef)deferredDeeplinkCallback
conversionValueUpdatedCallback:(CoronaLuaRef)conversionValueUpdatedCallback
+ skan4ConversionValueUpdatedCallback:(CoronaLuaRef)skan4ConversionValueUpdatedCallback
shouldLaunchDeferredDeeplink:(BOOL)shouldLaunchDeferredDeeplink
andLuaState:(lua_State *)luaState {
dispatch_once(&onceToken, ^{
@@ -87,6 +91,10 @@ + (id)getInstanceWithSwizzleOfAttributionChangedCallback:(CoronaLuaRef)attributi
[defaultInstance swizzleOriginalSelector:@selector(adjustConversionValueUpdated:)
withSelector:@selector(adjustConversionValueUpdatedWannabe:)];
}
+ if (skan4ConversionValueUpdatedCallback != NULL) {
+ [defaultInstance swizzleOriginalSelector:@selector(adjustConversionValueUpdated:coarseValue:lockWindow:)
+ withSelector:@selector(adjustConversionValueUpdatedWannabe:coarseValue:lockWindow:)];
+ }
[defaultInstance setAttributionChangedCallback:attributionCallback];
[defaultInstance setEventTrackingSuccessCallback:eventTrackingSuccessCallback];
@@ -95,6 +103,7 @@ + (id)getInstanceWithSwizzleOfAttributionChangedCallback:(CoronaLuaRef)attributi
[defaultInstance setSessionTrackingFailureCallback:sessionTrackingFailureCallback];
[defaultInstance setDeferredDeeplinkCallback:deferredDeeplinkCallback];
[defaultInstance setConversionValueUpdatedCallback:conversionValueUpdatedCallback];
+ [defaultInstance setSkan4ConversionValueUpdatedCallback:skan4ConversionValueUpdatedCallback];
[defaultInstance setShouldLaunchDeferredDeeplink:shouldLaunchDeferredDeeplink];
[defaultInstance setLuaState:luaState];
});
@@ -300,6 +309,35 @@ - (void)adjustConversionValueUpdatedWannabe:(NSNumber *)conversionValue {
andMessage:strConversionValue];
}
+- (void)adjustConversionValueUpdatedWannabe:(nullable NSNumber *)fineValue
+ coarseValue:(nullable NSString *)coarseValue
+ lockWindow:(nullable NSNumber *)lockWindow {
+ NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
+ if (fineValue != nil) {
+ [AdjustSdkDelegate addKey:KEY_FINE_VALUE andValue:fineValue toDictionary:dictionary];
+ }
+ if (coarseValue != nil) {
+ [AdjustSdkDelegate addKey:KEY_COARSE_VALUE andValue:coarseValue toDictionary:dictionary];
+ }
+ if (lockWindow != nil) {
+ [AdjustSdkDelegate addKey:KEY_LOCK_WINDOW andValue:lockWindow toDictionary:dictionary];
+ }
+
+ NSError *error;
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dictionary
+ options:NSJSONWritingPrettyPrinted
+ error:&error];
+ if (!jsonData) {
+ NSLog(@"[Adjust][bridge]: Error while trying to convert SKAN4 conversion value update dictionary to JSON string: %@", error);
+ } else {
+ NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+ [AdjustSdkDelegate dispatchEvent:ADJ_SKAN4_CONVERSION_VALUE_UPDATED
+ withState:_luaState
+ callback:_skan4ConversionValueUpdatedCallback
+ andMessage:jsonString];
+ }
+}
+
#pragma mark - Private & helper methods
- (void)swizzleOriginalSelector:(SEL)originalSelector
diff --git a/test/Corona/command_executor.lua b/test/Corona/command_executor.lua
index ae9aa5f..94449bf 100644
--- a/test/Corona/command_executor.lua
+++ b/test/Corona/command_executor.lua
@@ -126,15 +126,6 @@ function CommandExecutor:testOptions()
testOptions.noBackoffWait = false
end
end
-
- if self.command:containsParameter("iAdFrameworkEnabled") then
- local iAdFrameworkEnabled = self.command:getFirstParameterValue("iAdFrameworkEnabled")
- if iAdFrameworkEnabled == "true" then
- testOptions.iAdFrameworkEnabled = true
- else
- testOptions.iAdFrameworkEnabled = false
- end
- end
if self.command:containsParameter("adServicesFrameworkEnabled") then
local adServicesFrameworkEnabled = self.command:getFirstParameterValue("adServicesFrameworkEnabled")
@@ -251,10 +242,6 @@ function CommandExecutor:config()
adjustConfig.eventBufferingEnabled = (self.command:getFirstParameterValue("eventBufferingEnabled") == "true")
end
- if self.command:containsParameter("allowiAdInfoReading") then
- adjustConfig.allowiAdInfoReading = (self.command:getFirstParameterValue("allowiAdInfoReading") == "true")
- end
-
if self.command:containsParameter("allowAdServicesInfoReading") then
adjustConfig.allowAdServicesInfoReading = (self.command:getFirstParameterValue("allowAdServicesInfoReading") == "true")
end
diff --git a/test/Corona/main.lua b/test/Corona/main.lua
index 18337fe..d5e8e8b 100644
--- a/test/Corona/main.lua
+++ b/test/Corona/main.lua
@@ -41,7 +41,7 @@ else
protocol = "https"
port = "8443"
end
-local baseIp = "192.168.86.52"
+local baseIp = "192.168.86.153"
local baseUrl = protocol .. "://" .. baseIp .. ":" .. port
local gdprUrl = protocol .. "://" .. baseIp .. ":" .. port
local subscriptionUrl = protocol .. "://" .. baseIp .. ":" .. port
diff --git a/test/ios/App.xcodeproj/project.pbxproj b/test/ios/App.xcodeproj/project.pbxproj
index bc91469..77034ed 100644
--- a/test/ios/App.xcodeproj/project.pbxproj
+++ b/test/ios/App.xcodeproj/project.pbxproj
@@ -202,7 +202,7 @@
9DD2998921F717060054DA79 /* MainWindow-iPad.xib */,
);
name = resource;
- path = "../../../../../../Applications/Corona-3642/Native/Corona/ios/resource";
+ path = "../../../../../../Applications/Corona-3663/Native/Corona/ios/resource";
sourceTree = "";
};
A447B66F16670015009EA762 /* CoronaNative */ = {
diff --git a/test/ios/Plugin/AdjustTestLibrary.a b/test/ios/Plugin/AdjustTestLibrary.a
index 6cf16fd..a5e4e60 100644
Binary files a/test/ios/Plugin/AdjustTestLibrary.a and b/test/ios/Plugin/AdjustTestLibrary.a differ
diff --git a/test/ios/libplugin_adjust.a b/test/ios/libplugin_adjust.a
index 0609962..fc87971 100644
Binary files a/test/ios/libplugin_adjust.a and b/test/ios/libplugin_adjust.a differ
diff --git a/test/ios/libplugin_library.a b/test/ios/libplugin_library.a
index 7a4f59b..20d5dde 100644
Binary files a/test/ios/libplugin_library.a and b/test/ios/libplugin_library.a differ