Describe the bug
The Launchdarkly Website states that Device / Model Context is providing a value like:
iPhone10,3
for device model.
model
Model of the device.
Pixel 6 Pro, iPhone, iPhone10,3, iPad
However this is not true for the Flutter SDK as that will always just report "iPhone" as it is using info.model from device_info_plus
final info = await DeviceInfoPlugin ().iosInfo;
return DeviceInfo (model: info.model, manufacturer: 'Apple' );
https://pub.dev/documentation/device_info_plus/latest/device_info_plus/IosDeviceInfo/model.html
https://developer.apple.com/documentation/uikit/uidevice/model
Instead the utsname.machine should be used for this:
https://pub.dev/documentation/device_info_plus/latest/device_info_plus/IosUtsname/machine.html
To reproduce
Use the SDK on an iPhone
Observer that the device.model is just "iPhone"
Expected behavior
device.model should include the actual device type
alternatively add a new field
Important
Otherwise targetting iPhones by Model is not possible
Logs
SDK version
4.14.0
OS/platform
iOS
Additional context
See the output from DeviceInfoPlus
Describe the bug
The Launchdarkly Website states that Device / Model Context is providing a value like:
iPhone10,3for device model.
However this is not true for the Flutter SDK as that will always just report "iPhone" as it is using
info.modelfromdevice_info_plusflutter-client-sdk/packages/flutter_client_sdk/lib/src/platform_env_reporter.dart
Lines 100 to 101 in 0dd2106
https://pub.dev/documentation/device_info_plus/latest/device_info_plus/IosDeviceInfo/model.html
https://developer.apple.com/documentation/uikit/uidevice/model
Instead the
utsname.machineshould be used for this:https://pub.dev/documentation/device_info_plus/latest/device_info_plus/IosUtsname/machine.html
To reproduce
Use the SDK on an iPhone
Observer that the device.model is just "iPhone"
Expected behavior
device.model should include the actual device type
alternatively add a new field
Important
Otherwise targetting iPhones by Model is not possible
Logs
SDK version
4.14.0
OS/platform
iOS
Additional context
See the output from DeviceInfoPlus