mirror of
https://github.com/expo/config-plugins.git
synced 2026-11-13 20:28:07 -10:00
chore(react-native-google-cast): lint fix
This commit is contained in:
1 parent
ce1a818564
commit
21c49280d4
2 files changed
+21
-22
No files matched your search
@@ -6,12 +6,11 @@ import {
|
||||
withMainActivity,
|
||||
withProjectBuildGradle,
|
||||
} from "@expo/config-plugins";
|
||||
import { addImports } from "@expo/config-plugins/build/android/codeMod";
|
||||
import {
|
||||
mergeContents,
|
||||
removeContents,
|
||||
} from "@expo/config-plugins/build/utils/generateCode";
|
||||
import { addImports } from "@expo/config-plugins/build/android/codeMod";
|
||||
import fs from "fs";
|
||||
|
||||
const { addMetaDataItemToMainApplication, getMainApplicationOrThrow } =
|
||||
AndroidConfig.Manifest;
|
||||
@@ -121,7 +120,7 @@ const withAppBuildGradleImport: ConfigPlugin<{ version?: string }> = (
|
||||
|
||||
const withMainActivityLazyLoading: ConfigPlugin = (config) => {
|
||||
return withMainActivity(config, async (config) => {
|
||||
let src = addImports(
|
||||
const src = addImports(
|
||||
config.modResults.contents,
|
||||
["com.google.android.gms.cast.framework.CastContext"],
|
||||
config.modResults.language === "java"
|
||||
|
||||
@@ -22,12 +22,12 @@ const withIosWifiEntitlements: ConfigPlugin = (config) => {
|
||||
|
||||
const LOCAL_NETWORK_USAGE =
|
||||
"${PRODUCT_NAME} uses the local network to discover Cast-enabled devices on your WiFi network";
|
||||
const BLUETOOTH_ALWAYS_USAGE =
|
||||
"${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const BLUETOOTH_PERIPHERAL_USAGE =
|
||||
"${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
const MICROPHONE_USAGE =
|
||||
"${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
// const BLUETOOTH_ALWAYS_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const BLUETOOTH_PERIPHERAL_USAGE =
|
||||
// "${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices";
|
||||
// const MICROPHONE_USAGE =
|
||||
// "${PRODUCT_NAME} uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices";
|
||||
|
||||
/**
|
||||
* On iOS, a dialog asking the user for the local network permission will now be displayed immediately when the app is opened.
|
||||
@@ -61,19 +61,19 @@ const withIosLocalNetworkPermissions: ConfigPlugin<{ receiverAppId?: string }> =
|
||||
});
|
||||
};
|
||||
|
||||
const withIosGuestMode: ConfigPlugin = (config) => {
|
||||
return withInfoPlist(config, (config) => {
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
BLUETOOTH_ALWAYS_USAGE;
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
BLUETOOTH_PERIPHERAL_USAGE;
|
||||
config.modResults.NSMicrophoneUsageDescription =
|
||||
config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
return config;
|
||||
});
|
||||
};
|
||||
// const withIosGuestMode: ConfigPlugin = (config) => {
|
||||
// return withInfoPlist(config, (config) => {
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription =
|
||||
// config.modResults.NSBluetoothAlwaysUsageDescription ||
|
||||
// BLUETOOTH_ALWAYS_USAGE;
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription =
|
||||
// config.modResults.NSBluetoothPeripheralUsageDescription ||
|
||||
// BLUETOOTH_PERIPHERAL_USAGE;
|
||||
// config.modResults.NSMicrophoneUsageDescription =
|
||||
// config.modResults.NSMicrophoneUsageDescription || MICROPHONE_USAGE;
|
||||
// return config;
|
||||
// });
|
||||
// };
|
||||
|
||||
// TODO: Use AppDelegate swizzling
|
||||
const withIosAppDelegateLoaded: ConfigPlugin<IosProps> = (config, props) => {
|
||||
|
||||
Reference in new issue
Block a user