react-native-ios-widget 0.0.3 → 0.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ios-widget",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Expo config plugin to add widgets to a React Native app",
5
5
  "main": "build/Widget.js",
6
6
  "types": "build/Widget.d.ts",
@@ -22,20 +22,20 @@
22
22
  "license": "MIT",
23
23
  "homepage": "https://github.com/adrianso/react-native-ios-widget",
24
24
  "dependencies": {
25
- "@expo/config-plugins": "^6.0.2"
25
+ "@expo/config-plugins": "^7.2.5"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/jest": "^29.5.2",
29
29
  "@types/node": "20.2.5",
30
30
  "@types/react": "18.2.8",
31
31
  "@types/react-native": "0.72.2",
32
- "expo": "~48.0.19",
33
- "expo-module-scripts": "3.0.9",
34
- "expo-modules-core": "1.2.7",
35
- "jest": "^29.5.0",
32
+ "expo": "~49.0.3",
33
+ "expo-module-scripts": "3.0.11",
34
+ "expo-modules-core": "1.5.7",
35
+ "jest": "^29.6.1",
36
36
  "react": "18.2.0",
37
- "react-native": "0.72.0-rc.5",
38
- "typescript": "^5.0.4"
37
+ "react-native": "0.72.3",
38
+ "typescript": "5.1.3"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "expo": "*",
@@ -1,6 +1,6 @@
1
1
  import { ConfigPlugin } from "expo/config-plugins";
2
2
  declare const withWidget: ConfigPlugin<{
3
- frequentUpdates?: boolean;
3
+ enabled?: boolean;
4
4
  widgetsFolder?: string;
5
5
  deploymentTarget?: string;
6
6
  groupIdentifier?: string;
@@ -5,17 +5,12 @@ const withXcode_1 = require("./withXcode");
5
5
  const withWidgetExtensionEntitlements_1 = require("./withWidgetExtensionEntitlements");
6
6
  const withPodfile_1 = require("./withPodfile");
7
7
  const withConfig_1 = require("./withConfig");
8
- const withWidget = (config, { frequentUpdates, deploymentTarget = "14.0", widgetsFolder = "widgets", groupIdentifier, pods, }) => {
8
+ const withWidget = (config, { enabled = true, deploymentTarget = "14.0", widgetsFolder = "widgets", groupIdentifier, pods, }) => {
9
+ if (!enabled) {
10
+ return config;
11
+ }
9
12
  const targetName = "WidgetsExtension";
10
13
  const bundleIdentifier = `${config.ios?.bundleIdentifier}.Widgets`;
11
- config.ios = {
12
- ...config.ios,
13
- infoPlist: {
14
- ...config.ios?.infoPlist,
15
- NSSupportsLiveActivities: true,
16
- NSSupportsLiveActivitiesFrequentUpdates: frequentUpdates,
17
- },
18
- };
19
14
  return (0, config_plugins_1.withPlugins)(config, [
20
15
  [
21
16
  withXcode_1.withXcode,
@@ -5,7 +5,7 @@ import { withPodfile } from "./withPodfile";
5
5
  import { withConfig } from "./withConfig";
6
6
 
7
7
  const withWidget: ConfigPlugin<{
8
- frequentUpdates?: boolean;
8
+ enabled?: boolean;
9
9
  widgetsFolder?: string;
10
10
  deploymentTarget?: string;
11
11
  groupIdentifier?: string;
@@ -14,25 +14,20 @@ const withWidget: ConfigPlugin<{
14
14
  }> = (
15
15
  config,
16
16
  {
17
- frequentUpdates,
17
+ enabled = true,
18
18
  deploymentTarget = "14.0",
19
19
  widgetsFolder = "widgets",
20
20
  groupIdentifier,
21
21
  pods,
22
22
  }
23
23
  ) => {
24
+ if (!enabled) {
25
+ return config;
26
+ }
27
+
24
28
  const targetName = "WidgetsExtension";
25
29
  const bundleIdentifier = `${config.ios?.bundleIdentifier}.Widgets`;
26
30
 
27
- config.ios = {
28
- ...config.ios,
29
- infoPlist: {
30
- ...config.ios?.infoPlist,
31
- NSSupportsLiveActivities: true,
32
- NSSupportsLiveActivitiesFrequentUpdates: frequentUpdates,
33
- },
34
- };
35
-
36
31
  return withPlugins(config, [
37
32
  [
38
33
  withXcode,