File size: 1,095 Bytes
b450976 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | import {type ConfigPlugin} from "expo/config-plugins"
import {withAndroidConfiguration} from "./withAndroid"
import {withIosConfiguration} from "./withIos"
export interface BluetoothSdkPluginProps {
node?: boolean
analytics?: boolean | BluetoothSdkAnalyticsPluginProps
}
export interface BluetoothSdkAnalyticsPluginProps {
enabled?: boolean
/**
* Host-declared build lane (`dev`, `staging`, `prod`, ...), reported as
* `app_environment` on every SDK analytics event. Trimmed and lowercased;
* must then start with a letter or digit, followed by letters, digits, `_`
* or `-`, at most 32 characters. Store/TestFlight/sideload detection is
* automatic; this only adds the lane the host itself knows about.
*/
environment?: string
}
const withBluetoothSdk: ConfigPlugin<BluetoothSdkPluginProps> = (config, props) => {
// Apply Android configurations
config = withAndroidConfiguration(config, props)
// Apply iOS configurations
config = withIosConfiguration(config, props)
return config
}
export default withBluetoothSdk
|