Skip to content

Commit

Permalink
Merge pull request #121 from adjust/v4360
Browse files Browse the repository at this point in the history
Version 4.36.0
  • Loading branch information
uerceg authored Nov 27, 2023
2 parents 16a1b36 + 43f2f14 commit a904d53
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 14 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
### Version 4.36.0 (27th November 2023)
#### Added
- Added getter for obtaining IDFV value of the iOS device.
- Added support for Meta install referrer.
- Added support for Google Play Games on PC.
- Added support for `TopOn` and `AD(X)` ad revenue tracking.
- Added a new type of URL strategy called `AdjustConfig.UrlStrategyCnOnly`. This URL strategy represents `AdjustConfig.UrlStrategyCn` strategy, but without fallback domains.
- Added `readDeviceInfoOnceEnabled` member to `AdjustConfig` to indicate if Android device info should be read only once.

#### Native SDKs
- [iOS@v4.36.0][ios_sdk_v4.36.0]
- [Android@v4.37.0][android_sdk_v4.37.0]
---

### Version 4.35.2 (9th October 2023)
#### Added
- Added sending of `event_callback_id` parameter (if set) with the event payload.
Expand Down Expand Up @@ -370,6 +384,7 @@
[ios_sdk_v4.35.0]: https://github.com/adjust/ios_sdk/tree/v4.35.0
[ios_sdk_v4.35.1]: https://github.com/adjust/ios_sdk/tree/v4.35.1
[ios_sdk_v4.35.2]: https://github.com/adjust/ios_sdk/tree/v4.35.2
[ios_sdk_v4.36.0]: https://github.com/adjust/ios_sdk/tree/v4.36.0

