@react-native-tvos/config-tv 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,7 +65,7 @@ _Plugin parameters_:
65
65
  - `DEBUG=expo:*` (shows debug messages from all plugins)
66
66
  - `DEBUG=expo:react-native-tvos:config-tv` (shows debug messages from this plugin only)
67
67
  - `tvosDeploymentTarget`: (optional string, default '13.4') Used to set the tvOS deployment target version in the Xcode project.
68
- - `removeFlipperOnAndroid`: (optional boolean, default true) Used to remove the Flipper dependency from `MainApplication.kt` (or `MainApplication.java`) and `android/app/build.gradle`. This is necessary for React Native TV 0.73 and higher, since Flipper integration is removed from these versions. If this causes issues, set the value to false, run `npx expo prebuild --clean` again, and then remove Flipper from your Android source manually.
68
+ - `removeFlipperOnAndroid`: (optional boolean, default true) Used to remove the Flipper dependency from `MainApplication.kt` (or `MainApplication.java`) and `android/app/build.gradle`. This is necessary for React Native TV 0.73 and higher, since Flipper integration is removed from these versions. If this causes issues, set the value to false, run `npx expo prebuild --clean` again, and then remove Flipper from your Android source manually. This change will be made regardless of the setting of the `EXPO_TV` environment variable or the value of the `isTV` plugin parameter, as it is needed for both Android mobile and Android TV.
69
69
  - `androidTVBanner`: (optional string) If set, this should be a path to an existing PNG file appropriate for an Android TV banner image. See https://developer.android.com/design/ui/tv/guides/system/tv-app-icon-guidelines#banner . The Android manifest will be modified to reference this image, and the image will be copied into Android resource drawable directories.
70
70
  - `appleTVImages`: (optional object) If set, this is an object with the paths to images needed to construct the Apple TV icon and top shelf brand assets. The images will be used to construct a brand asset catalog in the Xcode project Image catalog, and the project updated to use the brand assets as the source for the app icons. If this property is set, all image paths must be defined and the files must exist, or an error will be thrown. The images need to be the exact sizes shown here, in order to avoid errors during Xcode compilation and on submission to the App Store or TestFlight.
71
71
  - `icon`: (string) Path to a 1280x760 image
package/build/types.d.ts CHANGED
@@ -51,6 +51,8 @@ export type ConfigData = {
51
51
  tvosDeploymentTarget?: string;
52
52
  /**
53
53
  * If set, Android code that references Flipper will be removed. (Defaults to true.)
54
+ * This change will be made regardless of the setting of the `EXPO_TV` environment variable or
55
+ * the value of the `isTV` plugin parameter, as it is needed for both Android mobile and Android TV.
54
56
  */
55
57
  removeFlipperOnAndroid?: boolean;
56
58
  /**
package/build/withTV.js CHANGED
@@ -11,10 +11,13 @@ const withTVAndroidRemoveFlipper_1 = require("./withTVAndroidRemoveFlipper");
11
11
  const withTVAndroidBannerImage_1 = require("./withTVAndroidBannerImage");
12
12
  const utils_1 = require("./utils");
13
13
  const withTVNoEffect = (config, params = {}) => {
14
- (0, utils_1.verboseLog)(`${utils_1.packageNameAndVersion}: isTV == false, plugin will have no effect`, {});
14
+ (0, utils_1.verboseLog)(`${utils_1.packageNameAndVersion}: isTV == false, TV-specific modifications will not be made.`, {});
15
15
  return config;
16
16
  };
17
17
  const withTVPlugin = (config, params = {}) => {
18
+ // This plugin should always run
19
+ config = (0, withTVAndroidRemoveFlipper_1.withTVAndroidRemoveFlipper)(config, params);
20
+ // Return if TV is not enabled
18
21
  const isTV = (0, utils_1.isTVEnabled)(params);
19
22
  if (!isTV) {
20
23
  config = withTVNoEffect(config, params);
@@ -27,7 +30,6 @@ const withTVPlugin = (config, params = {}) => {
27
30
  config = (0, withTVSplashScreen_1.withTVSplashScreen)(config, params);
28
31
  config = (0, withTVAndroidBannerImage_1.withTVAndroidBannerImage)(config, params); // This should be done before Android manifest config
29
32
  config = (0, withTVAndroidManifest_1.withTVAndroidManifest)(config, params);
30
- config = (0, withTVAndroidRemoveFlipper_1.withTVAndroidRemoveFlipper)(config, params);
31
33
  return config;
32
34
  };
33
35
  const pkg = require('../package.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-tvos/config-tv",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Config plugin to reconfigure native directories for Apple TV and Android TV development if needed",
5
5
  "main": "build/withTV.js",
6
6
  "types": "build/withTV.d.ts",