View Source IDeviceDb (idevice_db v0.1.3)

A database of Apple devices.

This module provides a simple API for querying a database of Apple devices. The database is generated from the Apple Wiki and is stored in the priv directory.

When the module is loaded, the database is read from the priv directory and stored in persistent terms. This means that the database is only read from disk once and is then available in memory for the lifetime of the application.

Summary

Functions

Returns a list of all devices in the database.

Finds a device name by its identifier e.g. iPhone13,1

Finds a device by its model name e.g. MX132

Functions

all_devices()

@spec all_devices() :: [map()]

Returns a list of all devices in the database.

find_by_identifier(identifier)

@spec find_by_identifier(String.t()) :: map() | nil

Finds a device name by its identifier e.g. iPhone13,1

find_by_model(model)

@spec find_by_model(String.t()) :: map() | nil

Finds a device by its model name e.g. MX132