[android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0
[android_sdk_v4.18.0]: https://github.com/adjust/android_sdk/tree/v4.18.0
Expand All @@ -388,4 +403,5 @@
[android_sdk_v4.33.3]: https://github.com/adjust/android_sdk/tree/v4.33.3
[android_sdk_v4.34.0]: https://github.com/adjust/android_sdk/tree/v4.34.0
[android_sdk_v4.35.0]: https://github.com/adjust/android_sdk/tree/v4.35.0
[android_sdk_v4.35.1]: https://github.com/adjust/android_sdk/tree/v4.35.1
[android_sdk_v4.35.1]: https://github.com/adjust/android_sdk/tree/v4.35.1
[android_sdk_v4.37.0]: https://github.com/adjust/android_sdk/tree/v4.37.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ You can add Adjust SDK to your Flutter app by adding following to your `pubspec.

```yaml
dependencies:
adjust_sdk: ^4.35.2
adjust_sdk: ^4.36.0
```
Then navigate to your project in the terminal and run:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.35.2
4.36.0
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ android {
}

dependencies {
api 'com.adjust.sdk:adjust-android:4.35.1'
api 'com.adjust.sdk:adjust-android:4.37.0'
}
22 changes: 22 additions & 0 deletions android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public void onMethodCall(MethodCall call, final Result result) {
case "getIdfa":
getIdfa(result);
break;
case "getIdfv":
getIdfv(result);
break;
case "getGoogleAdId":
getGoogleAdId(result);
break;
Expand Down Expand Up @@ -313,6 +316,13 @@ private void start(final MethodCall call, final Result result) {
adjustConfig.setFinalAttributionEnabled(finalAndroidAttributionEnabled);
}

// Read Android device info only once.
if (configMap.containsKey("readDeviceInfoOnceEnabled")) {
String strReadDeviceInfoOnceEnabled = (String) configMap.get("readDeviceInfoOnceEnabled");
boolean readDeviceInfoOnceEnabled = Boolean.parseBoolean(strReadDeviceInfoOnceEnabled);
adjustConfig.setReadDeviceInfoOnceEnabled(readDeviceInfoOnceEnabled);
}

// Google Play Store kids apps.
if (configMap.containsKey("playStoreKidsAppEnabled")) {
String strPlayStoreKidsAppEnabled = (String) configMap.get("playStoreKidsAppEnabled");
Expand Down Expand Up @@ -344,6 +354,12 @@ private void start(final MethodCall call, final Result result) {
adjustConfig.setPreinstallFilePath(preinstallFilePath);
}

// META install referrer.
if (configMap.containsKey("fbAppId")) {
String fbAppId = (String) configMap.get("fbAppId");
adjustConfig.setFbAppId(fbAppId);
}

// URL strategy.
if (configMap.containsKey("urlStrategy")) {
String urlStrategy = (String) configMap.get("urlStrategy");
Expand All @@ -353,6 +369,8 @@ private void start(final MethodCall call, final Result result) {
adjustConfig.setUrlStrategy(AdjustConfig.URL_STRATEGY_INDIA);
} else if (urlStrategy.equalsIgnoreCase("cn")) {
adjustConfig.setUrlStrategy(AdjustConfig.URL_STRATEGY_CN);
} else if (urlStrategy.equalsIgnoreCase("cn-only")) {
adjustConfig.setUrlStrategy(AdjustConfig.URL_STRATEGY_CN_ONLY);
} else if (urlStrategy.equalsIgnoreCase("data-residency-eu")) {
adjustConfig.setUrlStrategy(AdjustConfig.DATA_RESIDENCY_EU);
} else if (urlStrategy.equalsIgnoreCase("data-residency-tr")) {
Expand Down Expand Up @@ -739,6 +757,10 @@ private void getIdfa(final Result result) {
result.success("Error. No IDFA on Android platform!");
}

private void getIdfv(final Result result) {
result.success("Error. No IDFV on Android platform!");
}

private void getGoogleAdId(final Result result) {
Adjust.getGoogleAdId(applicationContext, new OnDeviceIdsRead() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -526,7 +526,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -558,7 +558,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
9 changes: 9 additions & 0 deletions ios/Classes/AdjustSdk.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
[self getAttribution:call withResult:result];
} else if ([@"getIdfa" isEqualToString:call.method]) {
[self getIdfa:call withResult:result];
} else if ([@"getIdfv" isEqualToString:call.method]) {
[self getIdfv:call withResult:result];
} else if ([@"getGoogleAdId" isEqualToString:call.method]) {
[self getGoogleAdId:call withResult:result];
} else if ([@"getSdkVersion" isEqualToString:call.method]) {
Expand Down Expand Up @@ -232,6 +234,8 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
[adjustConfig setUrlStrategy:ADJUrlStrategyIndia];
} else if ([urlStrategy isEqualToString:@"cn"]) {
[adjustConfig setUrlStrategy:ADJUrlStrategyCn];
} else if ([urlStrategy isEqualToString:@"cn-only"]) {
[adjustConfig setUrlStrategy:ADJUrlStrategyCnOnly];
} else if ([urlStrategy isEqualToString:@"data-residency-eu"]) {
[adjustConfig setUrlStrategy:ADJDataResidencyEU];
} else if ([urlStrategy isEqualToString:@"data-residency-tr"]) {
Expand Down Expand Up @@ -634,6 +638,11 @@ - (void)getIdfa:(FlutterMethodCall *)call withResult:(FlutterResult)result {
result(idfa);
}

- (void)getIdfv:(FlutterMethodCall *)call withResult:(FlutterResult)result {
NSString *idfv = [Adjust idfv];
result(idfv);
}

- (void)getGoogleAdId:(FlutterMethodCall *)call withResult:(FlutterResult)result {
result([FlutterError errorWithCode:@"non_existing_method"
message:@"getGoogleAdId not available for iOS platform"
Expand Down
4 changes: 2 additions & 2 deletions ios/adjust_sdk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'adjust_sdk'
s.version = '4.35.2'
s.version = '4.36.0'
s.summary = 'Adjust Flutter SDK for iOS platform'
s.description = <<-DESC
Adjust Flutter SDK for iOS platform.
Expand All @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'

s.dependency 'Flutter'
s.dependency 'Adjust', '4.35.2'
s.dependency 'Adjust', '4.36.0'
end
7 changes: 6 additions & 1 deletion lib/adjust.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

class Adjust {
static const String _sdkPrefix = 'flutter4.35.2';
static const String _sdkPrefix = 'flutter4.36.0';
static const MethodChannel _channel =
const MethodChannel('com.adjust.sdk/api');

Expand Down Expand Up @@ -91,6 +91,11 @@ class Adjust {
return idfa;
}

static Future<String?> getIdfv() async {
final String? idfv = await _channel.invokeMethod('getIdfv');
return idfv;
}

static Future<String?> getAmazonAdId() async {
final String? amazonAdId = await _channel.invokeMethod('getAmazonAdId');
return amazonAdId;
Expand Down
14 changes: 14 additions & 0 deletions lib/adjust_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class AdjustConfig {
static const String UrlStrategyIndia = 'india';
static const String UrlStrategyChina = 'china';
static const String UrlStrategyCn = 'cn';
static const String UrlStrategyCnOnly = 'cn-only';

static const String DataResidencyEU = 'data-residency-eu';
static const String DataResidencyTR = 'data-residency-tr';
Expand All @@ -56,6 +57,8 @@ class AdjustConfig {
static const String AdRevenueSourceUnity = 'unity_sdk';
static const String AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk';
static const String AdRevenueSourcePublisher = 'publisher_sdk';
static const String AdRevenueSourceTopOn = 'topon_sdk';
static const String AdRevenueSourceAdx = 'adx_sdk';

String _appToken;
AdjustEnvironment _environment;
Expand All @@ -82,13 +85,15 @@ class AdjustConfig {
bool? coppaCompliantEnabled;
bool? linkMeEnabled;
bool? finalAndroidAttributionEnabled;
bool? readDeviceInfoOnceEnabled;
String? sdkPrefix;
String? userAgent;
String? defaultTracker;
String? externalDeviceId;
String? urlStrategy;
String? processName;
String? preinstallFilePath;
String? fbAppId;
AdjustLogLevel? logLevel;
AttributionCallback? attributionCallback;
SessionSuccessCallback? sessionSuccessCallback;
Expand Down Expand Up @@ -219,6 +224,12 @@ class AdjustConfig {
if (externalDeviceId != null) {
configMap['externalDeviceId'] = externalDeviceId;
}
if (preinstallFilePath != null) {
configMap['preinstallFilePath'] = preinstallFilePath;
}
if (fbAppId != null) {
configMap['fbAppId'] = fbAppId;
}
if (urlStrategy != null) {
configMap['urlStrategy'] = urlStrategy;
}
Expand Down Expand Up @@ -247,6 +258,9 @@ class AdjustConfig {
if (finalAndroidAttributionEnabled != null) {
configMap['finalAndroidAttributionEnabled'] = finalAndroidAttributionEnabled.toString();
}
if (readDeviceInfoOnceEnabled != null) {
configMap['readDeviceInfoOnceEnabled'] = readDeviceInfoOnceEnabled.toString();
}
if (linkMeEnabled != null) {
configMap['linkMeEnabled'] = linkMeEnabled.toString();
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: adjust_sdk
description: This is the Flutter SDK of Adjust™. You can read more about Adjust™ at adjust.com.
homepage: https://github.com/adjust/flutter_sdk
version: 4.35.2
version: 4.36.0

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion test/ios/test_lib.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'test_lib'
s.version = '4.35.2'
s.version = '4.36.0'
s.summary = 'Adjust test library for iOS platform'
s.description = <<-DESC
Adjust test library for iOS platform.
Expand Down
2 changes: 1 addition & 1 deletion test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: test_lib
description: Flutter plugin for Adjust Testing Library. Intended exclusively for internal use.
version: 4.35.2
version: 4.36.0
author: Adjust (sdk@adjust.com)

environment:
Expand Down

0 comments on commit a904d53

Please sign in to comment.