搜索插件、代码仓与 APP 分类

插件详情v1.6.0

app_set_id

用于检索应用集 ID(Android)或供应商标识符(IDfV,iOS)的轻量级 Flutter 插件

AndroidiOSWebmacOS
近 30 天下载
3.6万
喜欢数
35
Pub 分数
160

安装插件

flutter pub add app_set_id

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个轻量级的 Flutter 插件,可在 Android 上检索应用集 ID,在 iOS 上检索供应商标识符(IDfV)。它提供了一致的跨平台 API,用于访问设备特定的标识符,有助于追踪应用安装或用户会话,且不包含个人数据。该插件设计简洁,符合隐私合规要求,适用于分析、授权或基于设备的身份验证。支持 Android、iOS、Web 和 macOS,可无缝集成到 Flutter 项目中。

适合场景

  • 跨设备跟踪应用安装
  • 实施基于设备的许可
  • 使用唯一标识符支持分析
  • 启用用户会话管理
  • 促进安全的身份验证流程

主要特点

  • 跨平台兼容性
  • 注重隐私的标识符访问
  • 简单 API 集成
  • 支持 Android 应用集 ID 和 iOS IDfV
  • 最小代码占用

适合对象

  • 分析开发人员
  • 应用许可系统
  • 移动应用安全实现
  • 跨平台 Flutter 应用需要设备标识符

使用建议

  • 如果重新安装应用,标识符可能会更改
  • 不适合用于个人识别
  • 需要在 Android 上具备适当的权限
  • 行为在不同平台之间略有差异
  • 不应用于敏感用户跟踪

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

app_set_id

pub package

A tiny Flutter library to retrieve a vendor-specific privacy-friendly device-unique identifier, also called IDfV or App Set ID.

Android

On Android it returns the App Set ID (ASID). As per the developer documentation:

For apps that are installed by the Google Play store, the app set ID API returns an ID scoped to the set of apps published under the same Google Play developer account.

iOS

On iOS/iPadOS it returns the Identifier for Vendor (IDfV). as per the developer documentation:

The value of this property is the same for apps that come from the same vendor running on the same device. (...) Normally, the vendor is determined by data provided by the App Store.

MacOS

No true IDfV exists on MacOS, so it returns the MAC address of the first network interface (in hexadecimal format, without separators). This is not a real IDfV, but Apple recommends using it as a fallback in the developer documentation, even in the context of validating purchases.

Web

For ease of integration in web projects, on web it returns the browser user agent. This is NOT a good identifier and only here for development purposes.

Installation

Add to your pubspec.yaml file:

dependencies:
  app_set_id: ^1.5.2

Import the library and call getIdentifer:

import 'package:app_set_id/app_set_id.dart';

final appSetId = await AppSetId().getIdentifier();

所属分类

依赖

依赖清单 2 项

  • plugin_platform_interface^2.1.8
  • web^1.1.0

源码仓库

使用此插件的项目

暂无相关数据。