Socket
Book a DemoInstallSign in
Socket

@rn-common/device-info

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-common/device-info

## Overview

53.0.3
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@rn-common/device-info

Overview

This module provides utility functions to retrieve information about the device and the application. It leverages the expo-device and expo-application libraries to access various details such as device name, model, operating system, app version, and more.

Installation

Install using:

npx expo install @rn-common/device-info expo-application expo-device

Functions

1. getDeviceInfo

Retrieves detailed information about the device.

Returns:

  • DeviceInfo: An object containing device-related information.

Structure of DeviceInfo object:

  • deviceName (string): The name of the device.
  • modelName (string): The model name of the device.
  • os (string): The operating system of the device.
  • osVersion (string): The version of the operating system.

Example:

import { getDeviceInfo } from '@rn-common/device-info'

const deviceInfo = getDeviceInfo()
console.log(deviceInfo)

2. getAppInfo

Retrieves detailed information about the application.

Returns:

  • AppInfo: An object containing application-related information.

Structure of AppInfo object:

  • name (string): The name of the application.
  • version (string): The native version of the application.
  • buildNumber (string): The native build version of the application.
  • appId (string): The application ID.

Example:

import { getAppInfo } from '@rn-common/device-info'

const appInfo = getAppInfo()
console.log(appInfo)

FAQs

Package last updated on 24 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.