Skip to content

Instantly share code, notes, and snippets.

@Blocklisupport
Last active February 2, 2024 18:01
Show Gist options
  • Save Blocklisupport/89542cc9654061106044e1c887b83225 to your computer and use it in GitHub Desktop.
Save Blocklisupport/89542cc9654061106044e1c887b83225 to your computer and use it in GitHub Desktop.
blockli-updated-index.js
import React from "react";
import { NativeModules } from "react-native";
const { RNCustomCode } = NativeModules;
import { initialize } from "@blocklienterprise/blockli";
import config from "@src/build_config.json";
export const applyCustomCode = async (externalCodeSetup) => {
const blockli_config = {
license: "XXXXXXXXXXXXXXX", // Enter your 15 digit Blockli App Kit license key here. See your account dashboard at https://blockli.dev/dashboard
app_id: config.app_id,
code: externalCodeSetup,
bcdn_token: "BUNNYCDN-TOKEN-AUTH-KEY"",
website: "https://example-site.com", // Enter your app domain here with NO trailing slash.
// NOTE: If you have a staging site, please use a different Git branch for your test app and COPY this entire code to the test branch and enter the staging site domain.
};
const components = {
// ... other styles and components
};
await initialize(blockli_config, components);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment