cordova-plugin-device
cordova-plugin-device copied to clipboard
Ability to get the device name
Feature Request
I think this is a very important piece of information this plugin can offer. For example, writing device.name
can give me- Shashank's iPhone
or My Samsung J6
.
Motivation Behind Feature
Only one motivation- Avoid installing one more plugin.
There is one plugin already available https://github.com/becvert/cordova-plugin-device-name which does the job but since this official Cordova plugin is already giving device information so why not include name.
I have seen many developers finding the name in this official Cordova plugin.
Feature Description
Get the device's name from the APIs as implemented here-
- Android- https://github.com/becvert/cordova-plugin-device-name/blob/1.3.5/src/android/net/becvert/cordova/DeviceName.java#L32-L50
- iOS- https://github.com/becvert/cordova-plugin-device-name/blob/1.3.5/src/ios/CDVDeviceName.m#L11-L15
Alternatives or Workarounds
https://github.com/becvert/cordova-plugin-device-name
PR's welcome!
Yes @timbru31 already working on it
Dear @sagrawal31 any update on this request ? the device.name will be introduced in next release ? thank you
Hi, @nfmobile I can do it for Android but I have limited knowledge of iOS. I'll create a PR.
Closing as won’t do, since iOS 16 it’s a sensitive piece of information and the native API no longer returns the value unless you request a special entitlement and Apple approves it if they consider it’s appropriate for your app.
https://developer.apple.com/documentation/uikit/uidevice/1620015-name