Plugin to retrieve a persistent UDID across app reinstalls on iOS and Android.

Related tags

Device flutter_udid
Overview

flutter_udid

pub package

Plugin to retrieve a persistent UDID across app reinstalls on iOS and Android.

Getting Started

import 'package:flutter_udid/flutter_udid.dart';
String udid = await FlutterUdid.udid;

This provides an UDID for both iOS and Android using the format of the corresponding platform.

Platform Format
iOS 7946DA4E-8429-423C-B405-B3FC77914E3E
Android 8af8770a27cfd182

To get a consistent formatting on both platforms use:

import 'package:flutter_udid/flutter_udid.dart';
String udid = await FlutterUdid.consistentUdid;

This will result in an UDID of the following format:
984725b6c4f55963cc52fca0f943f9a8060b1c71900d542c79669b6dc718a64b

The UDID can change after a factory reset! Additionally if a device has been updated to Android 8.0 through an OTA and the app is reinstalled the UDID may change as well due to security changes in Android 8.0. On rooted and jailbroken devices the ID can be changed, so please take this into account. However it should not be possible to identify as another already existing user through random guessing because of the complexity of the ID.

For help getting started with Flutter, view the online documentation.

For help on editing plugin code, view the documentation.

Comments
  • error in pod

    error in pod

    Hi, i got an error

    The Swift pod flutter_udid depends upon SAMKeychain, which do not define modules.

    please advise what to do. in android it has no problem.

    thanks

    opened by NewITCorp 13
  • SWIFT_VERSION

    SWIFT_VERSION

    • flutter_udid does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.
    opened by Gorniv 6
  • Cocoapod issue

    Cocoapod issue

    I'm getting this error when I try to run my application in iOS.

    The Swift pod flutter_udid depends upon SAMKeychain, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

    opened by utsavstha 4
  • UDID Is changing everywhile

    UDID Is changing everywhile

    I am working on an application where i must store a unique id for the device for my users. but after app updates the udid sometimes changes (i didn't upgrade my mobile device version)

    opened by AhmedMahhmoud 3
  • Use UDID for device token APNS

    Use UDID for device token APNS

    Hello,

    I'm asking myself a question, can we use the UDID wich generate by this plugin, for device token parameter of api call at APNS endpoint for display notification in ios device ?

    I use this, and APNS return me BadDeviceToken

    Thanks for your advice.

    opened by devglrd 3
  • `flutter_udid` does not specify a Swift version

    `flutter_udid` does not specify a Swift version

    When I try to run my app on iOS using flutter build ios I get this error:

    flutter_udid does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

    Full output:

    $ flutter build ios
    Building com.usdentaldepot.masterdental for device (ios-release)...
    Automatically signing iOS for device deployment using specified development team in Xcode project: K85NPKGW53
    Running pod install...                                              2.1s
    CocoaPods' output:
    ↳
          Preparing
    
        Analyzing dependencies
    
        Inspecting targets to integrate
          Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
    
        Finding Podfile changes
          A flutter_udid
          M Flutter
          - firebase_analytics
          - firebase_core
          - firebase_dynamic_links
          - flutter_secure_storage
          - flutter_webview_plugin
          - package_info
          - path_provider
          - screen
          - share
          - sqflite
          - url_launcher
          - video_player
    
        Fetching external sources
        -> Fetching podspec for `Flutter` from `.symlinks/flutter/ios-release`
        -> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
        -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
        -> Fetching podspec for `firebase_dynamic_links` from `.symlinks/plugins/firebase_dynamic_links/ios`
        -> Fetching podspec for `flutter_secure_storage` from `.symlinks/plugins/flutter_secure_storage/ios`
        -> Fetching podspec for `flutter_udid` from `.symlinks/plugins/flutter_udid/ios`
        -> Fetching podspec for `flutter_webview_plugin` from `.symlinks/plugins/flutter_webview_plugin/ios`
        -> Fetching podspec for `package_info` from `.symlinks/plugins/package_info/ios`
        -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
        -> Fetching podspec for `screen` from `.symlinks/plugins/screen/ios`
        -> Fetching podspec for `share` from `.symlinks/plugins/share/ios`
        -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
        -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
        -> Fetching podspec for `video_player` from `.symlinks/plugins/video_player/ios`
    
        Resolving dependencies of `Podfile`
    
        Comparing resolved specification to the sandbox manifest
          A FMDB
          A Firebase
          A FirebaseAnalytics
          A FirebaseAnalyticsInterop
          A FirebaseCore
          A FirebaseDynamicLinks
          A FirebaseInstanceID
          A Flutter
          A GoogleAppMeasurement
          A GoogleUtilities
          A SAMKeychain
          A firebase_analytics
          A firebase_core
          A firebase_dynamic_links
          A flutter_secure_storage
          A flutter_udid
          A flutter_webview_plugin
          A nanopb
          A package_info
          A path_provider
          A screen
          A share
          A sqflite
          A url_launcher
          A video_player
    
        Downloading dependencies
    
        -> Installing FMDB (2.7.5)
          > Copying FMDB from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce00` to `Pods/FMDB`
    
        -> Installing Firebase (6.1.0)
          > Copying Firebase from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/Firebase/6.1.0-8d77b` to `Pods/Firebase`
    
        -> Installing FirebaseAnalytics (6.0.1)
          > Copying FirebaseAnalytics from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FirebaseAnalytics/6.0.1-62930` to
          `Pods/FirebaseAnalytics`
    
        -> Installing FirebaseAnalyticsInterop (1.2.0)
          > Copying FirebaseAnalyticsInterop from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FirebaseAnalyticsInterop/1.2.0-efbe4` to
          `Pods/FirebaseAnalyticsInterop`
    
        -> Installing FirebaseCore (6.0.1)
          > Copying FirebaseCore from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FirebaseCore/6.0.1-66bde` to `Pods/FirebaseCore`
    
        -> Installing FirebaseDynamicLinks (4.0.0)
          > Copying FirebaseDynamicLinks from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FirebaseDynamicLinks/4.0.0-25fc4` to
          `Pods/FirebaseDynamicLinks`
    
        -> Installing FirebaseInstanceID (4.1.0)
          > Copying FirebaseInstanceID from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/FirebaseInstanceID/4.1.0-27bed` to
          `Pods/FirebaseInstanceID`
    
        -> Installing Flutter (1.0.0)
    
        -> Installing GoogleAppMeasurement (6.0.1)
          > Copying GoogleAppMeasurement from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/GoogleAppMeasurement/6.0.1-51d8d` to
          `Pods/GoogleAppMeasurement`
    
        -> Installing GoogleUtilities (6.1.0)
          > Copying GoogleUtilities from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/GoogleUtilities/6.1.0-84df5` to
          `Pods/GoogleUtilities`
    
        -> Installing SAMKeychain (1.5.3)
          > Copying SAMKeychain from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/SAMKeychain/1.5.3-483e1` to `Pods/SAMKeychain`
    
        -> Installing firebase_analytics (0.0.1)
         > Running prepare command
           $ /bin/bash -c  set -e echo // Generated file, do not edit > Classes/UserAgent.h echo "#define LIBRARY_VERSION @\"5.0.2\"" >>
           Classes/UserAgent.h echo "#define LIBRARY_NAME @\"flutter-fire-analytics\"" >> Classes/UserAgent.h
    
        -> Installing firebase_core (0.0.1)
         > Running prepare command
           $ /bin/bash -c  set -e echo // Generated file, do not edit > Classes/UserAgent.h echo "#define LIBRARY_VERSION @\"0.4.0-9\"" >>
           Classes/UserAgent.h echo "#define LIBRARY_NAME @\"flutter-fire-core\"" >> Classes/UserAgent.h
    
        -> Installing firebase_dynamic_links (0.1.0)
         > Running prepare command
           $ /bin/bash -c  set -e echo // Generated file, do not edit > Classes/UserAgent.h echo "#define LIBRARY_VERSION @\"0.5.0-1\"" >>
           Classes/UserAgent.h echo "#define LIBRARY_NAME @\"flutter-fire-dl\"" >> Classes/UserAgent.h
    
        -> Installing flutter_secure_storage (3.3.1)
    
        -> Installing flutter_udid (0.0.1)
    
        -> Installing flutter_webview_plugin (0.0.1)
    
        -> Installing nanopb (0.3.901)
          > Copying nanopb from `/Users/marcosgallardo/Library/Caches/CocoaPods/Pods/Release/nanopb/0.3.901-2901f` to `Pods/nanopb`
    
        -> Installing package_info (0.0.1)
    
        -> Installing path_provider (0.0.1)
    
        -> Installing screen (0.0.1)
    
        -> Installing share (0.5.2)
    
        -> Installing sqflite (0.0.1)
    
        -> Installing url_launcher (0.0.1)
    
        -> Installing video_player (0.0.1)
          - Running pre install hooks
        [!] Unable to determine Swift version for the following pods:
    
        - `flutter_udid` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please
        contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
    
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/installer/xcode/target_validator.rb:115:in
        `verify_swift_pods_swift_version'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:459:in `validate_targets'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:138:in `install!'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/command/install.rb:48:in `run'
        /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:in `run'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/gems/cocoapods-1.6.0/bin/pod:55:in `<top (required)>'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/bin/pod:22:in `load'
        /usr/local/Cellar/cocoapods/1.6.0/libexec/bin/pod:22:in `<main>'
    
    Error output from CocoaPods:
    ↳
    
        [!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for
        this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
    

    Flutter doctor:

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-AR)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    [✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    [!] Android Studio (version 3.4)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] VS Code (version 1.38.1)
    [✓] Connected device (1 available)
    
    ! Doctor found issues in 1 category.
    

    Hope you can help me. Thanks.

    opened by marcosgallardo 3
  • Unable to determine Swift version for the following pods

    Unable to determine Swift version for the following pods

    Error appears when getting dependencies. Part of the log below.

    CocoaPod version: 1.6.0.beta.2

    `Installing flutter_udid (0.0.1) Running pre install hooks Unable to determine Swift version for the following pods

    flutter_udid does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.`

    opened by mastahed 3
  • UDID changes after updating the application

    UDID changes after updating the application

    Does this plugin still work? After application update my UDID changes. I have Android 10 and after building new version of my app all UDIDs are changing.

    opened by Kacper1263 2
  • Issue with 'swift_versions' in plugin version 1.0.1

    Issue with 'swift_versions' in plugin version 1.0.1

    During the production build for ios, I've faced with the following issue:

    [!] Failed to load 'flutter_udid' podspec: 
        [!] Invalid `flutter_udid.podspec` file: undefined method `swift_versions=' for #<Pod::Specification name="flutter_udid">
        Did you mean?  swift_version=
                       swift_version.
         #  from /Users/vagrant/git/ios/.symlinks/plugins/flutter_udid/ios/flutter_udid.podspec:20
         #  -------------------------------------------
         #    s.ios.deployment_target = '8.0'
         >    s.swift_versions = ['4.0', '4.2', '5.0']
         #  end
         #  -------------------------------------------
    

    The problem is clearly with this line: > s.swift_versions = ['4.0', '4.2', '5.0'] as described above.

    I've checked the 1.0.0 version - it works without any problems.

    opened by andriy-gulak-ew 2
  • No implementation found for method getUDID on channel flutter_udid

    No implementation found for method getUDID on channel flutter_udid

    E/flutter (18333): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method getUDID on channel flutter_udid)

    opened by Xgamefactory 2
  • Can't assembleRelease

    Can't assembleRelease

    Hello there,

    Thanks for the great plugin. I'm having a problem compiling the release version of the app.

    λ flutter build apk                                                                                                                                                                                 
    Initializing gradle...                                              1,3s
    Resolving dependencies...                                           6,5s
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:lintVitalRelease'.
    > Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'.
       > Could not resolve project :flutter_udid.
         Required by:
             project :app
          > java.lang.NullPointerException (no error message)
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 12s
    Running Gradle task 'assembleRelease'...
    Running Gradle task 'assembleRelease'... Done                      13,4s
    Gradle task assembleRelease failed with exit code 1
    

    It runs fine in debug mode.

    opened by nobios 2
  • Obtain a UDID without using keychain.

    Obtain a UDID without using keychain.

    Since the UDID is stored in the keychain, and the keychain gets synchronized across devices, it would be nice to have a function that gets the original UDID directly from the OS, so we can bypass any keychain storage if needed.

    If you are open to accepting a PR for this, we could definitely submit one.

    opened by Mike-Benoit 2
Releases(2.0.0)
Owner
Leon Kukuk
Leon Kukuk
Flutter Downloader - A plugin for creating and managing download tasks. Supports iOS and Android. Maintainer: @hnvn

Flutter Downloader A plugin for creating and managing download tasks. Supports iOS and Android. This plugin is based on WorkManager in Android and NSU

Flutter Community 789 Jan 3, 2023
A Flutter plugin to easily handle realtime location in iOS and Android. Provides settings for optimizing performance or battery.

Flutter Location Plugin This plugin for Flutter handles getting location on Android and iOS. It also provides callbacks when location is changed. Gett

Guillaume Bernos 953 Dec 22, 2022
Flutter geolocation plugin for Android and iOS.

geolocation Flutter geolocation plugin for Android API 16+ and iOS 9+. Features: Manual and automatic location permission management Current one-shot

Loup 221 Dec 27, 2022
A Flutter plugin for displaying local notifications on Android, iOS and macOS

Flutter Local Notifications plugin This repository consists hosts the following packages flutter_local_notifications: code for the cross-platform faci

Michael Bui 2.1k Dec 30, 2022
File picker plugin for Flutter, compatible with both iOS & Android and desktop (go-flutter).

File Picker A package that allows you to use the native file explorer to pick single or multiple files, with extensions filtering support. Currently s

Miguel Ruivo 985 Jan 5, 2023
Android and iOS Geolocation plugin for Flutter

Flutter Geolocator Plugin A Flutter geolocation plugin which provides easy access to platform specific location services (FusedLocationProviderClient

Baseflow 1k Jan 5, 2023
Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices

ar_flutter_plugin Flutter Plugin for AR (Augmented Reality) - Supports ARKit for iOS and ARCore for Android devices. Many thanks to Oleksandr Leuschen

Lars Carius 222 Jan 4, 2023
Telegram stickers importing Flutter plugin for iOS and Android

TelegramStickersImport — Telegram stickers importing Flutter plugin for iOS and Android TelegramStickersImport helps your users import third-party pro

Iurii Dorofeev 20 Dec 3, 2022
Support to update the app badge on the launcher (both for Android and iOS)

Flutter App Badger plugin This plugin for Flutter adds the ability to change the badge of the app in the launcher. It supports iOS and some Android de

Edouard Marquez 258 Dec 25, 2022
A Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed apps.

Flutter AppAvailability Plugin A Flutter plugin that allows you to check if an app is installed/enabled, launch an app and get the list of installed a

Lorenzo Pichilli 89 Dec 2, 2022
A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.

Flutter InAppWebView Plugin A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser windo

Lorenzo Pichilli 2.3k Jan 8, 2023
Flutter library for iOS Widgets Extensions. Integrate a Widget into your App 🍏📱

flutter_widgetkit Flutter Library for the iOS ?? WidgetKit framework and Widget Communication Table of Contents ?? Introduction ??‍?? Installation ??‍

Fasky 227 Dec 31, 2022
A lightweight Flutter plugin for making payments and printing on MyPos

my_poster ?? my_poster is in beta - please provide feedback (and/or contribute) if you find issues ??️ A lightweight Flutter plugin for making payment

Antonio Mentone 3 Oct 10, 2022
Community WebView Plugin - Allows Flutter to communicate with a native WebView.

NOTICE We are working closely with the Flutter Team to integrate all the Community Plugin features in the Official WebView Plugin. We will try our bes

Flutter Community 1.4k Jan 7, 2023
Plugin to access VPN service for Flutter | Flutter 的 VPN 插件

Flutter VPN plugin This plugin help developers to access VPN service in their flutter app. 本插件帮助开发者在自己的应用内调用 VPN 服务。 The Android part was implemented

Xdea 277 Dec 28, 2022
Use dynamic and beautiful card view pagers to help you create great apps.

Use dynamic and beautiful card view pagers to help you create great apps. Preview New Feature v1.3.0 Change Alignment Left Center(Default) Right v1.4.

Jeongtae Kim 84 Dec 6, 2022
A Flutter plugin to retrieve and manage contacts on Android and iOS devices. Maintainer: @lukasgit

contacts_service A Flutter plugin to access and manage the device's contacts. Usage To use this plugin, add contacts_service as a dependency in your p

Lukas Dickie 166 Dec 28, 2022
A Flutter plugin to retrieve the Firebase App Instance ID

firebase_instance_id A Flutter plugin to retrieve the Firebase App Instance ID# device_unlock How does it work App Instance Id is an unique identifier

Cíngulo 1 Jan 21, 2022
This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

screen_retriever This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc. screen_retriever P

LeanFlutter 27 Dec 6, 2022
This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc.

screen_retriever This plugin allows Flutter desktop apps to Retrieve information about screen size, displays, cursor position, etc. screen_retriever P

LeanFlutter 27 Dec 6, 2022