@ainellc/capacitor-device-model
v0.0.1
Published
Get device model information for iOS and Android
Readme
@ganessaa/capacitor-device-model
Get device model information for iOS and Android
This Capacitor plugin provides a simple way to retrieve the device model name on both iOS and Android platforms.
Install
npm install @ganessaa/capacitor-device-model
npx cap syncUsage
import { DeviceModel } from '@ganessaa/capacitor-device-model';
const getDeviceInfo = async () => {
const result = await DeviceModel.getModel();
console.log('Device Model:', result.model);
// iOS example output: "iPhone 14 Pro"
// Android example output: "SM-G991B"
};API
getModel()
getModel() => Promise<{ model: string; }>Returns: Promise<{ model: string; }>
