@bacons/apple-targets 0.1.13 → 0.1.15

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
@@ -9,7 +9,7 @@ An experimental Expo Config Plugin that generates native Apple Targets like Widg
9
9
 
10
10
  ## 🚀 How to use
11
11
 
12
- > This plugin requires at least CocoaPods 1.16.2, Xcode 16, and Expo SDK +52.
12
+ > This plugin requires at least CocoaPods 1.16.2 (ruby 3.2.0), Xcode 16 (macOS 15 Sequoia), and Expo SDK +52.
13
13
 
14
14
  1. Run `npx create-target` in your Expo project to generate an Apple target.
15
15
  2. Select a target to generate, I recommend starting with a `widget` (e.g. `npx create-target widget`). This will generate the required widget files in the root `/targets` directory, install `@bacons/apple-targets`, and add the Expo Config Plugin to your project.
@@ -77,7 +77,7 @@ module.exports = {
77
77
  thing: "../assets/thing.png",
78
78
  },
79
79
 
80
- // The iOS version fot the target. Defaults to 18.1
80
+ // The iOS version fot the target. Defaults to 18.0
81
81
  deploymentTarget: "15.1",
82
82
 
83
83
  // Optional bundle identifier for the target. Will default to a sanitized version of the root project bundle id + target name.
package/build/config.d.ts CHANGED
@@ -84,7 +84,7 @@ export type Config = {
84
84
  * @example ["UserNotifications", "Intents"]
85
85
  */
86
86
  frameworks?: string[];
87
- /** Deployment iOS version for the target. Defaults to `18.1` */
87
+ /** Deployment iOS version for the target. Defaults to `18.0` */
88
88
  deploymentTarget?: string;
89
89
  /** Apple team ID to use for signing the target. Defaults to whatever is used in the main App target. */
90
90
  appleTeamId?: string;
package/build/target.js CHANGED
@@ -301,6 +301,8 @@ function getFrameworksForType(type) {
301
301
  "WidgetKit",
302
302
  // CD07060D2A2EBE2E009C1192 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
303
303
  "SwiftUI",
304
+ "ActivityKit",
305
+ "AppIntents",
304
306
  ];
305
307
  }
306
308
  else if (type === "intent") {
@@ -15,7 +15,7 @@ const withIosIcon_1 = require("./icon/withIosIcon");
15
15
  const target_1 = require("./target");
16
16
  const withEasCredentials_1 = require("./withEasCredentials");
17
17
  const withXcodeChanges_1 = require("./withXcodeChanges");
18
- const DEFAULT_DEPLOYMENT_TARGET = "18.1";
18
+ const DEFAULT_DEPLOYMENT_TARGET = "18.0";
19
19
  function memoize(fn) {
20
20
  const cache = new Map();
21
21
  return ((...args) => {
@@ -177,7 +177,7 @@ const withWidget = (config, props) => {
177
177
  const mainAppBundleId = config.ios.bundleIdentifier;
178
178
  const bundleId = ((_d = props.bundleIdentifier) === null || _d === void 0 ? void 0 : _d.startsWith("."))
179
179
  ? mainAppBundleId + props.bundleIdentifier
180
- : (_e = props.bundleIdentifier) !== null && _e !== void 0 ? _e : `${mainAppBundleId}.${targetName}`;
180
+ : (_e = props.bundleIdentifier) !== null && _e !== void 0 ? _e : `${mainAppBundleId}.${getSanitizedBundleIdentifier(targetName)}`;
181
181
  (0, withXcodeChanges_1.withXcodeChanges)(config, {
182
182
  configPath: props.configPath,
183
183
  name: targetName,
@@ -246,3 +246,10 @@ const withConfigColors = (config, props) => {
246
246
  return config;
247
247
  };
248
248
  exports.default = withWidget;
249
+ function getSanitizedBundleIdentifier(value) {
250
+ // According to the behavior observed when using the UI in Xcode.
251
+ // Must start with a letter, period, or hyphen (not number).
252
+ // Can only contain alphanumeric characters, periods, and hyphens.
253
+ // Can have empty segments (e.g. com.example..app).
254
+ return value.replace(/(^[^a-zA-Z.-]|[^a-zA-Z0-9-.])/g, "-");
255
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bacons/apple-targets",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Generate Apple Targets with Expo Prebuild",
5
5
  "main": "build/ExtensionStorage.js",
6
6
  "types": "build/ExtensionStorage.d.ts",