diff --git a/core/src/core-plugin-definitions.ts b/core/src/core-plugin-definitions.ts index 6ae95be5e9..5c7f2b0eed 100644 --- a/core/src/core-plugin-definitions.ts +++ b/core/src/core-plugin-definitions.ts @@ -408,6 +408,11 @@ export interface DevicePlugin extends Plugin { export type OperatingSystem = 'ios' | 'android' | 'windows' | 'mac' | 'unknown'; export interface DeviceInfo { + /** + * Note: this property is iOS only. + * The name of the device. For example, "John's iPhone" + */ + name?: string; /** * The device model. For example, "iPhone" */ diff --git a/ios/Capacitor/Capacitor/Plugins/Device.swift b/ios/Capacitor/Capacitor/Plugins/Device.swift index 8444939cc0..c120a74e99 100644 --- a/ios/Capacitor/Capacitor/Plugins/Device.swift +++ b/ios/Capacitor/Capacitor/Plugins/Device.swift @@ -20,6 +20,7 @@ public class CAPDevicePlugin: CAPPlugin { "memUsed": memUsed, "diskFree": diskFree, "diskTotal": diskTotal, + "name": UIDevice.current.name, "model": UIDevice.current.model, "operatingSystem": "ios", "osVersion": UIDevice.current.systemVersion,