Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add uuid and device info provider config #934

Merged
merged 3 commits into from
Apr 4, 2024
Merged

feat: add uuid and device info provider config #934

merged 3 commits into from
Apr 4, 2024

Conversation

oscb
Copy link
Contributor

@oscb oscb commented Apr 2, 2024

feat: add uuid and device info provider config

Adds 2 new configuration options: uuidProvider and deviceInfoProvider to provide extensibility to other platforms like Windows, Web, Expo, etc.

uuidProvider

export type UUIDProvider = () => string;

Supplies a simple UUID generator. By default it will try to use react-native-get-random-values unless one specific provider is passed. If the lib is not installed it will rely on JS random generators and log a warning

deviceInfoProvider

export type DeviceInfoProvider = (
  config: GetContextConfig
) => Promise<NativeContextInfo>;

A function that returns the device context information. By default we will use our own native module if there's one available for the platform (Android & iOS).

@oscb oscb force-pushed the oscb/providers branch from c695cc9 to 98af055 Compare April 2, 2024 17:16
@oscb oscb marked this pull request as ready for review April 4, 2024 00:30
@oscb oscb merged commit 14ef679 into beta Apr 4, 2024
7 checks passed
@oscb oscb deleted the oscb/providers branch April 4, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants