A universal module that gets native application information such as its ID, app name, and build version at runtime
Overall
score
98%
Build a simple device identification service for a React Native iOS application that retrieves and validates device identifiers.
Your service should provide the following functionality:
The service must retrieve the iOS vendor identifier for the current device. The identifier should be returned as a string, or null if unavailable (for example, when the device has been restarted but not yet unlocked).
The service must validate that the retrieved identifier:
The service must handle platform-specific errors gracefully. If the identifier retrieval functionality is not available on the current platform, the service should catch and handle the error appropriately, returning a clear error status.
@generates
/**
* Retrieves the iOS vendor identifier for the device
* @returns Promise resolving to identifier string or null if unavailable
*/
export async function getDeviceIdentifier(): Promise<string | null>;
/**
* Validates that a string follows UUID format (8-4-4-4-12 pattern)
* @param identifier - The identifier string to validate
* @returns true if valid UUID format, false otherwise
*/
export function isValidUuidFormat(identifier: string): boolean;
/**
* Retrieves and validates the device identifier
* @returns Promise resolving to object with identifier and validity status
*/
export async function getValidatedIdentifier(): Promise<{
identifier: string | null;
isValid: boolean;
error?: string;
}>;Provides access to native device identification functionality for iOS applications.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-expo-application