diff --git a/.changeset/android-release-r8-rules.md b/.changeset/android-release-r8-rules.md deleted file mode 100644 index 695cbf4..0000000 --- a/.changeset/android-release-r8-rules.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"fingerprint_flutter": patch ---- - -Android: fix R8 release builds failing with "Missing class com.google.android.gms..." and crashing on startup with `IllegalAccessError` on AGP 9.1. diff --git a/.changeset/drop-jitpack-repo.md b/.changeset/drop-jitpack-repo.md deleted file mode 100644 index c63e080..0000000 --- a/.changeset/drop-jitpack-repo.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"fingerprint_flutter": patch ---- - -Android: the plugin no longer adds the `jitpack.io` repository to your Gradle project. If your app uses JitPack dependencies, declare the repository yourself. diff --git a/.changeset/native-background-queue.md b/.changeset/native-background-queue.md deleted file mode 100644 index 261e828..0000000 --- a/.changeset/native-background-queue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"fingerprint_flutter": patch ---- - -Android and iOS: create the native client and start `get` on a background thread, not the main thread. Creating the client at app startup no longer blocks the UI thread. diff --git a/.changeset/pre.json b/.changeset/pre.json index 63c8466..a678040 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,14 +1,10 @@ { - "mode": "pre", + "mode": "exit", "tag": "test", "initialVersions": { "fingerprint_flutter": "4.13.1" }, "changesets": [ - "android-release-r8-rules", - "drop-jitpack-repo", - "native-background-queue", - "v5-api-migration", - "validate-endpoints" + "v5-api-migration" ] } diff --git a/.changeset/v5-api-migration.md b/.changeset/v5-api-migration.md index 118821f..55f48b0 100644 --- a/.changeset/v5-api-migration.md +++ b/.changeset/v5-api-migration.md @@ -7,7 +7,7 @@ Migrated the SDK to Fingerprint API v4. This is a breaking change on every platf **Requirements** - Flutter 3.44.0 and Dart 3.12.0. -- Android 7.0 (API 24+). Native SDK 4.1.x. The plugin no longer applies the Kotlin Gradle plugin, so it builds under AGP 9. Apps on AGP 8 need Kotlin Gradle plugin 2.2.20 or newer. +- Android 7.0 (API 24+). Native SDK 4.1.x. The plugin no longer applies the Kotlin Gradle plugin, so it builds under AGP 9. Apps on AGP 8 need Kotlin Gradle plugin 2.2.20 or newer. The plugin no longer adds the `jitpack.io` repository. If your app uses JitPack dependencies, declare the repository yourself. - iOS 15 / tvOS 15, Xcode 16, Swift 6. Native SDK 4.1.x (`Fingerprint-iOS`). - Only native patch releases are picked up automatically. - Web uses the bundled `@fingerprint/agent` v4. There is no extra npm peer dependency. @@ -28,10 +28,12 @@ Migrated the SDK to Fingerprint API v4. This is a breaking change on every platf - `package:fingerprint_flutter/fingerprint_flutter.dart` is the only public import. `error.dart`, `result.dart`, and `region.dart` are gone. `pluginVersion` is renamed to `fingerprintFlutterVersion`. `Region.stringValue` is removed, use `Region.name`. - Static `FpjsProPlugin.initFpjs` / `getVisitorId` / `getVisitorData` are replaced by an instance `Fingerprint` client with `get({tags, linkedId, timeout})`. -- The constructor is synchronous and starts the client. Identification failures surface on `get`. On Android and iOS, the constructor throws `FlutterError` if the Flutter binding does not exist yet, so call `WidgetsFlutterBinding.ensureInitialized()` first, as with `initFpjs`. +- The constructor is synchronous and starts the client. Identification failures surface on `get`. On Android and iOS: + - The native client is created and `get` starts on a background thread, so creating the client at app startup does not block the UI thread. + - The constructor throws `FlutterError` if the Flutter binding does not exist yet, so call `WidgetsFlutterBinding.ensureInitialized()` first, as with `initFpjs`. - Timeouts are `Duration`. `endpoint` + `endpointFallbacks` become one `endpoints` list. Platform options nest under `android`, `ios`, and `web`. - `scriptUrlPattern`, `scriptUrlPatternFallbacks`, and `extendedResponseFormat` are removed. -- `tags` must be JSON-compatible (string keys, finite numbers, no typed lists). `get` throws `ArgumentError` right away for invalid `tags` or a `timeout` under 1 ms, before identifying. The constructor throws `ArgumentError` for an `android.locationTimeout` under 1 ms. +- `tags` must be JSON-compatible (string keys, finite numbers, no typed lists). `get` throws `ArgumentError` right away for invalid `tags` or a `timeout` under 1 ms, before identifying. The constructor throws `ArgumentError` for an `endpoints` entry that is not an `http` or `https` URL, or an `android.locationTimeout` under 1 ms. - Custom `endpoints` still get no automatic fallback on any platform, even though JS agent v4 adds one by default. List the [regional default URL](https://docs.fingerprint.com/docs/regions) last if you want it. - On Android and iOS, `region` still defaults to `Region.us`. Set it for EU and AP workspaces. @@ -84,7 +86,7 @@ Migrated the SDK to Fingerprint API v4. This is a breaking change on every platf - `FingerprintResult`: `eventId`, `visitorId?`, `suspectScore?`, `sealedResult?`, `cacheHit?` (web only). - `requestId` is now `eventId`. `confidence` / `confidenceScore` and the extended types (`ipLocation`, `firstSeenAt`, and the rest) are gone. -- `visitorId` is null when hidden ([Zero Trust](https://dev.fingerprint.com/docs/zero-trust-mode)). +- `visitorId` is null when hidden ([Zero Trust](https://docs.fingerprint.com/docs/zero-trust-mode)). **Errors** diff --git a/.changeset/validate-endpoints.md b/.changeset/validate-endpoints.md deleted file mode 100644 index 132c4b9..0000000 --- a/.changeset/validate-endpoints.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"fingerprint_flutter": patch ---- - -The `Fingerprint` constructor throws `ArgumentError` for an `endpoints` entry that is not an `http` or `https` URL. Before, it failed at `get`, differently on each platform. diff --git a/CHANGELOG.md b/CHANGELOG.md index df0636c..6f9e6e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,13 @@ ### Patch Changes - Android: fix R8 release builds failing with "Missing class com.google.android.gms..." and crashing on startup with `IllegalAccessError` on AGP 9.1. ([e656f7a](https://github.com/fingerprintjs/flutter/commit/e656f7a98bfcd8505cee24b5f1c88fa30399cdc8)) +- The `Fingerprint` constructor throws `ArgumentError` for an `endpoints` entry that is not an `http` or `https` URL. Before, it failed at `get`, differently on each platform. ([e51e064](https://github.com/fingerprintjs/flutter/commit/e51e064b6f4f030fcba95370deb0c09a947e3577)) ### Supported Native SDK Version Range - Fingerprint iOS SDK Version Range: **`>= 4.1.0 and < 4.2.0`** - Fingerprint Android SDK Version Range: **`>= 4.1.0 and < 4.2.0`** -* The `Fingerprint` constructor throws `ArgumentError` for an `endpoints` entry that is not an `http` or `https` URL. Before, it failed at `get`, differently on each platform. ([e51e064](https://github.com/fingerprintjs/flutter/commit/e51e064b6f4f030fcba95370deb0c09a947e3577)) - ## 5.0.0-test.0 ### Major Changes @@ -122,23 +121,23 @@ Caching is off unless you pass `web: WebOptions(cache: ...)`. - ````diff + ```diff - + - ``` ([f680434](https://github.com/fingerprintjs/flutter/commit/f680434344af66f78c86c3fad94651625097e255)) - ```` + ``` + + ([f680434](https://github.com/fingerprintjs/flutter/commit/f680434344af66f78c86c3fad94651625097e255)) ### Patch Changes - Android: the plugin no longer adds the `jitpack.io` repository to your Gradle project. If your app uses JitPack dependencies, declare the repository yourself. ([f680434](https://github.com/fingerprintjs/flutter/commit/f680434344af66f78c86c3fad94651625097e255)) +- Android and iOS: create the native client and start `get` on a background thread, not the main thread. Creating the client at app startup no longer blocks the UI thread. ([f680434](https://github.com/fingerprintjs/flutter/commit/f680434344af66f78c86c3fad94651625097e255)) ### Supported Native SDK Version Range - Fingerprint iOS SDK Version Range: **`>= 4.1.0 and < 4.2.0`** - Fingerprint Android SDK Version Range: **`>= 4.1.0 and < 4.2.0`** -* Android and iOS: create the native client and start `get` on a background thread, not the main thread. Creating the client at app startup no longer blocks the UI thread. ([f680434](https://github.com/fingerprintjs/flutter/commit/f680434344af66f78c86c3fad94651625097e255)) - ## 4.13.1 ### Patch Changes diff --git a/README.md b/README.md index ea4bd5b..d452fc4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ identification and device intelligence with industry-leading accuracy. Fingerprint Flutter SDK is an easy way to integrate Fingerprint into your Flutter application. The plugin allows you to call the underlying native Fingerprint agents (Android, iOS, and Web) and identify devices. -This package replaces `fpjs_pro_plugin`. If you are upgrading from 4.x, see the [5.0.0 changelog](https://github.com/fingerprintjs/flutter/blob/main/CHANGELOG.md#500). +> [!IMPORTANT] +> This package replaces `fpjs_pro_plugin`. Upgrading from 4.x? See the [5.0.0 release notes](https://github.com/fingerprintjs/flutter/blob/main/CHANGELOG.md#500) for the migration guide. ## Table of contents - [Fingerprint Flutter](#fingerprint-flutter) diff --git a/package.json b/package.json index 9995113..9c440ae 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@changesets/cli": "^2.30.0", - "@fingerprintjs/changesets-native-dependency-format": "^0.2.0" + "@fingerprintjs/changesets-native-dependency-format": "^0.2.1" }, "packageManager": "pnpm@11.10.0+sha512.0b7f8b98060031904c017e3a41eb187a16d40eeb829b95c4f8cb03681761fc4ab53dd219115b9b447f4dce1a05a214764461e7d3703392a9f32f9511ce8c86c8" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d96dcc4..d368ec8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^2.30.0 version: 2.31.0 '@fingerprintjs/changesets-native-dependency-format': - specifier: ^0.2.0 - version: 0.2.0 + specifier: ^0.2.1 + version: 0.2.1 packages: @@ -79,8 +79,8 @@ packages: '@fingerprintjs/changesets-changelog-format@0.2.0': resolution: {integrity: sha512-1jI+J1r8OKUtjlFfQW4bmQ8u4E1097zPaKw5fUCgAcahLPgwW4Ae+Keoc253CSyyaKgTu2v/wniUGchmPaXAsg==} - '@fingerprintjs/changesets-native-dependency-format@0.2.0': - resolution: {integrity: sha512-wUh8Zg+veIPyLs8YWl1AOb1ARUy0F+Yw2ak1Cr0n2U3QCXlZPZ7lTt24DmKSoOgqbA4ZQqu2DOupgsNajkgOog==} + '@fingerprintjs/changesets-native-dependency-format@0.2.1': + resolution: {integrity: sha512-AFdnpf6NESGTVfmiyeU4dpzwwbALwBvyXhX3pFFH187WYCq5vEo+I31fcyw/cD9g3PU99eoyiXdYy30O+G1UEA==} '@inquirer/external-editor@1.0.3': resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} @@ -545,7 +545,7 @@ snapshots: dependencies: '@changesets/types': 6.1.0 - '@fingerprintjs/changesets-native-dependency-format@0.2.0': + '@fingerprintjs/changesets-native-dependency-format@0.2.1': dependencies: '@changesets/get-release-plan': 4.0.16 '@changesets/types': 6.1.0