Contains constants and functions for a iOS Client Info Event.
The structure for a iOS Client Info Event is as follows:
{
payload: {
deviceInfo: {
Canonical platform name: 'Android'
Device name: <string>,
Device type: <string>,
Device manufacturer: <string>,
Operating system: <string>,
Screen size: <string>,
Battery level: <integer>,
Location service enabled: <boolean>,
Location authorization status: <string>,
Carrier name: <string>,
Low power mode enabled: <boolean>,
},
appSettings: <object>,
type: 'connect'
version: <string>,
},
type: 'client'
annotations: <array>,
clientId: <string>,
timestamp: <number>,
uuid: <string>,
}
Members
(static, constant) group
A grouping for this object
(static, constant) label
A label that can be used when describing this object
(static, constant) matcher
Matcher can be used to find matching iOS Client Info Event objects.
- Source:
- See:
-
- kit.match
(static, constant) parentDepth
Describes the number of parents this object has based off schema references. When checking for matches for example, we want to use a schema that is more specific over a more generic schema
(static, constant) path :string
Paths for the keys on a iOS Client Info Event
Properties:
Name | Type | Description |
---|---|---|
payload |
string |
An object with custom data describing the event. |
deviceInfo |
string |
A map containing details about the connected device. |
platform |
string |
Canonical name for the platform. Used for Griffon identifying if the device is iOS or Android. |
deviceName |
string |
Read from Build.MODEL, which is the end-user-visible name for the end product.. |
deviceType |
string |
The style of interface to use on the current device.. |
manufacturer |
string |
The manufacturer of the product/hardware.. |
os |
string |
The value is in the format "Android |
screenSize |
string |
Phones display resolution in pixels (width x height). |
batteryLevel |
string |
The battery charge level for the device. This is integer value ranging from 1 to 100. If unable to fetch battery value -1 is returned. |
locationEnabled |
string |
The current enabled/disabled state of location for the device.. |
locationAuth |
string |
Tells the app’s authorization status for using location services.. |
carrierName |
string |
Represents the carrier name. "Unknown" if this value is not available, or not valid on the platform.. |
lowPowerMode |
string |
Indicates whether Low Power Mode is enabled on an iOS device.. |
appSettings |
string |
A map containing details about the settings of the application on which Griffon is registered. |
type |
string |
Constant value representing this event will initiate a connection. |
version |
string |
Griffon SDK Extension version. |
rootType |
string |
The type of event. |
annotations |
string |
Array of Annotation objects. |
clientId |
string |
A unique id that differentiates clients from one another. |
timestamp |
string |
When the event occurred. |
rootId |
string |
Uniquely identifies each event. |
(static, constant) PLATFORM
The value for platform
for a iOS Client Info Event.
Path is payload,deviceInfo,Canonical platform name
.
(static, constant) ROOT_TYPE
The value for rootType
for a iOS Client Info Event.
Path is type
.
(static, constant) TYPE
The value for type
for a iOS Client Info Event.
Path is payload,type
.
Methods
(static) get(alias, data) → {*}
Retrieves a value from the object. You can provide either a path or an alias.
Parameters:
Name | Type | Description |
---|---|---|
alias |
string |
Path or alias |
data |
* |
Data to search |
(static) getBatteryLevel(source) → {number}
Returns the batteryLevel
from the iOS Client Info Event.
This is the the battery charge level for the device. This is integer value ranging from 1 to 100. If unable to fetch battery value -1 is returned.
Path is payload,deviceInfo,Battery level
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getCarrierName(source) → {string}
Returns the carrierName
from the iOS Client Info Event.
This is the represents the carrier name. "Unknown" if this value is not available, or not valid on the platform..
Path is payload,deviceInfo,Carrier name
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getDeviceName(source) → {string}
Returns the deviceName
from the iOS Client Info Event.
This is the read from Build.MODEL, which is the end-user-visible name for the end product..
Path is payload,deviceInfo,Device name
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getDeviceType(source) → {string}
Returns the deviceType
from the iOS Client Info Event.
This is the the style of interface to use on the current device..
Path is payload,deviceInfo,Device type
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getLocationAuth(source) → {string}
Returns the locationAuth
from the iOS Client Info Event.
This is the tells the app’s authorization status for using location services..
Path is payload,deviceInfo,Location authorization status
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getLocationEnabled(source) → {boolean}
Returns the locationEnabled
from the iOS Client Info Event.
This is the the current enabled/disabled state of location for the device..
Path is payload,deviceInfo,Location service enabled
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getLowPowerMode(source) → {boolean}
Returns the lowPowerMode
from the iOS Client Info Event.
This is the indicates whether Low Power Mode is enabled on an iOS device..
Path is payload,deviceInfo,Low power mode enabled
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getManufacturer(source) → {string}
Returns the manufacturer
from the iOS Client Info Event.
This is the the manufacturer of the product/hardware..
Path is payload,deviceInfo,Device manufacturer
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getOs(source) → {string}
Returns the os
from the iOS Client Info Event.
This is the the value is in the format "Android
Path is payload,deviceInfo,Operating system
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getPlatform(source) → {string}
Returns the platform
from the iOS Client Info Event.
This is the canonical name for the platform. Used for Griffon identifying if the device is iOS or Android.
Path is payload,deviceInfo,Canonical platform name
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) getScreenSize(source) → {string}
Returns the screenSize
from the iOS Client Info Event.
This is the phones display resolution in pixels (width x height).
Path is payload,deviceInfo,Screen size
.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
(static) isMatch(source) → {boolean}
Tests the provided source against the matcher to see if it's iOS Client Info Event event.
Parameters:
Name | Type | Description |
---|---|---|
source |
object |
The iOS Client Info Event instance |
- Source:
- See:
-
- kit.isMatch
(static) make(…input) → {object}
Generates a iOS Client Info Event with the const values set. Can be useful in testing. Can provide additional data by providing a flat object of paths and values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
function |
<repeatable> |
Overrides |
(static) mock(…input) → {object}
Generates a iOS Client Info Event with some default values set. Can be useful in testing. Can override defaults and provide additional data by providing a flat object of paths and values.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
input |
function |
<repeatable> |
Overrides |