SwiftagramCrypto Documentation

Structure Client.​Device

struct Device: Equatable, Codable, CustomStringConvertible  

A struct defining all possible information about a (mock) device.

%45 Client.Device Client.Device Codable Codable Client.Device->Codable CustomStringConvertible CustomStringConvertible Client.Device->CustomStringConvertible Equatable Equatable Client.Device->Equatable

Member Of

Client

A struct defining all possible information used to identify the software and hardware combination of a logged in user.

Nested Types

Client.Device.Resolution

A struct defining some characteristics of a device's screen.

Client.Device.Hardware

A struct defining some device-specific characteristics.

Client.Device.Software

A struct defining some software-specific characteristics.

Conforms To

Codable
CustomStringConvertible
Equatable

Properties

identifier

public let identifier: UUID

The underlying device identifier.

phone​Identifier

public let phoneIdentifier: UUID

The underlying phone identifier.

ad​Identifier

public let adIdentifier: UUID

The Google AdId.

hardware

public let hardware: Hardware

The hardware.

software

public let software: Software

The operating system.

resolution

public let resolution: Resolution

The resolution of the screen.

instagram​Identifier

public var instagramIdentifier: String  

The Instagram device identifier.

description

public var description: String  

The underlying description, as a user agent component.

browser​Description

public var browserDescription: String  

The browser user agent.

Methods

android(_:​language:​model:​brand:​boot:​cpu:​manufacturer:​resolution:​identifier:​phone​Identifier:​ad​Identifier:​)

public static func android(_ version: String,
                                   language: String,
                                   model: String,
                                   brand: String,
                                   boot: String,
                                   cpu: String,
                                   manufacturer: String?,
                                   resolution: Resolution,
                                   identifier: UUID = .init(),
                                   phoneIdentifier: UUID = .init(),
                                   adIdentifier: UUID = .init()) -> Device  

Generate a generic/Android device.

Parameters

version String

A valid String, like "29/10".

language String

A valid String, like "en_US".

model String

A valid String.

brand String

A valid String.

boot String

A valid String.

cpu String

A valid String.

manufacturer String?

An optional String.

resolution Resolution

A valid Resolution.

identifier UUID

A valid UUID. Defaults to a random one.

phone​Identifier UUID

A valid UUID. Defaults to a random one.

ad​Identifier UUID

A valid UUID. Defaults to a random one.

iOS(_:​language:​model:​resolution:​identifier:​phone​Identifier:​ad​Identifier:​)

public static func iOS(_ version: String,
                               language: String,
                               model: String,
                               resolution: Resolution,
                               identifier: UUID = .init(),
                               phoneIdentifier: UUID = .init(),
                               adIdentifier: UUID = .init()) -> Device  

Generate an iOS device.

Parameters

version String

A valid String, like "iOS 13_3".

language String

A valid String, like "en_US".

model String

A valid String, like "iPhone 9,1".

resolution Resolution

A valid Resolution.

identifier UUID

A valid UUID. Defaults to a random one.

phone​Identifier UUID

A valid UUID. Defaults to a random one.

ad​Identifier UUID

A valid UUID. Defaults to a random one.