Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dependencyTargets #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hannojg
Copy link

@hannojg hannojg commented Dec 22, 2023

Sometimes one target needs to embedded to another target, not directly to the main app.

To achieve that the order in which we add the targets to the project is important. Thus we first need to order the tasks, so they get added in the right order in case one target has a dependency on another one.

(Note: for that to work correctly it was important to make the withXcodeProjectBeta/applyXcodeChanges actually await so they get executed after one another (which seems to be related to the intrinsics of withBaseMod).

With this, its possible to do this:

// targets/watch-app/expo-target.config.js
module.exports = {
  type: "watch",
  // ⬇️ New: Depend on another target
  dependencyTargets: ["watchcomplication"],
};
// targets/watch-complication/expo-target.config.js
module.exports = {
  type: "widget",
  name: "watchcomplication"
};

I am implementing this aiming to support watch complication widget extensions. It sill needs a bit more work, but this is a PR for that.
Partly addresses: #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant