Skip to content

Commit

Permalink
docs(device_info_plus): Add iOS name property entitlements info (#2756)
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed Mar 27, 2024
1 parent 8f132a2 commit d21f285
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/device_info_plus/device_info_plus/README.md
Expand Up @@ -53,10 +53,15 @@ final deviceInfo = await deviceInfoPlugin.deviceInfo;
final allInfo = deviceInfo.data;
```

> **Note**
>
> To get serial number on Android your app needs to meet one of official [requirements](https://developer.android.com/reference/android/os/Build#getSerial())
> In case the app doesn't meet any of requirements plugin will return `unknown`.
### Android

To get serial number on Android your app needs to meet one of official [requirements](https://developer.android.com/reference/android/os/Build#getSerial()).
In case the app doesn't meet any of requirements plugin will return `unknown`.

### iOS

The `name` property exposes the assigned device name by the owner. This value is obtained from the property `UIDevice.current.name`.
This property requires special entitlement [com.apple.developer.device-information.user-assigned-device-name](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_device-information_user-assigned-device-name) in iOS 16 and later, otherwise, the property `name` will always be `iPad` or `iPhone`.

## Learn more

Expand Down

0 comments on commit d21f285

Please sign in to comment.