@oscilar/react-native-oscilar-module
v3.7.0
Published
Oscilar module for React Native
Downloads
27,382
Readme
react-native-oscilar-module
Oscilar module for React Native
Installation
yarnAndroid Artifactory Setup
Android builds need access to the Oscilar Artifactory Maven repository to resolve com.oscilar:osclib.
For local builds, add the credentials provided by Oscilar to ~/.gradle/gradle.properties:
artifactory_user=<your-artifactory-username>
artifactory_password=<your-artifactory-identity-token>For CI builds, configure the equivalent secrets as environment variables:
ARTIFACTORY_USER=<your-artifactory-username>
ARTIFACTORY_PASSWORD=<your-artifactory-identity-token>Add the Oscilar repository to your app's settings.gradle or settings.gradle.kts repository configuration. If you already have an Oscilar GitHub Packages maven block, replace only that block and keep the rest of your Gradle configuration unchanged:
dependencyResolutionManagement {
repositories {
// ...
maven {
name = "OscilarArtifactory"
url = uri("https://oscilar.jfrog.io/artifactory/osclib")
credentials {
username = providers.gradleProperty("artifactory_user").getOrNull() ?: System.getenv("ARTIFACTORY_USER")
password = providers.gradleProperty("artifactory_password").getOrNull() ?: System.getenv("ARTIFACTORY_PASSWORD")
}
content {
includeGroup("com.oscilar")
}
}
}
}Build & run
yarn example androidor
yarn example iosUsage
import { initOscilar, generateTransactionID } from '@oscilar/react-native-oscilar-module';
// App initialization
useEffect(() => {
(async () => {
await initOscilar(clientKey);
})();
}, []);
// Generating Transaction ID
const transactionID = await generateTransactionID();Native iOS SDK Version
The version of the native iOS SDK used by this module can be found in the OscilarModule.podspec file.
License
Copyright
