Skip to content

Version 4.38.0 #129

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

Merged
merged 3 commits into from
Mar 28, 2024
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
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### Version 4.38.0 (28th March 2024)
#### Added
- Added iOS Privacy Manifest for the Adjust SDK.
- Added new domains and corresponding payload restrictions for the Adjust SDK to direct the iOS traffic to:
- https://consent.adjust.com - for consented users
- https://analytics.adjust.com - for non-consented users

#### Native SDKs
- [iOS@v4.38.0][ios_sdk_v4.38.0]
- [Android@v4.38.3][android_sdk_v4.38.3]

---

### Version 4.37.1 (21st February 2024)
#### Added
- Added support for `TradPlus` ad revenue tracking.
Expand Down Expand Up @@ -412,6 +425,7 @@
[ios_sdk_v4.36.0]: https://github.com/adjust/ios_sdk/tree/v4.36.0
[ios_sdk_v4.37.0]: https://github.com/adjust/ios_sdk/tree/v4.37.0
[ios_sdk_v4.37.1]: https://github.com/adjust/ios_sdk/tree/v4.37.1
[ios_sdk_v4.38.0]: https://github.com/adjust/ios_sdk/tree/v4.38.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 @@ -433,4 +447,5 @@
[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
[android_sdk_v4.38.0]: https://github.com/adjust/android_sdk/tree/v4.38.0
[android_sdk_v4.38.1]: https://github.com/adjust/android_sdk/tree/v4.38.1
[android_sdk_v4.38.1]: https://github.com/adjust/android_sdk/tree/v4.38.1
[android_sdk_v4.38.3]: https://github.com/adjust/android_sdk/tree/v4.38.3
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.37.1
adjust_sdk: ^4.38.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.37.1
4.38.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.38.1'
api 'com.adjust.sdk:adjust-android:4.38.3'
}
26 changes: 11 additions & 15 deletions ios/Classes/AdjustSdk.m
Original file line number Diff line number Diff line change
Expand Up @@ -829,10 +829,7 @@ - (void)processDeeplink:(FlutterMethodCall *)call withResult:(FlutterResult)resu

- (void)setTestOptions:(FlutterMethodCall *)call withResult:(FlutterResult)result {
AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init];
NSString *baseUrl = call.arguments[@"baseUrl"];
NSString *gdprUrl = call.arguments[@"gdprUrl"];
NSString *subscriptionUrl = call.arguments[@"subscriptionUrl"];
NSString *purchaseVerificationUrl = call.arguments[@"purchaseVerificationUrl"];
NSString *overwriteUrl = call.arguments[@"urlOverwrite"];
NSString *extraPath = call.arguments[@"extraPath"];
NSString *timerIntervalInMilliseconds = call.arguments[@"timerIntervalInMilliseconds"];
NSString *timerStartInMilliseconds = call.arguments[@"timerStartInMilliseconds"];
Expand All @@ -842,18 +839,11 @@ - (void)setTestOptions:(FlutterMethodCall *)call withResult:(FlutterResult)resul
NSString *deleteState = call.arguments[@"deleteState"];
NSString *noBackoffWait = call.arguments[@"noBackoffWait"];
NSString *adServicesFrameworkEnabled = call.arguments[@"adServicesFrameworkEnabled"];
NSString *attStatus = call.arguments[@"attStatus"];
NSString *idfa = call.arguments[@"idfa"];

