Skip to content

Commit 499f4b1

Browse files
authored
Merge pull request #84 from adjust/v4300
Version 4.30.0
2 parents e02249c + a133d7c commit 499f4b1

File tree

17 files changed

+197
-78
lines changed

17 files changed

+197
-78
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### Version 4.30.0 (9th June 2022)
2+
#### Added
3+
- Added ability to mark your app as COPPA compliant. You can enable this setting by setting `coppaCompliantEnabled` member of `AdjustConfig` instance to `true`.
4+
- 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 setting `playStoreKidsAppEnabled` member of `AdjustConfig` instance to `true`.
5+
- 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.
6+
- Added support for Generic ad revenue tracking.
7+
8+
#### Changed
9+
- Reverted `compileSdkVersion` from `32` to `31` (https://github.com/adjust/flutter_sdk/pull/77).
10+
- Changed responses which is being returned when iOS specific API is being called on Android platform (https://github.com/adjust/flutter_sdk/issues/79 and https://github.com/adjust/flutter_sdk/issues/80).
11+
12+
#### Native SDKs
13+
- [[email protected]][ios_sdk_v4.30.0]
14+
- [[email protected]][android_sdk_v4.30.1]
15+
16+
---
17+
118
### Version 4.29.2 (18th February 2022)
219
#### Added
320
- Added support for `Unity` ad revenue tracking.
@@ -256,6 +273,7 @@
256273
[ios_sdk_v4.29.2]: https://github.com/adjust/ios_sdk/tree/v4.29.2
257274
[ios_sdk_v4.29.6]: https://github.com/adjust/ios_sdk/tree/v4.29.6
258275
[ios_sdk_v4.29.7]: https://github.com/adjust/ios_sdk/tree/v4.29.7
276+
[ios_sdk_v4.30.0]: https://github.com/adjust/ios_sdk/tree/v4.30.0
259277

260278
[android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0
261279
[android_sdk_v4.18.0]: https://github.com/adjust/android_sdk/tree/v4.18.0
@@ -267,4 +285,4 @@
267285
[android_sdk_v4.27.0]: https://github.com/adjust/android_sdk/tree/v4.27.0
268286
[android_sdk_v4.28.1]: https://github.com/adjust/android_sdk/tree/v4.28.1
269287
[android_sdk_v4.28.5]: https://github.com/adjust/android_sdk/tree/v4.28.5
270-
[android_sdk_v4.29.1]: https://github.com/adjust/android_sdk/tree/v4.29.1
288+
[android_sdk_v4.30.1]: https://github.com/adjust/android_sdk/tree/v4.30.1

README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ This is the Flutter SDK of Adjust™. You can read more about Adjust™ at [adju
5656
* [AppTrackingTransparency framework](#af-att-framework)
5757
* [App-tracking authorisation wrapper](#af-ata-wrapper)
5858
* [Get current authorisation status](#af-ata-getter)
59+
* [Check for ATT status change](#af-att-status-change)
5960
* [SKAdNetwork framework](#af-skadn-framework)
6061
* [Update SKAdNetwork conversion value](#af-skadn-update-conversion-value)
6162
* [Conversion value updated callback](#af-skadn-cv-updated-callback)
@@ -81,6 +82,8 @@ This is the Flutter SDK of Adjust™. You can read more about Adjust™ at [adju
8182
* [Enable third-party sharing](#af-enable-third-party-sharing)
8283
* [Measurement consent](#af-measurement-consent)
8384
* [Data residency](#af-data-residency)
85+
* [COPPA compliance](#af-coppa-compliance)
86+
* [Play Store Kids Apps](#af-play-store-kids-apps)
8487

8588
### License
8689

@@ -101,7 +104,7 @@ You can add Adjust SDK to your Flutter app by adding following to your `pubspec.
101104

102105
```yaml
103106
dependencies:
104-
adjust_sdk: ^4.29.2
107+
adjust_sdk: ^4.30.0
105108
```
106109
107110
Then navigate to your project in the terminal and run:
@@ -131,12 +134,6 @@ Please add the following permissions, which the Adjust SDK needs, if they are no
131134
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
132135
```
133136

134-
If you are **not targeting the Google Play Store**, please also add the following permission:
135-
136-
```xml
137-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
138-
```
139-
140137
#### <a id="gps-adid-permission"></a>Add permission to gather Google advertising ID
141138

142139
If you are targeting Android 12 and above (API level 31), you need to add the `com.google.android.gms.AD_ID` permission to read the device's advertising ID. Add the following line to your `AndroidManifest.xml` to enable the permission.
@@ -183,7 +180,7 @@ In order to correctly attribute an install of your app to its source, Adjust nee
183180
In order to support this in your app, please make sure to add following dependency to your app's `build.gradle` file for Android platform:
184181

185182
```
186-
implementation 'com.android.installreferrer:installreferrer:1.0'
183+
implementation 'com.android.installreferrer:installreferrer:2.2'
187184
```
188185

189186
Also, make sure that you have paid attention to the [Proguard settings](#qs-proguard) chapter and that you have added all the rules mentioned in it, especially the one needed for this feature:
@@ -222,7 +219,6 @@ Make sure that following iOS frameworks are linked with your iOS app:
222219
* `iAd.framework` - in case you are running iAd campaigns
223220
* `AdServices.framework` - in case you are running iAd campaigns
224221
* `AdSupport.framework` - for reading iOS Advertising Id (IDFA)
225-
* `CoreTelephony.framework` - for reading MCC and MNC information
226222
* `StoreKit.framework` - for communication with SKAdNetwork framework
227223
* `AppTrackingTransparency.framework` - to ask for user's consent to be tracked and obtain status of that consent
228224

@@ -703,6 +699,16 @@ To get the current app tracking authorization status you can call `getAppTrackin
703699
* `3`: The user authorized access to IDFA
704700
* `-1`: The status is not available
705701

702+
### <a id="att-status-change"></a>Check for ATT status change
703+
704+
**Note**: This feature exists only in iOS platform.
705+
706+
In cases where you are not using [Adjust app-tracking authorization wrapper](#af-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:
707+
708+
```dart
709+
Adjust.checkForNewAttStatus();
710+
```
711+
706712
### <a id="af-skadn-framework"></a>SKAdNetwork framework
707713

708714
**Note**: This feature exists only in iOS platform.
@@ -1233,6 +1239,26 @@ adjustConfig.urlStrategy = AdjustConfig.DataResidencyTR; // for Turkey data resi
12331239
adjustConfig.urlStrategy = AdjustConfig.DataResidencyUS; // for US data residency region
12341240
```
12351241

1242+
### <a id="af-coppa-compliance"></a>COPPA compliance
1243+
1244+
By default Adjust SDK doesn't mark app as COPPA compliant. In order to mark your app as COPPA compliant, make sure to set `coppaCompliantEnabled` member of `AdjustConfig` instance to `true`:
1245+
1246+
```dart
1247+
adjustConfig.coppaCompliantEnabled = true;
1248+
```
1249+
1250+
**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.
1251+
1252+
### <a id="af-play-store-kids-apps"></a>Play Store Kids Apps
1253+
1254+
**Note**: This feature exists only in Android platform.
1255+
1256+
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 set `playStoreKidsAppEnabled` member of `AdjustConfig` instance to `true`:
1257+
1258+
```dart
1259+
adjustConfig.playStoreKidsAppEnabled = true;
1260+
```
1261+
12361262
[dashboard]: https://adjust.com
12371263
[adjust.com]: https://adjust.com
12381264

@@ -1256,7 +1282,7 @@ adjustConfig.urlStrategy = AdjustConfig.DataResidencyUS; // for US data residenc
12561282

12571283
The Adjust SDK is licensed under the MIT License.
12581284

1259-
Copyright (c) 2018-2021 Adjust GmbH, https://www.adjust.com
1285+
Copyright (c) 2018-Present Adjust GmbH, https://www.adjust.com
12601286

12611287
Permission is hereby granted, free of charge, to any person obtaining a copy of
12621288
this software and associated documentation files (the "Software"), to deal in

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.29.2
1+
4.30.0

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ rootProject.allprojects {
2424
}
2525
apply plugin: 'com.android.library'
2626
android {
27-
compileSdkVersion 32
27+
compileSdkVersion 31
2828

2929
defaultConfig {
3030
minSdkVersion 16
@@ -36,5 +36,5 @@ android {
3636
}
3737

3838
dependencies {
39-
api 'com.adjust.sdk:adjust-android:4.29.1'
39+
api 'com.adjust.sdk:adjust-android:4.30.1'
4040
}

android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ public void onMethodCall(MethodCall call, final Result result) {
195195
case "trackMeasurementConsent":
196196
trackMeasurementConsent(call, result);
197197
break;
198+
case "checkForNewAttStatus":
199+
checkForNewAttStatus(call, result);
200+
break;
198201
case "setTestOptions":
199202
setTestOptions(call, result);
200203
break;
@@ -276,11 +279,25 @@ private void start(final MethodCall call, final Result result) {
276279

277280
// Event buffering.
278281
if (configMap.containsKey("eventBufferingEnabled")) {
279-
String eventBufferingEnabledString = (String) configMap.get("eventBufferingEnabled");
280-
boolean eventBufferingEnabled = Boolean.parseBoolean(eventBufferingEnabledString);
282+
String strEventBufferingEnabled = (String) configMap.get("eventBufferingEnabled");
283+
boolean eventBufferingEnabled = Boolean.parseBoolean(strEventBufferingEnabled);
281284
adjustConfig.setEventBufferingEnabled(eventBufferingEnabled);
282285
}
283286

287+
// COPPA compliance.
288+
if (configMap.containsKey("coppaCompliantEnabled")) {
289+
String strCoppaCompliantEnabled = (String) configMap.get("coppaCompliantEnabled");
290+
boolean coppaCompliantEnabled = Boolean.parseBoolean(strCoppaCompliantEnabled);
291+
adjustConfig.setCoppaCompliantEnabled(coppaCompliantEnabled);
292+
}
293+
294+
// Google Play Store kids apps.
295+
if (configMap.containsKey("playStoreKidsAppEnabled")) {
296+
String strPlayStoreKidsAppEnabled = (String) configMap.get("playStoreKidsAppEnabled");
297+
boolean playStoreKidsAppEnabled = Boolean.parseBoolean(strPlayStoreKidsAppEnabled);
298+
adjustConfig.setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled);
299+
}
300+
284301
// Main process name.
285302
if (configMap.containsKey("processName")) {
286303
String processName = (String) configMap.get("processName");
@@ -682,8 +699,7 @@ private void getAdid(final Result result) {
682699
}
683700

684701
private void getIdfa(final Result result) {
685-
result.notImplemented();
686-
// result.error("0", "Error. No IDFA for Android platform!", null);
702+
result.success("Error. No IDFA on Android platform!");
687703
}
688704

689705
private void getGoogleAdId(final Result result) {
@@ -902,8 +918,7 @@ private void trackAdRevenueNew(final MethodCall call, final Result result) {
902918
}
903919

904920
private void trackAppStoreSubscription(final Result result) {
905-
result.notImplemented();
906-
// result.error("0", "Error. No App Store subscription tracking for Android platform!", null);
921+
result.success("Error. No App Store subscription tracking on Android platform!");
907922
}
908923

909924
private void trackPlayStoreSubscription(final MethodCall call, final Result result) {
@@ -1005,13 +1020,11 @@ private void trackPlayStoreSubscription(final MethodCall call, final Result resu
10051020
}
10061021

10071022
private void requestTrackingAuthorizationWithCompletionHandler(final Result result) {
1008-
result.notImplemented();
1009-
// result.error("0", "Error. No requestTrackingAuthorizationWithCompletionHandler for Android platform!", null);
1023+
result.success("Error. No requestTrackingAuthorizationWithCompletionHandler on Android platform!");
10101024
}
10111025

10121026
private void updateConversionValue(final Result result) {
1013-
result.notImplemented();
1014-
// result.error("0", "Error. No updateConversionValue for Android platform!", null);
1027+
result.success("Error. No updateConversionValue on Android platform!");
10151028
}
10161029

10171030
private void trackThirdPartySharing(final MethodCall call, final Result result) {
@@ -1057,6 +1070,10 @@ private void trackMeasurementConsent(final MethodCall call, final Result result)
10571070
result.success(null);
10581071
}
10591072

1073+
private void checkForNewAttStatus(final MethodCall call, final Result result) {
1074+
result.success("Error. No checkForNewAttStatus for Android platform!");
1075+
}
1076+
10601077
private void setTestOptions(final MethodCall call, final Result result) {
10611078
AdjustTestOptions testOptions = new AdjustTestOptions();
10621079
Map testOptionsMap = (Map) call.arguments;

example/lib/main.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ class _MyHomePageState extends State<MyHomePage> with WidgetsBindingObserver {
276276
}
277277
});
278278

279+
// COPPA compliance.
280+
// config.coppaCompliantEnabled = true;
281+
282+
// Google Play Store kids apps.
283+
// config.playStoreKidsAppEnabled = true;
284+
279285
// Start SDK.
280286
Adjust.start(config);
281287
}

ios/Classes/AdjustSdk.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
119119
result(@(isEnabled));
120120
} else if ([@"getAdid" isEqualToString:call.method]) {
121121
result([Adjust adid]);
122-
} else {
122+
} else if ([@"checkForNewAttStatus" isEqualToString:call.method]) {
123+
[Adjust checkForNewAttStatus];
124+
} else {
123125
result(FlutterMethodNotImplemented);
124126
}
125127
}
@@ -143,6 +145,7 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
143145
NSString *eventBufferingEnabled = call.arguments[@"eventBufferingEnabled"];
144146
NSString *sendInBackground = call.arguments[@"sendInBackground"];
145147
NSString *needsCost = call.arguments[@"needsCost"];
148+
NSString *coppaCompliantEnabled = call.arguments[@"coppaCompliantEnabled"];
146149
NSString *allowiAdInfoReading = call.arguments[@"allowiAdInfoReading"];
147150
NSString *allowAdServicesInfoReading = call.arguments[@"allowAdServicesInfoReading"];
148151
NSString *allowIdfaReading = call.arguments[@"allowIdfaReading"];
@@ -183,6 +186,11 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
183186
if ([self isFieldValid:eventBufferingEnabled]) {
184187
[adjustConfig setEventBufferingEnabled:[eventBufferingEnabled boolValue]];
185188
}
189+
190+
// COPPA compliance.
191+
if ([self isFieldValid:coppaCompliantEnabled]) {
192+
[adjustConfig setCoppaCompliantEnabled:[coppaCompliantEnabled boolValue]];
193+
}
186194

187195
// Default tracker.
188196
if ([self isFieldValid:defaultTracker]) {

ios/adjust_sdk.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
Pod::Spec.new do |s|
22
s.name = 'adjust_sdk'
3-
s.version = '4.29.2'
3+
s.version = '4.30.0'
44
s.summary = 'Adjust Flutter SDK for iOS platform'
55
s.description = <<-DESC
66
Adjust Flutter SDK for iOS platform.
77
DESC
88
s.homepage = 'http://www.adjust.com'
99
s.license = { :file => '../LICENSE' }
10-
s.author = { 'Adjust GmbH' => '[email protected]' }
10+
s.author = { 'Adjust' => '[email protected]' }
1111
s.source = { :path => '.' }
1212
s.source_files = 'Classes/**/*'
1313
s.public_header_files = 'Classes/**/*.h'
1414
s.ios.deployment_target = '8.0'
1515

1616
s.dependency 'Flutter'
17-
s.dependency 'Adjust', '4.29.7'
17+
s.dependency 'Adjust', '4.30.0'
1818
end

lib/adjust.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:flutter/services.dart';
1919
import 'package:meta/meta.dart';
2020

2121
class Adjust {
22-
static const String _sdkPrefix = 'flutter4.29.2';
22+
static const String _sdkPrefix = 'flutter4.30.0';
2323
static const MethodChannel _channel =
2424
const MethodChannel('com.adjust.sdk/api');
2525

@@ -180,6 +180,10 @@ class Adjust {
180180
'updateConversionValue', {'conversionValue': conversionValue});
181181
}
182182

183+
static void checkForNewAttStatus() {
184+
_channel.invokeMethod('checkForNewAttStatus');
185+
}
186+
183187
// For testing purposes only. Do not use in production.
184188
@visibleForTesting
185189
static void setTestOptions(final dynamic testOptions) {

lib/adjust_config.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'package:adjust_sdk/adjust_session_success.dart';
1414
import 'package:flutter/services.dart';
1515

1616
enum AdjustLogLevel { verbose, debug, info, warn, error, suppress }
17+
1718
enum AdjustEnvironment { production, sandbox }
1819

1920
typedef void AttributionCallback(AdjustAttribution attributionData);
@@ -50,6 +51,7 @@ class AdjustConfig {
5051
static const String AdRevenueSourceAdMostSource = 'admost_sdk';
5152
static const String AdRevenueSourceUnity = 'unity_sdk';
5253
static const String AdRevenueSourceHeliumChartboost = 'helium_chartboost_sdk';
54+
static const String AdRevenueSourcePublisher = 'publisher_sdk';
5355

5456
String _appToken;
5557
AdjustEnvironment _environment;
@@ -71,6 +73,8 @@ class AdjustConfig {
7173
bool? launchDeferredDeeplink;
7274
bool? needsCost;
7375
bool? preinstallTrackingEnabled;
76+
bool? playStoreKidsAppEnabled;
77+
bool? coppaCompliantEnabled;
7478
String? sdkPrefix;
7579
String? userAgent;
7680
String? defaultTracker;
@@ -213,6 +217,12 @@ class AdjustConfig {
213217
configMap['preinstallTrackingEnabled'] =
214218
preinstallTrackingEnabled.toString();
215219
}
220+
if (playStoreKidsAppEnabled != null) {
221+
configMap['playStoreKidsAppEnabled'] = playStoreKidsAppEnabled.toString();
222+
}
223+
if (coppaCompliantEnabled != null) {
224+
configMap['coppaCompliantEnabled'] = coppaCompliantEnabled.toString();
225+
}
216226
if (allowiAdInfoReading != null) {
217227
configMap['allowiAdInfoReading'] = allowiAdInfoReading.toString();
218228
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: adjust_sdk
22
description: This is the Flutter SDK of Adjust™. You can read more about Adjust™ at adjust.com.
33
homepage: https://github.com/adjust/flutter_sdk
4-
version: 4.29.2
4+
version: 4.30.0
55

66
environment:
77
sdk: ">=2.12.0 <3.0.0"

test/app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
97C146E61CF9000F007C117D /* Project object */ = {
176176
isa = PBXProject;
177177
attributes = {
178-
LastUpgradeCheck = 1240;
178+
LastUpgradeCheck = 1300;
179179
ORGANIZATIONNAME = "";
180180
TargetAttributes = {
181181
97C146ED1CF9000F007C117D = {

test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1240"
3+
LastUpgradeVersion = "1300"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)