@bacons/apple-targets 0.1.13 → 0.1.14

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.
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") {
@@ -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.14",
4
4
  "description": "Generate Apple Targets with Expo Prebuild",
5
5
  "main": "build/ExtensionStorage.js",
6
6
  "types": "build/ExtensionStorage.d.ts",