Hardware module
Purpose
Section titled “Purpose”Populate device and hardware providers: user agent, CPU, screen metrics, OS version, locale, carrier codes and similar.
Module constant
Section titled “Module constant”AffiseModules.HARDWARE = "Hardware"(src/module/AffiseModules.ts:16)
Platform notes
Section titled “Platform notes”- Android and iOS — backed by the native
com.affise:module-hardwareartifact and theAffiseModule/Hardwaresubspec. - No dedicated JS accessor on
Affise.module. Use the constant for module gating (setDisableModules), status (Affise.module.getStatus) and presence checks (Affise.module.getModulesInstalled()).
Installation
Section titled “Installation”The module ships as its own npm package, affise-attribution-module-hardware (Android and iOS). Install it next to the core library:
npm install affise-attribution-libnpm install affise-attribution-module-hardwareThe package only pulls in the native dependency (com.affise:module-hardware / AffiseModule/Hardware at 1.7.18); its JS entry point is empty, so keep importing everything from affise-attribution-lib. Rebuild the native app (and run pod install on iOS) after installing.
Manual native alternative
Section titled “Manual native alternative”Instead of the npm package you can add the native dependencies yourself (README “Modules → Manual Native”). The README recommends the npm package.
pod 'AffiseModule/Hardware', '1.7.18'Android
Section titled “Android”implementation "com.affise:module-hardware:$affise_version"Providers contributed
Section titled “Providers contributed”From the README “Hardware” provider list:
USER_AGENTCPU_TYPECPU_CORESDEVICE_NAMEPROXY_IP_ADDRESSSCREEN_WIDTHSCREEN_HEIGHTDENSITYHARDWARE_NAMEDEVICE_TYPEOS_VERSIONMCCODEMNCODEISPNETWORK_TYPECONNECTION_TYPETIMEZONE_DEVLANGUAGECOUNTRYREGIONDEVICE_MANUFACTUREROS_NAME
All of these constants already exist in ProviderType (src/parameters/ProviderType.ts); the enum was not changed in 1.7.18.