Skip to content

Commit

Permalink
1.6.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Korney committed Mar 13, 2024
1 parent 4d00433 commit 36e22ec
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 42 deletions.
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Package | Version |
|--------------------------|:--------------------------------------------------------:|
| `affise_attribution_lib` | [`1.6.12`](https://github.com/affise/sdk-react/releases) |
| `affise_attribution_lib` | [`1.6.13`](https://github.com/affise/sdk-react/releases) |

- [Affise Attribution Flutter Library](#affise-attribution-flutter-library)
- [Description](#description)
Expand Down Expand Up @@ -48,6 +48,7 @@
- [Get random user Id](#get-random-user-id)
- [Get random device Id](#get-random-device-id)
- [Get providers](#get-providers)
- [Is first run](#is-first-run)
- [Get referrer](#get-referrer)
- [Get referrer value](#get-referrer-value)
- [Referrer keys](#referrer-keys)
Expand Down Expand Up @@ -114,10 +115,10 @@ Example [`example/android/app/build.gradle`](example/android/app/build.gradle)
```gradle
dependencies {
// Affise modules
implementation 'com.affise:module-advertising:1.6.23'
implementation 'com.affise:module-network:1.6.23'
implementation 'com.affise:module-phone:1.6.23'
implementation 'com.affise:module-status:1.6.23'
implementation 'com.affise:module-advertising:1.6.26'
implementation 'com.affise:module-network:1.6.26'
implementation 'com.affise:module-phone:1.6.26'
implementation 'com.affise:module-status:1.6.26'
}
```

Expand All @@ -127,8 +128,8 @@ Add modules to iOS project

| Module | Version | Start |
|---------------|:------------------------------------------------------------------------------------:|----------|
| `ADVERTISING` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `STATUS` | [`1.6.25`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |
| `ADVERTISING` | [`1.6.27`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Manual` |
| `STATUS` | [`1.6.27`](https://github.com/CocoaPods/Specs/tree/master/Specs/0/3/d/AffiseModule/) | `Auto` |

Example [example/ios/Podfile](example/ios/Podfile)

Expand All @@ -137,8 +138,8 @@ target 'Runner' do
# ...

# Affise Modules
pod 'AffiseModule/Advertising', `1.6.25`
pod 'AffiseModule/Status', `1.6.25`
pod 'AffiseModule/Advertising', `1.6.27`
pod 'AffiseModule/Status', `1.6.27`
end
```

Expand Down Expand Up @@ -839,6 +840,13 @@ Affise.getProviders().then((providers) {
});
```

## Is first run
```dart
Affise.isFirstRun().then((isFirstRun) {
// handle
});
```

## Get referrer

Use the next public method of SDK
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ android {

dependencies {
implementation "com.android.installreferrer:installreferrer:2.2"
implementation "com.affise:internal:1.6.23"
implementation "com.affise:internal:1.6.26"
}
8 changes: 4 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// Affise modules
implementation 'com.affise:module-advertising:1.6.23'
implementation 'com.affise:module-network:1.6.23'
implementation 'com.affise:module-phone:1.6.23'
implementation "com.affise:module-status:1.6.23"
implementation 'com.affise:module-advertising:1.6.26'
implementation 'com.affise:module-network:1.6.26'
implementation 'com.affise:module-phone:1.6.26'
implementation "com.affise:module-status:1.6.26"
}
4 changes: 2 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

# Affise modules
pod 'AffiseModule/Advertising', '1.6.25'
pod 'AffiseModule/Status', '1.6.25'
pod 'AffiseModule/Advertising', '1.6.27'
pod 'AffiseModule/Status', '1.6.27'
end

post_install do |installer|
Expand Down
48 changes: 24 additions & 24 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ packages:
path: ".."
relative: true
source: path
version: "1.6.12"
version: "1.6.13"
async:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
sha256: "271b8899fc99f9df4f4ed419fa14e2fff392c7b2c162fbb87b222e2e963ddc73"
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.9.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
sha256: "5bbf32bc9e518d41ec49718e2931cd4527292c9b0c6d2dffcf7fe6b9a8a8cf72"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.2.1"
clock:
dependency: transitive
description:
Expand All @@ -44,10 +44,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: ef7e3a5529178ce8f37a9d0b11cbbc8b1e025940f9cf9f76c42da6796301219d
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.16.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -94,10 +94,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: a5e201311cb08bf3912ebbe9a2be096e182d703f881136ec1e81a2338a9e120d
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.6.4"
lints:
dependency: transitive
description:
Expand All @@ -110,10 +110,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "80c2989398773fa06e2457e9ff08580f24e9858b28462a722241cb53e5613478"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.12"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -126,18 +126,18 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.8.0"
path:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.8.2"
plugin_platform_interface:
dependency: transitive
description:
Expand All @@ -163,10 +163,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: f8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
Expand All @@ -179,10 +179,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "862015c5db1f3f3c4ea3b94dc2490363a84262994b88902315ed74be1155612f"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.1.1"
term_glyph:
dependency: transitive
description:
Expand All @@ -195,10 +195,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: ceeddf59d613e862e77f4b506cfc2945ac9637ce0b4c00f4f4c1ac639f3e9731
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.4.14"
vector_math:
dependency: transitive
description:
Expand All @@ -208,5 +208,5 @@ packages:
source: hosted
version: "2.1.4"
sdks:
dart: ">=3.0.0-0 <4.0.0"
dart: ">=2.18.0 <4.0.0"
flutter: ">=2.5.0"
2 changes: 1 addition & 1 deletion ios/affise_attribution_lib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Affise Attribution Flutter plugin.
s.swift_version = '5.0'

s.dependency 'Flutter'
s.dependency 'AffiseInternal', '1.6.25'
s.dependency 'AffiseInternal', '1.6.27'

end
13 changes: 13 additions & 0 deletions lib/affise.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ class Affise {
return completer.future;
}

/// Is it first run
static Future<bool> isFirstRun() async {
var completer = Completer<bool>();
SchedulerBinding.instance.addPostFrameCallback((_) {
_native.isFirstRun().then((value) {
completer.complete(value);
}).catchError((error) {
completer.completeError(error);
});
});
return completer.future;
}

/// Get referrer
static void getReferrer(ReferrerCallback callback) {
SchedulerBinding.instance.addPostFrameCallback((_) {
Expand Down
3 changes: 3 additions & 0 deletions lib/native/affise_api_method.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum AffiseApiMethod {
GET_PROVIDERS,
MODULE_START,
GET_MODULES_INSTALLED,
IS_FIRST_RUN,

// callbacks
GET_REFERRER_CALLBACK,
Expand Down Expand Up @@ -91,6 +92,8 @@ extension AffiseApiMethodExt on AffiseApiMethod {
return "module_start";
case AffiseApiMethod.GET_MODULES_INSTALLED:
return "get_modules_installed";
case AffiseApiMethod.IS_FIRST_RUN:
return "is_first_run";
case AffiseApiMethod.GET_REFERRER_CALLBACK:
return "get_referrer_callback";
case AffiseApiMethod.GET_REFERRER_VALUE_CALLBACK:
Expand Down
4 changes: 4 additions & 0 deletions lib/native/affise_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ class AffiseNative extends NativeBase {
return result;
}

Future<bool> isFirstRun() async {
return await native(AffiseApiMethod.IS_FIRST_RUN);
}

Future<String> getRandomUserId() async {
return await native(AffiseApiMethod.GET_RANDOM_USER_ID);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: affise_attribution_lib
description: Affise Attribution Flutter plugin.
version: 1.6.12
version: 1.6.13
homepage: https://affise.com/

environment:
Expand Down

0 comments on commit 36e22ec

Please sign in to comment.