plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Question]: iOS device_info_plus "Nodename" always returns "localhost" on iOS 17+

Open alazar-aot opened this issue 2 years ago • 4 comments

What is your question?

Platform iOS 17.0.3

Plugin device_info_plus

Plugin Version 9.1.0

Flutter SDK 3.13.6

Steps to reproduce

  1. Connect real iOS device (iPad) running iOS 17.0.3 to IDE and run our application.
  2. Attempt to obtain the device name (nodename) using the following code:
var data = await _deviceInfoPlugin.iosInfo;
final deviceName = data.utsname.nodename;

Before updating to iOS 17,data.utsname.nodename would always return the name of the device, however data.utsname.nodename now always returns localhost since updating to iOS 17.

Is anyone able to advise on whether or not data.utsname.nodename will now always return localhost on iOS versions >= iOS 17? Is it likely that any future plugin updates will fix this (if possible?)

Checklist before submitting a question

  • [X] I searched issues in this repository and couldn't find such bug/problem
  • [X] I Google'd a solution and I couldn't find it
  • [X] I searched on StackOverflow for a solution and I couldn't find it
  • [X] I read the README.md file of the plugin
  • [X] I am using the latest version of the plugin
  • [X] All dependencies are up to date with flutter pub upgrade
  • [X] I did a flutter clean
  • [X] I tried running the example project

alazar-aot avatar Oct 24 '23 22:10 alazar-aot

I got the same issue

Artur110 avatar Oct 31 '23 16:10 Artur110

Same here, has anyone found a solution?

Bebunk avatar Jan 09 '24 00:01 Bebunk

Same here. I figured it out when iOS app was published on TestFlight.

On my side, I've used utsname.machine?.split(",")[0]

It worked.

utsname.machine gives iPhone 15,3 for 15. iPhone 10,6 for iPhone X. Better use this.

Thanks.

theatifwaheed avatar Jan 18 '24 06:01 theatifwaheed

Same here. I figured it out when iOS app was published on TestFlight.

On my side, I've used utsname.machine?.split(",")[0]

It worked.

utsname.machine gives iPhone 15,3 for 15. iPhone 10,6 for iPhone X. Better use this.

Thanks.

Thanks for the workaround, but this would not work for some devices. iPhone 12 Pro is being reported as iPhone 13,3 😆 thanks to Apple's magical naming convention.

bqubique avatar Feb 28 '24 08:02 bqubique

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar May 29 '24 00:05 github-actions[bot]