• Stars1.4k+1 tuần này
  • Forks107
  • Watchers13
  • Issues49
  • Ngày tạo09/06/2023
  • Cập nhật gần nhất09/11/2026
  • Ngôn ngữJavaScript
  • Giấy phép—
README.md71.0 KBRaw

Apple Targets

An Expo Config Plugin that generates native Apple Targets like Widgets or App Clips, and links them outside the /ios directory. You can open Xcode and develop the targets inside the virtual expo:targets folder and the changes will be saved outside of the ios directory. This pattern enables building things that fall outside of the scope of React Native while still obtaining all the benefits of Continuous Native Generation.

targets

🚀 How to use

This plugin requires at least CocoaPods 1.16.2 (ruby 3.2.0), Xcode 16 (macOS 15 Sequoia), and Expo SDK +53.

  1. Run npx create-target in your Expo project to generate an Apple target.
  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.
  3. If you already know your Apple Team ID, then set it under the ios.appleTeamId property in your app.json. You can find this in Xcode under the Signing & Capabilities tab and set it later if needed.
  4. Run npx expo prebuild -p ios --clean to generate the Xcode project.
  5. You can now open your project in Xcode (xed ios) and develop the widget inside the expo:targets/<target> folder.
  6. When you're ready to build, select the target in Xcode and build it.

How it works

The root /targets folder is magic, each sub-directory should have a expo-target.config.js file that defines the target settings. When you run npx expo prebuild --clean, the plugin will generate the Xcode project and link the target files to the project. The plugin will also generate an Info.plist file if one doesn't exist.

The Config Plugin will link the subfolder (e.g. targets/widget) to Xcode, and all files inside of it will be part of the target. This means you can develop the target inside the expo:targets folder and the changes will be saved outside of the generated ios directory.

The root Info.plist file in each target directory is not managed and can be freely modified.

Nội dung README thuộc về EvanBacon và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/EvanBacon/expo-apple-targets