if ([self isFieldValid:baseUrl]) {
testOptions.baseUrl = baseUrl;
}
if ([self isFieldValid:gdprUrl]) {
testOptions.gdprUrl = gdprUrl;
}
if ([self isFieldValid:subscriptionUrl]) {
testOptions.subscriptionUrl = subscriptionUrl;
}
if ([self isFieldValid:purchaseVerificationUrl]) {
testOptions.purchaseVerificationUrl = purchaseVerificationUrl;
if ([self isFieldValid:overwriteUrl]) {
testOptions.urlOverwrite = overwriteUrl;
}
if ([self isFieldValid:extraPath]) {
testOptions.extraPath = extraPath;
Expand Down Expand Up @@ -885,6 +875,12 @@ - (void)setTestOptions:(FlutterMethodCall *)call withResult:(FlutterResult)resul
if ([self isFieldValid:adServicesFrameworkEnabled]) {
testOptions.adServicesFrameworkEnabled = [adServicesFrameworkEnabled boolValue];
}
if ([self isFieldValid:attStatus]) {
testOptions.attStatusInt = [NSNumber numberWithInt:[attStatus intValue]];
}
if ([self isFieldValid:idfa]) {
testOptions.idfa = idfa;
}

[Adjust setTestOptions:testOptions];
}
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.37.1'
s.version = '4.38.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.37.1'
s.dependency 'Adjust', '4.38.0'
end
2 changes: 1 addition & 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.37.1';
static const String _sdkPrefix = 'flutter4.38.0';
static const MethodChannel _channel =
const MethodChannel('com.adjust.sdk/api');

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.37.1
version: 4.38.0

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion test/app/lib/command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Adjust SDK
//
// Created by Srdjan Tubin (@2beens) on 25th April 2018.
// Copyright (c) 2018-2021 Adjust GmbH. All rights reserved.
// Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
//

import 'dart:convert';
Expand Down
60 changes: 36 additions & 24 deletions test/app/lib/command_executor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Adjust SDK
//
// Created by Srdjan Tubin (@2beens) on 25th April 2018.
// Copyright (c) 2018-2021 Adjust GmbH. All rights reserved.
// Copyright (c) 2018-Present Adjust GmbH. All rights reserved.
//

import 'dart:io' show Platform;
Expand Down Expand Up @@ -35,20 +35,18 @@ class CommandExecutor {
String? _subscriptionPath;
String? _purchaseVerificationUrl;
String? _purchaseVerificationPath;
String? _overwriteUrl;
String? _extraPath;
late Command _command;
Map<int, AdjustEvent?> _savedEvents = new Map<int, AdjustEvent?>();
Map<int, AdjustConfig?> _savedConfigs = new Map<int, AdjustConfig?>();

CommandExecutor(
String? baseUrl,
String? gdprUrl,
String? subscriptionUrl,
String? purchaseVerificationUrl) {
_baseUrl = baseUrl;
_gdprUrl = gdprUrl;
_subscriptionUrl = subscriptionUrl;
_purchaseVerificationUrl = purchaseVerificationUrl;
CommandExecutor(String? overwriteUrl) {
_baseUrl = overwriteUrl;
_gdprUrl = overwriteUrl;
_subscriptionUrl = overwriteUrl;
_purchaseVerificationUrl = overwriteUrl;
_overwriteUrl = overwriteUrl;
}

void executeCommand(Command command) {
Expand Down Expand Up @@ -149,10 +147,11 @@ class CommandExecutor {

void _testOptions() {
final dynamic testOptions = {};
testOptions['baseUrl'] = _baseUrl;
testOptions['gdprUrl'] = _gdprUrl;
testOptions['subscriptionUrl'] = _subscriptionUrl;
testOptions['purchaseVerificationUrl'] = _purchaseVerificationUrl;
testOptions['baseUrl'] = _overwriteUrl;
testOptions['gdprUrl'] = _overwriteUrl;
testOptions['subscriptionUrl'] = _overwriteUrl;
testOptions['purchaseVerificationUrl'] = _overwriteUrl;
testOptions['urlOverwrite'] = _overwriteUrl;
if (_command.containsParameter('basePath')) {
_basePath = _command.getFirstParameterValue('basePath');
_gdprPath = _command.getFirstParameterValue('basePath');
Expand Down Expand Up @@ -188,16 +187,24 @@ class CommandExecutor {
testOptions['adServicesFrameworkEnabled'] =
_command.getFirstParameterValue('adServicesFrameworkEnabled');
}
if (_command.containsParameter('attStatus')) {
testOptions['attStatus'] =
_command.getFirstParameterValue('attStatus');
}
if (_command.containsParameter('idfa')) {
testOptions['idfa'] =
_command.getFirstParameterValue('idfa');
}
bool useTestConnectionOptions = false;
if (_command.containsParameter('teardown')) {
List<dynamic> teardownOptions = _command.getParamteters('teardown')!;
for (String teardownOption in teardownOptions) {
if (teardownOption == 'resetSdk') {
testOptions['teardown'] = 'true';
testOptions['basePath'] = _basePath;
testOptions['gdprPath'] = _gdprPath;
testOptions['subscriptionPath'] = _subscriptionPath;
testOptions['purchaseVerificationPath'] = _purchaseVerificationPath;
testOptions['basePath'] = _extraPath;
testOptions['gdprPath'] = _extraPath;
testOptions['subscriptionPath'] = _extraPath;
testOptions['purchaseVerificationPath'] = _extraPath;
testOptions['extraPath'] = _extraPath;
// Android specific
testOptions['useTestConnectionOptions'] = 'true';
Expand Down Expand Up @@ -376,6 +383,11 @@ class CommandExecutor {
adjustConfig!.userAgent = _command.getFirstParameterValue('userAgent');
}

if (_command.containsParameter('attConsentWaitingSeconds')) {
adjustConfig!.attConsentWaitingInterval =
double.parse(_command.getFirstParameterValue('attConsentWaitingSeconds')!);
}

// First clear all previous callback handlers.
adjustConfig!.attributionCallback = null;
adjustConfig.sessionSuccessCallback = null;
Expand All @@ -387,7 +399,7 @@ class CommandExecutor {
// TODO: Deeplinking in Flutter example.
// https://github.com/flutter/flutter/issues/8711#issuecomment-304681212
if (_command.containsParameter('deferredDeeplinkCallback')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.launchDeferredDeeplink =
_command.getFirstParameterValue('deferredDeeplinkCallback') == 'true';
print(
Expand All @@ -400,7 +412,7 @@ class CommandExecutor {
}

if (_command.containsParameter('attributionCallbackSendAll')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.attributionCallback = (AdjustAttribution attribution) {
print('[CommandExecutor]: Attribution Callback: $attribution');
TestLib.addInfoToSend('trackerToken', attribution.trackerToken);
Expand All @@ -420,7 +432,7 @@ class CommandExecutor {
}

if (_command.containsParameter('sessionCallbackSendSuccess')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.sessionSuccessCallback =
(AdjustSessionSuccess sessionSuccessResponseData) {
print(
Expand All @@ -438,7 +450,7 @@ class CommandExecutor {
}

if (_command.containsParameter('sessionCallbackSendFailure')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.sessionFailureCallback =
(AdjustSessionFailure sessionFailureResponseData) {
print(
Expand All @@ -458,7 +470,7 @@ class CommandExecutor {
}

if (_command.containsParameter('eventCallbackSendSuccess')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.eventSuccessCallback =
(AdjustEventSuccess eventSuccessResponseData) {
print(
Expand All @@ -479,7 +491,7 @@ class CommandExecutor {
}

if (_command.containsParameter('eventCallbackSendFailure')) {
String? localBasePath = _basePath;
String? localBasePath = _extraPath;
adjustConfig.eventFailureCallback =
(AdjustEventFailure eventFailureResponseData) {
print(
Expand Down
21 changes: 6 additions & 15 deletions test/app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,30 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
String? _baseUrl;
String? _gdprUrl;
String? _subscriptionUrl;
String? _purchaseVerificationUrl;
String? _overwriteUrl;
late String _controlUrl;
late CommandExecutor _commandExecutor;

@override
void initState() {
super.initState();

String _address = '192.168.86.21';
String _address = '192.168.86.53';
if (Platform.isAndroid) {
String _protocol = 'https';
String _port = '8443';
_baseUrl = _protocol + '://' + _address + ':' + _port;
_gdprUrl = _protocol + '://' + _address + ':' + _port;
_subscriptionUrl = _protocol + '://' + _address + ':' + _port;
_purchaseVerificationUrl = _protocol + '://' + _address + ':' + _port;
_overwriteUrl = _protocol + '://' + _address + ':' + _port;
_controlUrl = 'ws://' + _address + ':1987';
} else {
String _protocol = 'http';
String _port = '8080';
_baseUrl = _protocol + '://' + _address + ':' + _port;
_gdprUrl = _protocol + '://' + _address + ':' + _port;
_subscriptionUrl = _protocol + '://' + _address + ':' + _port;
_purchaseVerificationUrl = _protocol + '://' + _address + ':' + _port;
_overwriteUrl = _protocol + '://' + _address + ':' + _port;
_controlUrl = 'ws://' + _address + ':1987';
}

// Initialise command executor.
_commandExecutor =
new CommandExecutor(_baseUrl, _gdprUrl, _subscriptionUrl, _purchaseVerificationUrl);
new CommandExecutor(_overwriteUrl);

// Initialise test library.
TestLib.setExecuteCommandHalder((final dynamic callArgs) {
Expand All @@ -59,7 +50,7 @@ class _MyAppState extends State<MyApp> {
'[AdjustTestApp]: Executing command ${command.className}.${command.methodName}');
_commandExecutor.executeCommand(command);
});
TestLib.init(_baseUrl!, _controlUrl);
TestLib.init(_overwriteUrl!, _controlUrl);
}

@override
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.37.1'
s.version = '4.38.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.37.1
version: 4.38.0
author: Adjust (sdk@adjust.com)

environment:
Expand Down