bestburning / platform_device_id Goto Github PK
View Code? Open in Web Editor NEWflutter plugin to get device id
Home Page: https://pub.dev/packages?q=platform_device_id
License: BSD 3-Clause "New" or "Revised" License
flutter plugin to get device id
Home Page: https://pub.dev/packages?q=platform_device_id
License: BSD 3-Clause "New" or "Revised" License
Hello,
I am trying to build my app on Mac for iOS but got number of errors on the plugin
"value witness table for Builtin.UnknownObject", referenced from:
full type metadata for platform_device_id.SwiftPlatformDeviceIdPlugin in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
"_swift_FORCE_LOAD$_swiftCompatibilityDynamicReplacements", referenced from:
_swift_FORCE_LOAD$swiftCompatibilityDynamicReplacements$_platform_device_id in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
(maybe you meant: _swift_FORCE_LOAD$swiftCompatibilityDynamicReplacements$_platform_device_id)
"_swift_FORCE_LOAD$_swiftCompatibility51", referenced from:
_swift_FORCE
__C.FlutterMethodChannel in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
"_swift_FORCE_LOAD$_swiftCoreMedia", referenced from:
_swift_FORCE_LOAD$swiftCoreMedia$_platform_device_id in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
(maybe you meant: _swift_FORCE_LOAD$swiftCoreMedia$platform_device_id)
"type metadata for Swift.String", referenced from:
platform_device_id.SwiftPlatformDeviceIdPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
"swift_bridgeObjectRelease", referenced from:
@nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
platform_device_id.SwiftPlatformDeviceIdPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
"Swift.String.init(builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.String", referenced from:
static platform_device_id.SwiftPlatformDeviceIdPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
platform_device_id.SwiftPlatformDeviceIdPlugin.handle(: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libplatform_device_id.a(SwiftPlatformDeviceIdPlugin.o)
Works on Android
Thank you very much!
The current approach to providing the userAgent today does not guarantee a unique device id, the fingerprintjs library does a significantly good job of it
Please add compatibility with device_info 1.0.0
platform_device_id 0.1.3 currently depends on device_info ^1.0.0, it breaks the app if it is still stay in 1.0.0
it is suggested to update to device_info ^2.0.0 due to the newly released flutter 2.0
quick question.
Will deviceId change over time, or, If I reinstall the app will change?
deivce_info does.
comment out the replace
update the version to v0.1.1
this now works:
module platform_device_id_example/go
go 1.14
require (
github.com/BestBurning/platform_device_id/go v0.1.1
github.com/go-flutter-desktop/go-flutter v0.38.0
github.com/pkg/errors v0.9.1
)
//replace github.com/BestBurning/platform_device_id/go => D:\gitRepo\platform_device_id\go
i was build a myApplication.exe but i have error platform_device_id_windows_plugin.dll
Android Gradle Error due to the latest version used in the project. Package contains lower grade and kotlin version that is not supported to build with latest Gradle version.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':platform_device_id' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 10.0.22621.819], locale en-IN)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.73.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
On windows release app it showing a terminal window popup and closing automatically.
Please consider replacing device_info
pkg with device_info_plus
pkg. As described on device_info page
This plugin has been replaced by the Flutter Community Plus Plugins version, device_info_plus. No further updates are planned to this plugin, and we encourage all users to migrate to the Plus version.
Critical fixes (e.g., for any security incidents) will be provided through the end of 2021, at which point this package will be marked as discontinued."
When trying to get the device id from the windows desktop, a few seconds later it is crashing, and closing the application without showing any error log.
Currently my project is not null safety!
flutter doctor -v
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [versão 10.0.19042.1083], locale pt-BR)
• Flutter version 2.2.3 at C:\Users\progmaq02\Documents\src\flutter
• Framework revision f4abaa0735 (2 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\progmaq02\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31129.286
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code, 64-bit edition (version 1.57.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.24.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [versão 10.0.19042.1083]
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.124
• Edge (web) • edge • web-javascript • Microsoft Edge 91.0.864.67
I have read the readme but can't really understand what device id means.
Is it mac address? or some other unique id?.
I think it will be good to add clarification to the readme about what device id means, maybe even add a link to some source (like Wikipedia) that explains what it is because device id sounds to me really a general thing.
Thank you for your plugin, however it does not work in Ubuntu
dmidecode -s system-uuid
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied
/dev/mem: Permission denied
My fix is
if(buf[0] == 0) {
rstream = popen("cat /etc/machine-id", "r");
fread(buf, sizeof(char), sizeof(buf), rstream);
pclose(rstream);
}
Add support to native Linux and windows
The package is not supported for the Latest Kotlin versions.
current configuration
**
platform_device_id: ^1.0.1
**
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
}
Error while building:
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':platform_device_id' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
* 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 5s
Running Gradle task 'assembleRelease'... 6.2s
Gradle task assembleRelease failed with exit code 1
Tested it on 2 devices same with spec and brand but 2 OS 1 windows 7 another one windows 10 we got same id on both devices.
Add suppor also for web
No podspec found for platform_device_id_v3
in .symlinks/plugins/platform_device_id_v3/ios
问题的原因是,你的项目名字是platform_device_id_v3,但是iOS文件下的podspec文件却是platform_device_id.podspec,文件里面的s.name 也是platform_device_id,所以在iOS平台上是跑不通的,我很好奇为啥这个问题,没人发现,大家都是用的安卓骂?
Getting a UUID on the Windows platform gets the newline character.
D:\MyData\xxxxx>wmic csproduct get uuid
UUID
5D1DC14B-754E-4797-AFEA-4237AA0F7018
D:\MyData\xxxxx>
So I will get the string contains \r\n\r\n
. This causes the program to run incorrectly, so can the library handle the problem?
Not sure if you noticed but the function is not implemented. This means that your plugin runs well on Android but gives errors on IOS since it is not implemented.
please I am a beginner I don't understand how to use this plugin. can you please put me through
platform_device_id-1.0.1 depends on device_info, which has been discontinued - see: https://pub.dev/packages/device_info
and is replaced by device_info_plus: https://pub.dev/packages/device_info_plus
I tried using this package on Windows in pure Dart and it does not work. Seeing that it works in flutter on windows, i believe with little modification, it should be able to work in pure dart on Windows.
First of all, this is an amazing package. Thank you.
Just want to suggest something here: The desktop implementations would be simplified, just by calling the respective command line processes through dart:io Platform.run, like:
For linux, it would be:
var process = await Process.run(
'dmidecode',
['-s', 'system-uuid'],
mode: ProcessStartMode.normal,
runInShell: true
)
.whenComplete(() => print('Completed')).catchError((error, stackTrace) {
print('ERROR: $error');
});
String systemUuid = '';
if (process.exitCode == 0) {
systemUuid = utf8.decode(process.stdout);
}
I think it should work on windows, calling wmic csproduct get UUID
and on MacOSX calling ioreg -l | grep IOPlatformUUID | awk 'NR==1{print $4}' | sed 's/\"//g'
.
Maybe pipe operations would not work in Process.run call (i did not test it), but it can easily be handled on the Dart-side
while checking on Ubuntu 20.04 getting below error
/sys/firmware/dmi/tables/smbios_entry_point: Permission denied
/dev/mem: Permission denied
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':platform_device_id' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
Hello,
I supposed that PlatformDeviceId is a static ID connected to the device only. But strangely, I saw it changing after I installed an upgraded version of my apk app.
I was looking for an ID that depends on the hardware only, not randomly created. So far, I did try several device id libraries, and all give a pseudo-random ID which changes with a new application.
Therefore, I would ask, is this working as intended?
Thanks.
Error is :
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
FAILURE: Build failed with an exception.
Where:
Build file 'D:\Echo Switch\Flutter\Flutter Project\echo_switch\android\build.gradle' line: 11
What went wrong:
A problem occurred evaluating root project 'android'.
Could not find method implementation() for arguments [org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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.
BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Title speaks for itself. Always returns "" on the windows platform. Please help debug this.
On Linux, the import fmt
causes go to stop compiling. Here is a fix
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.